0
votes

I've recently started making calls to Binance API, specifically this: https://api.binance.com/api/v3/ticker/24hr?symbol=BTCBUSD

This call only seems to have 1 parameter (symbol). My question concerns the meaning of the returned fields, or how to interpret them.

Here is a sample of returned data from the above call.

{
"symbol": "BTCBUSD",
"priceChange": "1519.63000000",
"priceChangePercent": "3.308",
"weightedAvgPrice": "47059.10006256",
"prevClosePrice": "45935.14000000",
"lastPrice": "47454.77000000",
"lastQty": "0.08014400",
"bidPrice": "47454.76000000",
"bidQty": "0.00858100",
"askPrice": "47454.77000000",
"askQty": "0.22488900",
"openPrice": "45935.14000000",
"highPrice": "48444.00000000",
"lowPrice": "45044.05000000",
"volume": "18094.48897600",
"quoteVolume": "851510367.30253731",
"openTime": 1614347997320,
"closeTime": 1614434397320,
"firstId": 116330237,
"lastId": 117165845,
"count": 835609

}

What does openPrice and prevClosePrice actually mean? They change between each call.

How does priceChange and priceChangePercent work? What fields are these values calculated from? And why are they markedly different to what I see when viewing Binance site for BTC/BUSD 24 HR period at the same time as I make the call?

Can anyone shed some light on these figures? I've searched online but not been able to find anything descriptive.

When I calculate the price change percent based on the difference between lastPrice and openPrice I get the following result which does match the priceChangePercent value.

((47454.77 - 45935.14) / 45935.14) * 100 = 3.308

1

1 Answers

0
votes

openPrice = last candle started at this price

prevClosePrice = last 2nd candle closed at this price (it must be same with next candles open price)

priceChange = difference between start of the day price and current price (start of the day 00.00 in UTC i guess)

priceChangePercent = same with priceChange but percentage (also you can see in binance symbol lists these things, just order by change)