peterszombati / xapi-node

xStation5 Trading API for NodeJS/JS
https://peterszombati.github.io/xapi-node/
Other
58 stars 19 forks source link

x.getPriceHistory Data limit potentially exceeded #18

Closed majorsauce closed 3 years ago

majorsauce commented 3 years ago

Getting price history for period M1 and startUtc of January 2020 fails since the request rate exceeds 50000. I checked the XAPI.getPriceHistory() function and it looks kind of strange to me. Passing both, "ticks" and "startUtc", will always result in one of them being ignored since chartRangeRequest does not use the startUtc argument and getChartLastRequest does not use the ticks variable.

Is there any reason to use getChartLastRequest at all? I cannot see any so if you don´t either I could raise a pull request to always use getChartRangeRequest.

peterszombati commented 3 years ago

Hi @majorsauce I fixed this in 2.4.1 if you pass both parameter it will use getChartRangeRequest