Fetch all account orders

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

@bomb-on, well, extracting the dribblets from the dust log is fairly simple, but an added step nonetheless. The fun stuff starts when you want to start compiling it all into a single ā€œportfolio,ā€ which (if account has any savings activity) requires further tedious steps, other data is simply not accessible via the available API endpoints. hassle-tastic to say the least.

UPDATE: think about investing some time into proper request-weight management system, otherwise it is now an absolute certainty that you will hit your limit every minute of building your trade history

@Binanceā€¦ Thx for making things even more complicated by increasing the API weights! Now itā€™s almost impossible reading the order history.
Having to provide a dedicated symbol is just rubbish from a database perspective. You have to loop through all symbols where you donā€™t even have a complete list if symbols changed or became inactice for some reason. This results in much higher server load than just returning all orders in one result.
Next problem is that the C# implementations of Binance API do not take the weight of a request into account. So you run into the IP ban for sureā€¦

It really makes me thinking if Binance is the right exchange for meā€¦

essential. unbelievable that the first platform in the world does not offer this necessary functionality

Another bump because team binance needs to step up their game

Not being able to query the entire trade history without having to specify a symbol is really a KEY feature missingā€¦ Websockets are clearly no option at the moment as so many before me have stated.

So far Binance has not explained/given a good reason why they would not implement a way of retrieving the past history for all trades without having to specify a symbol. Seems a bit strange to me considering other major exchanges have that feature.

@dino
What about new api endpoint. GET all coins name where data is present. Cached it. When workflow will be quite easy.
GET all coins with data:
Return: [BTCUSDT, DOTETH,ā€¦] Like 100 not 1400 coins mostly.

When fetch only 100 coins using exist end point.

Quite easy to implement for you guys and manage by cache. Using ā€œSETā€ list.

And response from new endpoint will be quite small no more then (1400*coin name length). No need pagination, no need sorting or filtering.

It will cut requests to 10-30 times from now.

Websocket is not the answer. Connections no stable enough to relay only on this. What if server is down and then you restarting you need to fetch everything again to not miss data as it will affect history in the future.

getting All coins have two meaning:
1- get all coins available in wallet (I think you mean this one)
2- get all available coins in binance
in case of first option you can get history for coins you have in your wallet just now
if you traded all your coins you had in your wallet for example in a week ago and convert remaining to bnb (you can get history from dust urls) you can not fetch full history of trades
in case of second option you should loop over all coins (~1400) that is not straight way to fetch trade history
it is a mandatory api for binance to fetch and paginate over all trades over all pairs for an API key that binance is not providing it at least till now

@froxplus nope. I literally mean get all coins where user have any trades record. To skip empty response requests.

sorry, what is this API that you are telling? about retreive USED coins?

I still didnā€™t manage to connect to user_data endpoints (see my first post) BUT when I read your posts :

1 - I agree, this shouldnā€™t be difficult, and would be so usefull
2 - I want to answer to all who says they crawl all symbols that I think of something more efficient : get the user account information from GET /api/v3/account , from which you get the list of all userā€™s symbols, THEN you crawl each owned symbol for historical tradesā€¦ isnā€™t it much better ā€¦?

No, it is not. Unfortunately.

Because /account endpoint doesnā€™t contain info about coins which you had in the past. This is something I also trying to discuss in new topic here: List of assets manipulated (traded) by user

Would be great if account result can have new attribute ā€œlastManipulatedā€. This attribute would be a timestamp which indicates that anytime in the past user had and manipulated with the coin.

Without that, you canā€™t use the current account state.

1 Like

I really need this for my portfolio analysis software. I require the ability to reach my current balance by summing up all my transactions, commissions, savings interest, fiat deposits, dust conversions, etc. Right now itā€™s extremely hard if not impossible. The binance website and mobile app use internal binance APIs that obviously have all this data. Notably, the trade history APIs DO NOT have any required symbol parameters, proving that this ā€œserver loadā€ argument is pure BS.

Thereā€™s also a random 3 month limit to trade history. Beyond this you need to go to the website and MANUALLY download a ton of CSV files in order to import the data and looks like itā€™s not even complete. The whole point of APIs is automation, why even have an API if itā€™s gonna require you to manually download stuff anyway?

2 Likes

A +1 from me for an endpoint like /v3/myHistoricalTrades
without the mandatory ā€œsymbolā€ parameter. That is ridiculous.

And to the rest of the requesters: As a foreigner, why do you use the term ā€œorderā€ instead of ā€œtradeā€ all the time? I do not want a list of my orders (well, the closed ones of course), but a list of my closed orders aka trades. Or am I wrong here?