How to get the sum value from the Future Orderbook API?

I’ve been going around the communities to find one answer. Where is Binance getting the sum(BTC) value in /future/btcusdt?

I know that it’s a duplicate with Replicate the size and sum of the order book using the binance API this post, but in this post, it’s not giving the correct answer.

According to the API guide (Binance API Documentation), the orderbook is only returning the price and the size. I got the Orderbook working, and I made sure that the price and size is synchronizing with the Binance site, but I have no clue for finding the sum value…

The sum field is the summation of the size of all levels shallower than the current level, inclusive. Therefore the sum of 19770.3 is equal to 21.824 + 1.889 + 3.518 = 27.231. The shallowest price level’s sum will always be equal to it’s size.

1 Like