BitBay REST API for Node.js
See full description at https://docs.bitbay.net/v3.2.0/reference
Installation
npm i bitbay-api-node
Usage
The BBA constructor receive public and private key using to authentication.
const BBA = ; const api = '22345f6f-1b1d-1234-a973-a10b1bdba1a1' '78539fe0-e9b0-4e4e-8c86-70b36aa93d4f';
You can also execute constructor without parameters and feel free to get public endpoints.
const BBA = ; const api = ;api;
Public endpoints
const BBA = ; const api = ; // Get ticker from BTC-EUR marketapi; // Get orderbook from LSK-PLN marketapi; // Get last 10 transactions on BTC-USD market from last 3 minutesapi; // Get 30 minutes candles from last 4 hoursapi;
Private endpoints
Trading
const BBA = ; const api = '22345f6f-1b1d-1234-a973-a10b1bdba1a1' '78539fe0-e9b0-4e4e-8c86-70b36aa93d4f'; // We want to buy 1 Bitcoin for 4000$ on BTC-USD market and offer will be hiddenapi; // Let's get active offers from every marketapi; // Remove an offerapi; // Get our trading fees on BTC-PLN market (default)api; // Change default wallets to trade on BTC-USDapi;
Deposit and withdrawal
// Get our address to deposit cryptocurrency on specified walletapi; // Generate new cryptocurrency address on specified walletapi; // Get all historical addresses from specified walletapi; // Let's send some Bitcoinsapi; // Get address to deposit USDapi; // Time for withdraw our USDapi;
History
// Get transactions history for buy transactions from BTC-PLN where rate is from 23000 to 25000api; // Get 20 last historical operations on XMR wallets and sort descending by timeapi;
Manage wallets
// Get list of all walletsapi; // Create a new wallet for Bitcoinapi; // I think that was a bad name, let's change itapi; // Send some cryptocurrency over our walletsapi;