passabilities / crypto-exchange

Pulls together list of crypto exchanges to interact with their API's in a uniform fashion.
MIT License
261 stars 78 forks source link

Bittrex getCandles support #17

Open talvasconcelos opened 6 years ago

talvasconcelos commented 6 years ago

Hi, would you care about adding getCandles, buy and sell endpoints available for the Bittrex v2.0 API?

Best regards, Tiago

passabilities commented 6 years ago

This will definitely be on the todo list, but since not every exchange offers this data you could just use the internal Bittrex npm package that includes this endpoint.

NOTE: that because the package reference isn't created until the constructor is called, you will have to do this:

let CE = require('crypto-exchange')
let bittrex = new CE.bittrex
bittrex.getcandles({
  marketName: 'USDT-BTC',
  tickInterval: 'fiveMin', // intervals are keywords
}, function( data, err ) {
  console.log( data );
})