Understanding market updates through websockets

Hi,

I’m very new to the Binance API and financial systems in general. I made my first API calls yesterday, and I have the following question:

When subscribing to price updates, I get new data at 1Hz with a variable number of symbols in each update through the Binance.Net wrapper I found on GitHub.

I understand these are the symbols whose prices have changed in the last second, but what is the actual value?

Is that the average price of the last second, the “closing price” at the end of the second, or something else?

I didn’t get every price changes that happened during that second. Say if 100 transactions occurred at varying prices on a given symbol during the last second, what value would be sent over the web socket subscription?

What if the price from the previous update was x and varied a lot and then landed back to exactly x at the end of the current second? Would I get a price update for that symbol?

Thanks!
Axel

Hi. There are multiple prices provided in the market streams. Could you point out which market stream are you subscribing to from this document? ( Just give out the stream name will help us understand more about your questions.) https://binance-docs.github.io/apidocs/spot/en/#websocket-market-streams

1 Like

The abstraction I was calling in that first test is named SubscribeToAllSymbolMiniTickerUpdates so from the doc you pointed to probably !miniTicker@arr.

Let me explain them with this example. This is called “24hr rolling window mini-ticker statistics”, the data are collected in 24hrs. Given the symbol BNBBTC, the unit of the price is the quote asset, BTC. That is, if the price is 0.025, 1 BNB equals to 0.025 BTC.

It is possible to have some of OHLC prices unchanged due to the overlapping time span. Every two of the consecutive records from this stream have 23 hr 59 min 59 sec data the same.

{
    "e": "24hrMiniTicker", 
    "E": 123456789,      // Timestamp
    "s": "BNBBTC",       // Symbol
    "c": "0.0025",       // Close price, the last filled price in the past 24hrs
    "o": "0.0010",       // Open price
    "h": "0.0025",       // High price
    "l": "0.0010",       // Low price
    "v": "10000",        // Total traded base asset volume
    "q": "18"            // Total traded quote asset volume
  }