0.0.1 • Published 9 years ago
melotic v0.0.1
melotic
The melotic REST api https://www.melotic.com/apidoc wrapped for NodeJS/JavaScript.
Why we created it?
We created this API wrapper so you could access the equivalent REST API through simple asynchronous functions with all the power provided by Melotic's direct API. This API uses simple method calls without all of the hassle of writing API request URLs, body and query strings.
Pull requests are welcomed!
API documentation
Instantiating a Client
var Melotic = require('melotic');
var melotic = new Melotic(options);
This generates a new API client. It accepts options arguments.
options:
accessKey
string Optional. Your Melotic api access key for write operations, like submitting a bid.secret
string Optional. Your Melotic secret corresponding to your access key for signing write operations.
Melotic client
- melotic.getMarkets(callback)
- melotic.getMarket(id, callback)
- melotic.getMarketPrice(id, callback)
- melotic.getMarketBuyDepth(id, params, callback)
- melotic.getMarketSellDepth(id, params, callback)
- melotic.getCompletedMarketOrders(id, params, callback)
- melotic.getAccountBalances(callback)
- melotic.getCompletedOrders(params, callback)
- melotic.getPendingOrders(params, callback)
- melotic.getDepositAddresses(callback)
- melotic.getDepositHistory(callback)
- melotic.getWithdrawalHistory(params, callback)
- melotic.createSellOrder(marketId, amount, price, callback)
- melotic.createBuyOrder(marketId, amount, price, callback)
- melotic.cancelOrder(id, callback)
getMarkets
melotic.getMarkets(function(err, markets) {
// ... utilize markets
});
0.0.1
9 years ago