crypto-exchange-interface
v1.0.3
Published
Interface to access market data from all of the major crypto exchanges using a simple API.
Downloads
6
Readme
Node-Crypto-Exchange-Interface
Interface to access market data from all of the major crypto exchanges using a simple API.
Gives access to the bid/ask spread for a given currency pair with the following exchanges:
- Binance
- Bitfinex
- Bittrex
- Bitstamp
- Ccex
- Cryptopia
- Gdax
- Gemini
- Hitbtc
- Itbit
- Kraken
- Liqui
- Novaexchange
- Poloniex
- Shapeshifter
- Yobit
use:
Tickers must be in format SYMBOL_BASE e.g. ETH_BTC, XVG_BTC, XMR_BTC
Install npm i crypto-exchange-interface --save
import CEI from 'crypto-exchange-interface'
let cei = new CEI
cei.getSpread("ETH_BTC").then(res => {
console.log(res)
/* returns
{
Binance: { askPrice: '0.06294600', bidPrice: '0.06292800' },
Bitfinex: { askPrice: 0.0627, bidPrice: 0.062698 },
Bittrex: { askPrice: 0.062769, bidPrice: 0.06270013 },
Bitstamp: { askPrice: '0.06268002', bidPrice: '0.06262001' },
Ccex: { askPrice: 0.0618989, bidPrice: 0.06030929 },
Cryptopia: { askPrice: 0.06304302, bidPrice: 0.06298877 },
Gdax: { askPrice: '0.06253', bidPrice: '0.06252' },
Gemini: { askPrice: '0.06289', bidPrice: '0.06239' },
Hitbtc: { askPrice: '0.062843', bidPrice: '0.062801' },
Kraken: { askPrice: '0.062500', bidPrice: '0.062160' },
Liqui: { askPrice: 0.06289371, bidPrice: 0.06255235 },
Novaexchange: { askPrice: '0.05289999', bidPrice: '0.04925145' },
Poloniex: { askPrice: '0.06269997', bidPrice: '0.06269297' },
Shapeshifter: { askPrice: '0.06256733', bidPrice: '0.06256733' },
Yobit: { askPrice: 0.0629, bidPrice: 0.06282082 }
}
*/
})