uniVocity / univocity-trader

open-source trading framework for java, supports backtesting and live trading with exchanges
577 stars 140 forks source link

Deprecations of Binance APIs #47

Closed wwadge closed 3 years ago

wwadge commented 4 years ago

As per : https://binance-docs.github.io/apidocs/spot/en/#change-log

By end of Q1 2020, the following endpoints will be removed from the API. The documentation has been updated to use the v3 versions of these endpoints.

GET api/v1/depth
GET api/v1/historicalTrades
GET api/v1/aggTrades
GET api/v1/klines
GET api/v1/ticker/24hr
GET api/v1/ticker/price
GET api/v1/exchangeInfo
POST api/v1/userDataStream
PUT api/v1/userDataStream
GET api/v1/ping
GET api/v1/time
GET api/v1/ticker/bookTicker
These are also changing: GET api/v1/ticker/allPrices GET api/v3/ticker/price
GET api/v1/ticker/allBookTickers GET api/v3/ticker/bookTicker
wwadge commented 4 years ago

Any reason we don't use the official Binance java client? Historical reasons perhaps?

jbax commented 4 years ago

I'd prefer to use the official jar too but it's not updated at the same pace as their API.

What I did was to just copy that source code. A lot of that code is not even used here. They didn't incorporate a pull request to handle connections reliably and the original (at least since November 2019) would suffer from random disconnections. Also it took around 2 weeks for their lib to be updated to handle API changes that were needed to execute requests.

If we used the officia library we'd be unable to trade for 2 weeks.

So for now I'm copying their code here and updating as needed.

On Sun, May 3, 2020, 3:57 PM Wallace Wadge notifications@github.com wrote:

Any reason we don't use the official Binance java client? Historical reasons perhaps?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/uniVocity/univocity-trader/issues/47#issuecomment-623061918, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABWFQPSLHLQTFHXXHITLVCTRPUFD3ANCNFSM4MX7XUOA .

wwadge commented 4 years ago

You're right, they haven't updated their own calls here either, example:

https://github.com/binance-exchange/binance-java-api/blob/master/src/main/java/com/binance/api/client/impl/BinanceApiService.java#L46