Skip to Content
Mark price

Subscribe to MARK_PRICE

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

Send a SUBSCRIBE message naming MARK_PRICE. The server answers with a SUBSCRIPTIONS confirmation, or an error. instrument_codes is optional: leave it out to receive every futures instrument. A new SUBSCRIBE replaces the previous selection. The current mark prices are sent straight after the confirmation.

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 payload = {  "type": "SUBSCRIBE",  "channels": [    {      "name": "MARK_PRICE"    }  ]};const socket = new WebSocket("wss://streams.fast.onetrading.com/");socket.addEventListener("open", () => {  socket.send(JSON.stringify(payload));});

Messages

A connection has one MARK_PRICE selection: every instrument, or a list. A new SUBSCRIBE replaces it, so you never receive a mark twice.

application/json
  1. payload
type*string
channels*array<>
Items1 <= items <= 1

Every futures instrument

{  "type": "SUBSCRIBE",  "channels": [    {      "name": "MARK_PRICE"    }  ]}

Reply

Receive

Sent back on the same channel.