Balance a coin in the Spot account

I want to balance a coin in the Spot account, for example: BTC
To find out if I am accumulating or losing this coin on my trades.

My idea:

Add all deposits in this coin, subtract from withdrawals, then compare with the current balance: Deposits - Withdrawals - Current balance = Real net BTC

I’m using these endpoints:
#deposit-history-user_data
#withdraw-history-user_data
#all-coins-39-information-user_data

But the Deposit and Withdrawal endpoints do not support more than 3 months of request history. So I will have to request several times until I get all the history.

I wanted a simpler solution:

1 This claculation is ready: Deposits - Withdrawals - Current balance = Real net BTC
Or
2 A complete list of Deposits and Withdrawals available in a single application, just as it works in the Binance application.

sorry I can’t understand what’s the difference between current balance and Real net BTC. Are they the same thing?

Deposit balance = Sum of all deposits in your wallet
Current balance = Current value in your wallet

Account balance = Deposit balance - Current balance

Example:
I deposited a total of 1 BTC
I made some trades
Today I have 1.5BTC
Account balance = 0.5BTC (+ 50%)

It’s easy for me to understand, for spot, Account balance is current value in your wallet.

and Deposit balance - Account balance = trading profit

This endpoint is better!
https://binance-docs.github.io/apidocs/spot/en/#account-information-user_data

1 Like

Thank you.

But this endpoint does not have this information.
It also doesn’t have the updated information for the current day.

I will have to make several requests since the founding of Binance in 2017 to ensure that I get all deposit and withdrawal data from the account / wallet.

There would have to be a simpler method, as shown on the Binance App Deposits and Withdrawals screen, without a date filter, it always brings everything and with infinite scrolling through a “limit” parameter for the amount of records.

That, but we still have to discount the withdrawals to be.

i have same issue, yet you can retrieve the balance of assets, but its in their native form i.e. 0.25 Eth will show that, but i think the person ants hat i want as well which is similar to what we see in Spot Wallet summery, i.e. the equivalent BTC value at the time and/or total wallet BTC amount summary , the coding required to do this increases lag time i.e. get all balances, then find out which coins they are, get the right coin pair to get a the BTC value equivalent then store that in a variable and then add up for each asset, if you can give asset balance in btc equivilent at the time as well as total spot and fiat summary that would be great