Fetch all account orders

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 :confused:

2 Likes

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!

2 Likes

Hi Dino, thank you too for your prompt answer.

Is it possible to receive the history of orders through the WebSocket API? That would be an interesting approach.

Also, taken the amount of required requests and their weight, would it be unrealistic to try fetching all account orders?

Thank you.

Yes, from websocket stream, you could get all order’s updated information.
https://binance-docs.github.io/apidocs/spot/en/#payload-order-update

this is a recommended approach, without limits.

2 Likes

@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)?

@bomb-on Unfortunately it’s not possible to get historical data from websocket, only current orders/trades pushed from stream.

For historical orders or trades, please fetch them from restful endpoints by following the requests limits. :slight_smile:

Hi
fetching history of Trades and order is one of mandatory features for developers who are trying to have their own software to work with Binance.
To calculate profit/loss from the beginning or have a portfolio management software we have to fetch list of full orders and trades in the past.
Fetching history by symbol is the only way that we can use just now, but still there are some problems to do that. iterating over symbols need symbol list from binance that can be fetched using various endpoints like ExchangeInfo. but it shows only active pairs and if you have orders and trades on pairs that were active in past and now they are unlisted from binance you will never reach them. so there is no way to fetch full history of trades and orders.
It would be very useful if binance can provide endpoints to fetch full history of orders/trades
or at least have an endpoint to fetch all traded/ordered pairs of an account

19 Likes

You don’t need external services to get your full history, but yes, you are completely right, it is a mess currently to get all that data:

  • Fetch Exchange Info to get all trading pairs information
  • Fetch User’s Account Information to get current balances (and hope that user never converted dust to BNB)
  • Finally, go through user’s assets and match them with trading pairs from “Exchange Info” response and go fetch all possible trading pairs for each asset (since we cannot tell which pair user actually traded)

As far as I understood, if user converted some asset to BNB (e.g. dust), you won’t be able to tell that user ever traded that asset, so you will have hard time to get trading history for that asset’s pairs…

4 Likes

Being able to fetch all trade without ticker and in a paginated way is really a mandatory feature.

It’s a win win, since it will ease developers life, while requiring less charge on binance server, since binance servers won’t be spammed with batch of requests for all existing pairs (when most of them probably do not have any trade records)
As well as solving issues like disabled pairs etc…

11 Likes

Any idea if this is on the backlog or ever will see the light of day? Would LOVE to have this endpoint. Bruteforcing it by pair is just way too expensive.

People have been waiting an endpoint like this for years;


10 Likes

Totally agree with all posts above. I need it too. Loop over each pair is a really bad practice… Hope sincerely you could do something very soon! Thank you.

8 Likes

This API method would do well for everyone!

7 Likes

I asked this already a few times, it is really a mess to try to get your closed orders, and have to loop many time evry check, but somehow they refuse to do, while all other exchanges can do. Online you can do also, takes 10 sec

3 Likes

I’m just going to bump this post until we get some response from the team.

3 Likes

Please binance have a look :slight_smile:

3 Likes

Guys, maybe all together open tickets support or send email to them with this feature request?

3 Likes

the best way to do this is to let user manually sync their assets, so you dont need to loop every time. Or you could check tokens the user already own and try to check those orders, ppl always order the same tokens over and over, then if active token value does not match the balance of all orders combined, loop through the rest because clearly a piece is missing.

It’s a good alternative, but it still requires you to unnecessarily loop through the symbol to get all the historical orders. This shouldn’t be necessary in the first place. I imagine an endpoint like /api/v3/futures/historical-orders or /api/v3/spot/historical-orders or get all historical orders using /api/v3/all/historical-orders without having to add the symbol as parameter.

1 Like

any updates on that? no endpoint is no solution! :laughing:

3 Likes

I too need this obvious endpoint, its very very weak that it doesn’t exist. Many other exchange apis support it, and the result is pointless hammering of the current endpoint one symbol at a time that slows down getting the data and probably chokes up the endpoint bandwidth.

The websocket is no use if there is no persistent connection to the users running application.

3rd party developers help build Binance’s overall business by providing tools for users to help them trade, So its really poor that this very basic user api endpoint doesn’t work intelligently.

If it was my API I would be embarrassed, frankly, especially since you are on V3 of the api!!

3 Likes