Skip to Content
Price ticks

Subscribe to PRICE_TICKS

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

Send a SUBSCRIBE message naming PRICE_TICKS. The server answers with a SUBSCRIPTIONS confirmation, or an error. Pass the markets you want in instrument_codes, which is required. A further SUBSCRIBE adds instruments to the ones you already receive.

Real-time price updates for the subscribed markets. Each tick represents a single trade execution, including price, quantity and nanosecond timestamp. For each instrument code, a PRICE_TICK_HISTORY holding up to the latest 80 price ticks is sent first.

Code Sample
const payload = {  "type": "SUBSCRIBE",  "channels": [    {      "name": "PRICE_TICKS",      "instrument_codes": [        "BTC_EUR",        "ETH_EUR"      ]    }  ]};const socket = new WebSocket("wss://streams.fast.onetrading.com/");socket.addEventListener("open", () => {  socket.send(JSON.stringify(payload));});

Messages

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

Subscribe to BTC_EUR and ETH_EUR price ticks

{  "type": "SUBSCRIBE",  "channels": [    {      "name": "PRICE_TICKS",      "instrument_codes": [        "BTC_EUR",        "ETH_EUR"      ]    }  ]}

Reply

Receive

Sent back on the same channel.