Inconsistent result in SPOT snapshot /sapi/v1/accountSnapshot

Hi,

When calling the /sapi/v1/accountSnapshot endpoint I get what I think is an incorrect figure in the totalAssetOfBtc property for the updateTime of 1614902399000 (2021-03-04 23:59:59). Could someone help me by checking their own balances and telling me whether this is a site wide problem or if it is particular to me?

To test:
Make an authenticated call with these parameters (you need to add the signature etc):
GET https://api.binance.com/sapi/v1/accountSnapshot?limit=5&startTime=1614815999000&type=SPOT

You should get 5 days of snapshots back starting with 1614815999000 (2021-03-03 23:59:59). Check that the totalAssetOfBtc is as expected for all days returned. In my case updateTime 1614902399000 only shows my actual BTC holding, not the BTC equivalent balance of all my coins in my spot wallets. On all other snapshots it shows the full equivalent value of BTC for all coins.

Thanks in advance!

thank you for your feedback, we will forward to team for review.

1 Like

Thanks @dino. Did you try the call and find you have the same problem?

Thanks!

It should be fixed now. Please try again.

Nov 2021 the problem is still there I get massively incorrect btc values…sometimes the snapshot also claims I have no coin balances or even any coins at all…I totally gave up on snapshot and just pulled the data from a different part of my app that is monitoring my available balances…

If it does actually get fixed in the future I hope this thread will get updated again…

I have the same problem. When something in the spot wallet on the exchange has changed since the previous day (eg order triggered of cancelled, deposit, withdrawal,…), the snapshot of the current day is deleted and then rebuilt over the course of several hours, during which the API returns an incorrect anwer.
For me, this happens during the morning.

Imagine that I have 20 coins including 1 ETH and during the night an order has triggered to buy an additional 1 ETH.

Checking my wallet on the website the next morning, will correctly report that I now have 20 coins, including 2 ETH.

However, early in the morning, the API will say that I have 20 coins, including only 1 ETH, thus not reflecting the additional 1 ETH that was bought during the night.

At some point, the last snapshot will be deleted and the API returns not 5 snapshots, but 4.

After that, depending on how much time has passed, the API will return an increasing number of coins, with a totalBTC value that is the sum of the coins that the API has found so far.

Thus at first, the API will say that I have 1 coin, and the totalBTC value will be the BTC value of this 1 coin.

When I call the API again a few minutes later, the API will return 2 or 3 coins, with a matching totalBTC value.

20 minutes later, the API will return even more coins. And so on.

Until 5-6 hours later, the API will finally return the entire contents of the spot wallet, this time correctly reporting 2 ETH.

For me this means that before 2pm the API does not return a reliable overview of the spot wallet.

api/v3/account however seems to return the correct state of the spot wallet at all times.

I contacted support several times, but it takes many hours for them to respond, so by the time I get to talk to them (the evening), the snapshot is correct, and they don’t believe there is a problem because they can’t verify it.

Hi @abadstart, can you share your use case in the following format for easier understanding please:

  • Full request URL in query string (including parameters):

  • The expected respective response:

  • The received response instead:

( Note that the snapshot is taken at 23:59:59 of previous day and with type=“SPOT” is expected to not return data from Margin/ Futures/ Funding / Earn/ Pool and others. )

Hi @aisling, not sure what you want me to do. The responses are json files, but as far as I can tell, I’m not allowed to upload anything but pictures.

I might be using the wrong API for what I want to achieve. The documentation does not describe what the APIs do, so I was guessing that this API would give me an overview of the contents of my spot wallet. But Support suggested that I use api/v3/account, and that API seems to give me the response I was hoping for.

I’m living in UTC+7 timezone, which could explain why the 5th snapshot initially (= before 7am) does not include any changes to my wallet that were made the previous day. The fact that the snapshot is taken just before midnight might also explain why the 5th snapshot is absent from responses of API calls just after my 7am.

But it still doesnt explain why building up a new 5th snapshot takes an entire morning.

The request:

TIMESTAMP=date +%s%3N
PARAMS=“recvWindow=50000&timestamp=”$TIMESTAMP
SIG=echo -n $PARAMS | openssl dgst -sha256 -hmac "$SECRET" | tail -c 65

echo curl -s -H "X-MBX-APIKEY: $APIkEY" -X GET 'https://api.binance.com/api/v3/account?'$PARAMS'&signature='$SIG

I verified the results of the cURL call with Postman, the results are the same.

What I expect,

snapshot1	    snapshot2	    snapshot3	    snapshot4	    snapshot5
coin1,amount	coin1,amount	coin1,amount	coin1,amount	coin1,amount
coin2,amount	coin2,amount	coin2,amount	coin2,amount	coin2,amount
coin3,amount	coin3,amount	coin3,amount	coin3,amount	coin3,amount
coin4,amount	coin4,amount	coin4,amount	coin4,amount	coin4,amount
coin5,amount	coin5,amount	coin5,amount	coin5,amount	coin5,amount
coin6,amount	coin6,amount	coin6,amount	coin6,amount	coin6,amount
coin7,amount	coin7,amount	coin7,amount	coin7,amount	coin7,amount
				
What I get instead,

After 7am,
				
