How to get complete Trade/Income History? (API)

I cant find a clear information about how to get the full history of everything that affected an account’s balance through the API.

What I mean is: I want a full list which, when all rows are added together, returns the current balance for spot, futures etc (in each coin of course).

Any help on this would be greatly appreciated.

PS: I realise this might not the possible through just one endpoint. I just tried to explain my question in the most simple way possible. Feel free to post a full list of required endpoints.

Impossible. Binance do not share some important information related to coin balance history.

I am currently trying to compile said list through a variety of API endpoints for a little Python project myself, and right now it seems pretty much impossible because of mainly two points:

  • You currently can’t get FIAT deposit or withdraw history through the corresponding endpoint (see this forum post), so from the start you don’t know the initial balance your trades are made with
  • It’s extremely hard/expensive to get all trades a user ever made. Fetching order history is only possible for each individual symbol (trading pair), not multiple at the same time. This leaves you with having to loop through every single symbol the user might have ever made a transaction with, which of course returns more zeroes than anything else and has a weight of 10 for every symbol, meaning it takes forever (see this forum post).

Additionally to these points, I am not quite sure how the API shows transfers from your Spot wallet to your Savings wallet or vice versa, especially when it comes to Locked Staking since this balance is impossible to request even directly (see this forum post).

Two endpoints you would definitely need (besides those listed above) would be the Dust Log for dust conversions and the Interest History for Binance Savings products and the Asset Dividend Record for… something else. Honestly, I can’t quite tell what the difference between the two is.

So all in all, I am pretty certain that with the current state the API is in, what we’re trying to achieve is as impossible as @tmm mentioned.
It would be nice if Binance took the criticism in the linked threads to heart and considerably improved their API when it comes to fetching historical data - this is extremely important for analytics and taxes and I am honestly disappointed by the API considering how good the other apps and services offered by Binance are.
I hope the API will be improved in the future to make such supposedly simple tasks possible, since other, smaller exchanges seem to be able to offer such endpoints without issues.