Websocket Channel for Latest Mark Price
Description
Interval: 1s
Request
{"event": "subscribe", "arg": [{ "channel": "markprice", "sym":"OKX_SPOT_BTC_USDT" }]}
| Field name | Type | Necessary | Remarks |
|---|---|---|---|
| event | String | Y | subscribe / unsubscribe |
| args | Array | Y | Subscribe param. There can be no more than 50 sym parameters per subscribe. |
| > channel | String | Y | Channel name: markprice |
| > sym | String | Y | Unique identifier |
Response
{"event":"subscribe","arg":[{"channel":"markprice","sym":"BINANCE_PERP_BTC_USDT"}],"code":0,"message":"Success"}
| Field | Type | Remarks |
|---|---|---|
| event | String | subscribe / unsubscribe |
| code | String | Error Code |
| msg | String | Error Message |
| args | Array | Subscribe param |
| > channel | String | Channel name: markprice |
| > sym | String | Unique identifier |
Data Sample:
{
"arg":{
"channel":"markprice",
"sym":"BINANCE_PERP_BTC_USDT"
},
"data":{
"price":"93329.9",
"markpx":"93325.57553788",
"indexprice":"93293.46136364",
"fundingrate":"0.00010000",
"currentcycle":"1732118400000",
"nextcycle":"0",
"ts":"1732093896000"
}
}
| Field | Type | Remarks |
|---|---|---|
| > channel | String | markprice |
| > sym | String | Unique identifier |
| data | Array | Data |
| > markpx | String | Market Price |
| > indexpx | String | Index Price |
| > fundingrate | String | Current funding rate |
| > currentcycle | String | starting timestamp of current cycle |
| > nextcycle | String | starting timestamp of next cycle |
| > ts | String | Timestamp, in Unix millionsecond. e.g. 1732093591811 |
