Mintpal
Mintpal.com NodeJS API client. Fully supports the v1 API features: Mintpal.com API.
Example Usage
var Mintpal = ;var client = ; // fetch current stats for DRK/BTCclient // fetch a market summary for LTCclientsummary'LTC' { } // see last 100 trades for LTC/BTCclient // get chart data for Dogecoin (last 24 hours)client
Mintpal.com API documentation
For detailed API info, check out the official v1 API docs: https://www.mintpal.com/api
API Methods ### new Mintpal(options)
@options Object:
exchange
set a default exchange, example: LTC or BTCcoin
set a default coin, example: 'DOGE'period
default time period to use forchart
method callsapi_version
defaults tov1
var mintpal = exchange: 'BTC' coin: 'DOGE'
exchange
(optional) summary data by exchange (LTC or BTC)callback
receiveserror, data, response
Provides an overview of all our markets. Data refreshes every minute.
mintpalsummary{ console}
"market_id": "88" "coin": "365Coin" "code": "365" "exchange": "BTC" "last_price": "0.20000001" "yesterday_price": "0.20000001" "change": "0.00" "24hhigh": "0.21500024" "24hlow": "0.20000000" "24hvol": "0.163" "top_bid": "0.20000001" "top_ask": "0.20499999" ...
coin
The coin you're interested in, example: DOGEexchange
(optional) exchange example: LTC or BTC
Provides the statistics for a single market. Data refreshes every minute.
mintpalsummary'DOGE' 'BTC' { console}// or shorthandmintpalsummary'DOGE/BTC' {}
"market_id": "16" "coin": "Dogecoin" "code": "DOGE" "exchange": "BTC" "last_price": "0.00000049" "yesterday_price": "0.00000050" "change": "-2.00" "24hhigh": "0.00000052" "24hlow": "0.00000046" "24hvol": "37.989" "top_bid": "0.00000049" "top_ask": "0.00000050"
coin
The coin you're interested in, example: DOGEexchange
(optional) exchange example: LTC or BTC
Fetches the last 100 trades for a given market.
mintpal// or shorthandmintpal
"count":"100" "trades": "type":"1" "price":"0.00000023" "amount":"412128.80177019" "total":"0.09478962" "time":"1394498289.2727" ...
coin
The coin you're interested in, example: DOGEexchange
(optional) exchange example: LTC or BTCtype
(optional) example: BUY or SELL (default is BUY)
Fetches the 50 best priced orders of a given type for a given market.
mintpal// or shorthandmintpal
"count":"23" "type":"BUY" "orders": "price":"0.00000023" "amount":"22446985.14519785" "total":"5.16280655" ...
coin
The coin you're interested in, example: DOGEexchange
(optional) exchange example: LTC or BTCperiod
(optional) time period filter examples: 6hh, 1dd, 3dd, 7dd, max default is 6hh
chart data that we use for our candlestick graphs for a market for a given time period.
mintpal// or shorthandmintpal
"date":"2014-02-09 14:20" "open":"0.00000006" "close":"0.00000006" "high":"0.00000006" "low":"0.00000003" "exchange_volume":"0.00002145" "coin_volume":"608.50000000" ...
Contributing
Fork and clone the repository. Install dependencies with:
npm install
Run the existing test spec with npm test
.
Roadmap
- Implement the v2 beta API see: https://www.mintpal.com/api/v2
- Node Streams?
- Promises API support?
- ???
Support this project
BTC 1EkGJfpcAi6oeq1ooEjgzHVuRvc1HdvuXu
LTC LKPvk8RQsoYpmS9ajoXVoMUtAVpTJ8R9zH
CRYPT Esug5bcsMkQ9m2kMPtLpz2thwXSjyMtxkw