Skip to Content
Mark price

Mark price updates

Receive
/
Serverwss://streams.fast.onetrading.com

One MARK_PRICE_UPDATE per instrument straight after you subscribe, then every 5 seconds on the clock. An instrument whose mark price is missing, or more than 10 seconds old, gets no message until a current one is available.

The mark price of futures instruments, every 5 seconds. Only futures instrument codes (e.g. BTC_USD_P) have a mark price; a spot instrument code is rejected.

Code Sample
const socket = new WebSocket("wss://streams.fast.onetrading.com/");socket.addEventListener("message", (event) => {  console.log(event.data);});

Messages

One is sent per instrument straight after you subscribe, then every 5 seconds, on the clock (:00, :05, :10, …). An instrument whose mark price is missing, or more than 10 seconds old, gets no message until a current one is available.

application/json
  1. payload
channel_name*string

MARK_PRICE.

time*integer

Nanosecond timestamp of when the message was sent.

Formatint64
type*string

MARK_PRICE_UPDATE.

instrument_code*string

The futures instrument, e.g. BTC_USD_P.

data*
btcUsdPerp

BTC_USD_P mark price

{  "channel_name": "MARK_PRICE",  "time": 1762700000123456800,  "type": "MARK_PRICE_UPDATE",  "instrument_code": "BTC_USD_P",  "data": {    "time": 1762700000000000000,    "mark_price": "101234.5",    "index_price": "101230.1",    "tier": "ANCHORED",    "session": true  }}