XChange icon indicating copy to clipboard operation
XChange copied to clipboard

Poloniex API for returnChartData - changes breaking compatibility

Open alinbreaban opened this issue 2 years ago • 3 comments

Poloniex deployed a new trading system and with it looks like they changed part of their legacy API. The changes done on returnChartData are breaking the integration for obtaining ohlcv data. The date of each candle is wrongly parsed due to Poloniex returning millis instead of seconds in their API.

I created a pull request that fixes this here: https://github.com/knowm/XChange/pull/4540

@timmolter can you check it out and merge it?

Thanks!

alinbreaban avatar Aug 08 '22 07:08 alinbreaban

Hi @alinbreaban

Something to add: Poloniex changed the API drastically. They call it "NTS" for new trading system. For instance fetching Trades does no longer work neither. The changes are briefly described here: https://support.poloniex.com/hc/en-us/articles/7749696398871 And the API doc is here: https://docs.poloniex.com/#introduction

For the ones which were confused about the article and the API doc too: The informations were intially partly entirely wrong. Poloniex fixed them in between after I asked regarding the contradicting information; the docs should now be correct. Unfortunately I don't have time to modify the XChange lib accordingly.

mumch avatar Aug 08 '22 13:08 mumch

Hey @mumch

Thank you for putting this here. Indeed, there is a new version of the API. There is still the legacy API available though and most of the methods (that I tested) work as expected. Here is the documentation for the legacy API: https://docs.legacy.poloniex.com/#returnbalances

The returnChartData method was broken though, and it got fixed by the PR that I did. So basically, most of the XChange library methods should continue to work with the current implementation and my fix.

Indeed, the new API you linked to should be added for Poloniex XChange implementation. Probably as a new implementation, like Poloniex V2 or smth? And as a totally new feature?

I'm open to ideas.

alinbreaban avatar Aug 08 '22 14:08 alinbreaban

Hi @alinbreaban Thank you for your reply and the explanation regarding legacy API of Poloniex.

I have created a dedicated ticket #4544 with the Trades and OderBook Stream isssue, as these do not belong to the title of this ticket here.

mumch avatar Aug 12 '22 12:08 mumch