snapshot1	    snapshot2	    snapshot3	    snapshot4	    snapshot5        
coin1,amount	coin1,amount	coin1,amount	coin1,amount	
coin2,amount	coin2,amount	coin2,amount	coin2,amount	
coin3,amount	coin3,amount	coin3,amount	coin3,amount	
coin4,amount	coin4,amount	coin4,amount	coin4,amount	
coin5,amount	coin5,amount	coin5,amount	coin5,amount	
coin6,amount	coin6,amount	coin6,amount	coin6,amount	
coin7,amount	coin7,amount	coin7,amount	coin7,amount	
				
				
Some time later,				
				
snapshot1	    snapshot2	    snapshot3	    snapshot4	    snapshot5
coin1,amount	coin1,amount	coin1,amount	coin1,amount	
coin2,amount	coin2,amount	coin2,amount	coin2,amount	coin2,amount
coin3,amount	coin3,amount	coin3,amount	coin3,amount	
coin4,amount	coin4,amount	coin4,amount	coin4,amount	
coin5,amount	coin5,amount	coin5,amount	coin5,amount	
coin6,amount	coin6,amount	coin6,amount	coin6,amount	
coin7,amount	coin7,amount	coin7,amount	coin7,amount	
				
				
Some time later,				
				
snapshot1	    snapshot2	    snapshot3	    snapshot4	    snapshot5
coin1,amount	coin1,amount	coin1,amount	coin1,amount	
coin2,amount	coin2,amount	coin2,amount	coin2,amount	coin2,amount
coin3,amount	coin3,amount	coin3,amount	coin3,amount	
coin4,amount	coin4,amount	coin4,amount	coin4,amount	
coin5,amount	coin5,amount	coin5,amount	coin5,amount	coin5,amount
coin6,amount	coin6,amount	coin6,amount	coin6,amount	
coin7,amount	coin7,amount	coin7,amount	coin7,amount	
			
	
Some time later,				
							
snapshot1	    snapshot2	    snapshot3	    snapshot4	    snapshot5
coin1,amount	coin1,amount	coin1,amount	coin1,amount	
coin2,amount	coin2,amount	coin2,amount	coin2,amount	coin2,amount
coin3,amount	coin3,amount	coin3,amount	coin3,amount	
coin4,amount	coin4,amount	coin4,amount	coin4,amount	coin4,amount
coin5,amount	coin5,amount	coin5,amount	coin5,amount	coin5,amount
coin6,amount	coin6,amount	coin6,amount	coin6,amount	
coin7,amount	coin7,amount	coin7,amount	coin7,amount	
				
				
Some time later,				
				
snapshot1	    snapshot2	    snapshot3	    snapshot4	    snapshot5
coin1,amount	coin1,amount	coin1,amount	coin1,amount	
coin2,amount	coin2,amount	coin2,amount	coin2,amount	coin2,amount
coin3,amount	coin3,amount	coin3,amount	coin3,amount	
coin4,amount	coin4,amount	coin4,amount	coin4,amount	coin4,amount
coin5,amount	coin5,amount	coin5,amount	coin5,amount	coin5,amount
coin6,amount	coin6,amount	coin6,amount	coin6,amount	
coin7,amount	coin7,amount	coin7,amount	coin7,amount	coin7,amount
				
				
Some time later,				
				
snapshot1	    snapshot2	    snapshot3	    snapshot4	    snapshot5
coin1,amount	coin1,amount	coin1,amount	coin1,amount	
coin2,amount	coin2,amount	coin2,amount	coin2,amount	coin2,amount
coin3,amount	coin3,amount	coin3,amount	coin3,amount	
coin4,amount	coin4,amount	coin4,amount	coin4,amount	coin4,amount
coin5,amount	coin5,amount	coin5,amount	coin5,amount	coin5,amount
coin6,amount	coin6,amount	coin6,amount	coin6,amount	coin6,amount
coin7,amount	coin7,amount	coin7,amount	coin7,amount	coin7,amount
				
				
Some time later,				
				
snapshot1	    snapshot2	    snapshot3	    snapshot4	    snapshot5
coin1,amount	coin1,amount	coin1,amount	coin1,amount	coin1,amount
coin2,amount	coin2,amount	coin2,amount	coin2,amount	coin2,amount
coin3,amount	coin3,amount	coin3,amount	coin3,amount	
coin4,amount	coin4,amount	coin4,amount	coin4,amount	coin4,amount
coin5,amount	coin5,amount	coin5,amount	coin5,amount	coin5,amount
coin6,amount	coin6,amount	coin6,amount	coin6,amount	coin6,amount
coin7,amount	coin7,amount	coin7,amount	coin7,amount	coin7,amount
				
				
And finally, around noon,				
				
snapshot1	    snapshot2	    snapshot3	    snapshot4	    snapshot5
coin1,amount	coin1,amount	coin1,amount	coin1,amount	coin1,amount
coin2,amount	coin2,amount	coin2,amount	coin2,amount	coin2,amount
coin3,amount	coin3,amount	coin3,amount	coin3,amount	coin3,amount
coin4,amount	coin4,amount	coin4,amount	coin4,amount	coin4,amount
coin5,amount	coin5,amount	coin5,amount	coin5,amount	coin5,amount
coin6,amount	coin6,amount	coin6,amount	coin6,amount	coin6,amount
coin7,amount	coin7,amount	coin7,amount	coin7,amount	coin7,amount