Mercado Bitcoin API client
Mercado Bitcoin is a cryptocurrency exchange in Brazil. This module has been forked from macmiranda's module and modified to correct new format of open API while keeping the current functions.
Install
npm install mercadobitcoin-client-v3
Usage
There are 2 API endpoints. One for general info (public) and a trade API (require credentials)
documentation
API -var MercadoBitcoin = MercadoBitcoin; // The options for currency are: BTC, LTC, BCH, XRP and ETHvar mb = ; // Call ticker method to get last price of XRPmb; // Fetch the order book for BTC transactions (default)mb;
documentation
TRADE API -Get your credentials at Mercado Bitcoin website
You will need the following info: Chave, Código (here). The PIN that was used in the previous versions is not needed anymore.
var MercadoBitcoinTrade = MercadoBitcoinTrade; // Credentialsvar config = key : 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' secret : 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'; var mbt = config; // This object contains extra parameters that you might use for some methods:var details = // level: 'INFO' , coin_pair: 'BRLXRP'// status_list: '[2,3]', // Here you find some of the common methods that you can use as an example. For the complete list, please refer to the Trade API documentation: mbt;//mbt.execute('list_system_messages', details, console.log);//mbt.execute('list_orders', details, console.log);//mbt.execute('list_orderbook', details, console.log);
Donations are welcome!
33c4WSnNiYj8thcmwxzhwPYTKsYt5YKeBa