uneasyguy / binance_data

Python package to retrieve historical data from Binance
MIT License
46 stars 9 forks source link

Delisted Pairs #5

Open Dilidonka opened 3 years ago

Dilidonka commented 3 years ago

Binance returns tickers even for the delisted pairs. As a result, the script downloads these pairs continuously. Adding something like this will help to skip this kind of pairs. if len(binance.client.Client(None, None).get_klines(symbol=pair, interval='5m', startTime=1610755200000)) > 0:

uneasyguy commented 3 years ago

I'm in the process of rewriting this entire package, and it'll ultimately be very different than what is there now, but quickly (and without testing anything) this was a potential solution that came to mind that wouldn't break this package if you want to try subbing this in and let me know if it solves the delisted pair problem: https://gist.github.com/uneasyguy/afe8fc759980baf49d225e723185eab5