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.