Skip to Content
Book ticker

Subscribe to BOOK_TICKER

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

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

Real-time best bid and ask prices, with their quantities, for the instruments you subscribe to. A lightweight alternative to ORDER_BOOK for strategies that rely on top-of-book information. A BOOK_TICKER_SNAPSHOT with the current top of the book is sent for each instrument when you subscribe.

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

Messages

instrument_codes is required: a missing or empty list is rejected with INVALID_INSTRUMENT_CODES_LIST.

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

Subscribe to BTC_EUR and ETH_EUR top of book

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

Reply

Receive

Sent back on the same channel.