Hi folks,
Is there an API I can call to get the volume for a particular pair, separated into buy volume and sell volume? For example, if I wanted to trade btc, and I wanted to know how much was bought and how much was sold, in the past second / 5 seconds / 1 minute etc, is there a way to do that?
Hey,
Do you mean how much was bought or sold by one user?
Otherwise, when there is a trade, a user bought from another one who sold a symbol or a trading pair.
To get the volume of recent trades, you can use the spot kline endpoint: Binance API Documentation
Hi Albin,
Thanks for your message.
Ideally I’d like a total of how much btc (for example) was bought by all users in the past x period of time, and how much was sold. Two separate figures. Various exchanges often present it as buy volume and sell volume (but usually over a 24 hour period, whereas I want it more granular than that).
Would you know how I can get those figures?
Thanks for your help, much appreciated.