Fetch all account orders

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

This is getting ridiculous when using a lot of sub-accounts or creating a 3rd party service as others pointed at. With 100+ sub accounts, hundred of thousands of calls are needed to check the history for all symbols for all subs.
I feel like this forum is only for very basic questions and that any feature request is completely ignored :thinking:

3 Likes

feedback, suggestions are all reviewed and forward to the team if they are reasonable.

For this concern, there are already plenty discussions.

With 100+ sub accounts, client can easily consume all request limits in short time. But with websocket, it can be handy to just subscribe and listen for account changes.

Spot websocket support up to 1024 streams per connection, so you can listen all sub accounts in just one connection to server, without request limit concern, it’s the best practice to get all orders.

The problem is to get the historical data, not the realtime.

You already confirmed that it is not possible and that we need to use the rest endpoint, leading to a lot of requests.

Providing a better endpoint would considerably reduce the number of requests needed to get an account or sub-account historical orders/trades.

3 Likes

Hey Dino, thanks for the reply to this issue. You can see many people have problems with this. The websocket doesn’t allow fetching historical data, so if the users app is off or not on the network, there is no way to use that to get the full info of a users orders and trades without hammering the current endpoint.

In practice, the vast majority of endpoint calls return no results, so it’s hugely inefficient. There are ~1300 symbols and climbing, and any given user might have orders across only a very small percentage of those, yet we have no way of predicting what new symbol they might order on next.

Surely a getAllOrders endpoint should be able to return all orders for that user. If it still has the optional “since” timestamp, fromId and result number limits we could get recent results in one call and all results in a handful of calls for the vast majority of users.

Even if it had a big fat Rate limit like only allowing a few calls per minute it would STILL be far faster and involve less server time and load than the current process.

Please consider escalating this issue, it’s the one deal breaker in an otherwise good API.

5 Likes

I truly believe it can’t be that difficult: you have your account, distinguished by e-mail, and somewhere in their databases there must be some sort of relationship between the account ans the spot orders. Thus, you just need to fetch the associated orders.

I believe in you guys, you can do this!

2 Likes

I reckon it’s the ONE main deal breaker to efficient use of the API. Rate limit the hell out of it, its still gonna be 100x quicker than doing the one symbol at a time search where the overwhelming majority of calls return zero, always. Less load on the servers as well I expect.

C’mon Binance Devs, feel our pain, I reckon it could be done in one sprint, let’s have it for an Easter Egg. I bet this endpoint exists already within the Binance internal codebase. You just need to expose it with the right structure and limits in place.

Also, please stop trying to side track the issue by saying to use the websocket. The websocket is no solution to apps that are not always connected (ie vast majority of mobile apps)

Frankly, the only reason I can imagine they haven’t implemented it after so long is a business decision, but I’m blowed if I can see how this helps protect their business. I can see no good technical reason blocking this endpoint change.

9 Likes

This is a +1:pray: for C’mon Binance Devs from me. The rational given for it not being possible to do seems faulty.

The relationship in data model for getting an account’s orders must exist somehow already or you couldn’t find them in the first place. If you need to loop through everything by token to access them then there’s serious issues with how your data is structured. It can’t scale that way for one thing, but I’m sure that’s not the case.

You need to give us a sane way to get a history of all the trades made. It’s a basic requirement and I can’t see how it can be all that difficult. Might be easier to just create a new endpoint specifically for this. I think this would be much appreciated by everyone.

2 Likes

I need to create an app which will listen to a master account and if an order placed in the master account, I will do some business as send sms, email, notification, open another order, etc… I can’t find the api that allow me to listen to master account and send me notification if an order take place…. Can any send me this api account/its signature and if u have any sample code.

I see a nice solution that could be to trigger the Historic data delivery
so the delivery would be streamed via the websocket , in that case Binance could deliver in a speed that fits them .
Other benefit in this way we could drop the origital Rest Api call and get all data via socket.
This Rest call could as suggest be including filters “From Id”/"date/Symbol etc.

Any updates here? It would be great to have an API that can provide the full order/trade history. Along with that if a from_id or paginated query is provided, it would make it much easier to update the local copy as well

I’m also waiting this api to get all orders without pass a symbol

1 Like

looks like it’s going to become 2- 3 times more cumbersome, based on the latest announcement. :frowning: @BNB any chance this process will become leaner? there are quite a bit of steps to do something so common and foundational for each api connection.

in many aspects, the endpoints available are awesome, top notch. However, in a few areas, like this, there seems to be excessive waste of resources for such a common and frequent process, i’m sure you can save plenty of bandwidth/performance (and costs therein) by applying a more efficient (lean) approach. it’s a great api. just trying to provide constructive feedback.

2 Likes