@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
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 …?
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.
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?
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?
@erzwo to my understanding trade and order are not the same. a trade is a closed order. you could place an order and cancel it -> that one would show up in your order history but not in your trade history. one could say a trade has an effect on your wallet whereas an order not necessarily does
An Order is basically you saying “I want to buy 10 BTC at price 1$”.
A Trade is the actual “transfer” of assets between you and somebody else.
Our example order can have multiple trades, flagged as “PARTIALLY_FILLED”, as follows
Trade1: 3 BTC to X
Trade2: 5 BTC to Y
Trade3: 2 BTC to Z
If Binance Devs are not able to implement this endpoint, a workaround could be endpoint like /traded-symbols, which return all traded symbols. In most cases, it will reduce 1200+ calls to probably 5-100.
They return all orders/trades within a specific date range. We really need this on the public REST API since it’s impossible to fetch historical data via WebSocket, and the only current workarounds involve massive numbers of brute-force requests hitting Binance servers, taking a long time and consuming a lot of computing resources.
+1. This feature must have for exchange, even more for such exchange like Binance, most popular nowadays. Mostly it needs for accounting. Taxes is very actual topic in crypto space currently. So if you don’t wanna lose the clients, would be good to invent this feature.
Hello guys. I am the founder and chief architect of rotki. The opensource portfolio tracking and accounting tool that protects user privacy: https://github.com/rotki/rotki/
Binance is one of our integrations and the experience is terrible. We integrate with many other exchanges and no exchanges forces us to DDOS the exchange in order to simply get user history.
This needs to be fixed to bring the binance API in line with other modern exchange APIs. The api request limit is is reached if for one user an ip tries to query all history. This is insane. Please provide a fix.
We at rotki have a growing userbase of over 4k users at the moment. Each user is making these queries from the local system effectively DOSing your exchange. The way your API is set up you are addinng unnecessary strain to your own servers.
This is definitely a much-needed improvement over what we currently have available!
Right now in order to get a month’s data (Roughly around 50 transactions) for a client who just trades on BTCUSDT I need to make 1300 unnecessary calls, which in theory I can get the job done in just 1 call!
I can’s think of a possible reason as to why the devs at Binance think that putting a required symbol parameter is a good idea. I am ending up unwillingly DDOSing your servers Binance!! Their solution to this? They put even crazier weight limiting on their calls. It’s not our fault that we are spamming your API servers! If you improve the get trades endpoints we would not have to spam your server.