dparlevliet / node.bittrex.api

Node Bittrex API is an asynchronous node.js library for the Bittrex API, the data can be received either via GET request or Stream.
MIT License
253 stars 100 forks source link

How can get all order history #60

Closed vanhung89 closed 6 years ago

vanhung89 commented 6 years ago

I used bittrex.getorderhistory('', function(data1, err ) { // do somethings });to get order history. But it just return 9 records. How can I fetch all order history?

dotsoftware commented 6 years ago

I just tested it and received exactly 100 trades from getorderhistory. I call the function with brackets if I don't want to limit it to certain markets, like this: getorderhistory( {}, function(data,err) .... Afaik, all history is only supported on the website as CSV download

lukehaines2 commented 6 years ago

You can just use a custom request.. the below worked for me! But bear in mind I believe Bittrex only sends 1 month's worth of orders at the moment, otherwise you have to download a CSV from the site as @dotsoftware suggested.


const url = 'https://bittrex.com/api/v1.1/account/getorderhistory';
bittrex.sendCustomRequest(url, function( data, err ) {
  if (err) return console.log( err);
  console.log( data );
}, true);