The melotic REST api https://www.melotic.com/apidoc wrapped for NodeJS/JavaScript.
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!
var Melotic = require('melotic');
var melotic = new Melotic(options);
This generates a new API client. It accepts options arguments.
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.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)
melotic.getMarkets(function(err, markets) {
// ... utilize markets
});