python-binance icon indicating copy to clipboard operation
python-binance copied to clipboard

Can't retrieve order or trade history from more than 2 years ago

Open waynongithub opened this issue 11 months ago • 3 comments

Hi, client.get_my_trades(symbol=pair) returns only the trade history of the last 2 years. Same for client.get_all_orders(symbol=pair) Adding the parameters startTime or fromId has no effect. How can i get the trade and order history from the beginning? tnx

waynongithub avatar Feb 05 '25 04:02 waynongithub

Hello @waynongithub,

I think that's a limitation from the API itself.

carlosmiei avatar Feb 05 '25 12:02 carlosmiei

@waynongithub You can manually trigger the download of older trades but not sure if that can be done through the UI: https://www.binance.com/en/support/faq/how-to-download-spot-trading-transaction-history-statement-e4ff64f2533f4d23a0b3f8f17f510eab

carlosmiei avatar Feb 05 '25 12:02 carlosmiei

I think that's a limitation from the API itself.

@carlosmiei I was afraid you were going to say that. Yes, manual downloads work, and the api endpoint get_historical_trades also retrieves older trades, but both don't include the order_id, so you can't link trades to orders, which is what i was hoping to do. Thanks for replying!

waynongithub avatar Feb 06 '25 01:02 waynongithub