Is it possible to fetch the whole account order history, without specifying the symbol? This would be used if I would need to fetch orders of all symbols that this account has used.
Ideally, I would expect an API similar to /api/v3/allOrders, but not requiring the symbol parameter, so my client is agnostic of which currencies have been used by the SPOT account.
Unfortunately for now these endpoints require specific symbol for each request. There are hundreds of trading symbols in Binance, it requires significant amount of time to loop all of them. So in order to respond in proper time, it is required to give the symbol in the request.
For now, the best solution is to listen to websocket server, any order/trade regardless the symbol will be pushed to client. Having a copy of these data locally will give you the flexibility to search fast without any limit.
I do not believe this should be as heavy as you suggest. The applications of binance itself (the windows app, or the website) can request that information in not time. So a webservice / API should be able to do it in the same time.
There are two things incorrect with this answer. First: The websocket gives you actual data, not data from the past. Does it?
Second what should I do when I am asleep, my PC is down, my application is also down. The next morning I wake up and I want to collect all modified / filled orders. What is the correct way to go? How can storing a local copy know about the order that are given. Maybe I gave some orders on the Binance app in bed, so my application does not know about it.
I also think this endpoint is mandatory. I use other exchange APIs like Kraken and Bitmex and I can get my historical trades from one endpoint without having to loop over every possible asset.
You say that looping over assets is expensive, but surely that’s not how your devs would write this endpoint. In the Binance database surely each trade record has a foreign key to an account or user. So just use the reverse relationship there. Simple SQL stuff surely?
I like Binance a lot. But I hit your API over 400 times (looping over assets) which takes 15-20 minutes) to get my account historical trades. This is bad for me and bad for you. Surely there is a better way Binance devs! Please take a look at this again.
Of course it can not be difficult to implement becase Binance already has order API without required symbol. When you go to order history in your Binance account HERE you can see that symbol is not required, only date range which is not a problem. This allows to traverse through whole orders history. Binance uses it`s own internal API gateway for that. Try network inspect and you will see calls to this URL https://www.binance.com/gateway-api/v1/private/streamer/order/get-trade-orders which is not available for public. Please Binance take a look on that. Current version of orders API is very poor and unusable. This thread already has many views and votes. Many devs are interested about it. Thank you.
Agree 100%. It’s ridiculous for the largest crypto exchange in the world not to have this endpoint already for the public, especially considering the volume of unnecessary calls to the API they cause by that… Makes you wonder…
I landed here to say the same - it’s already available from UI, so I bet they don’t loop over all the symbols like we do. That would be crazy.
I’m quite surprised that this basic functionality is not available. It was reported ages ago
It is so weird to see that for such an important feature nothing has been planned and more disappointing to see only 56 developers voted so far! Since it is all available on Binance private API, I assume that it shouldn’t be so hard to prepare it for the Public API as well. Come on Binance developers!! I hope someone saves us from this struggle soon!
@dino Thanks a lot for all the answers, can you maybe just clarify a bit how exactly could we get historical orders? I managed to connect to streams and receiving events when they happen, but couldn’t figure out how to get historical data (my previous trades)?