Order Book

Real-time streaming order book data

Real-time order books for a specified currency pair.

Subscription Instructions

Authentication required. Please refer to the WebSocket Authentication page here for more details.

Order Book Types

sFOX provides the following order book variations

Payload Details

Subscriptions to the order book will receive full order book snapshots for the pair. sFOX does not support sending changes at this time.

Example Code & Order Book Message

const WebSocket = require('ws')

const ws = new WebSocket('wss://ws.sfox.com/ws')

ws.on('message', function(data) {
    console.log(data);
});

ws.on('open', function() {
  const subscribeMsg = {
    type: 'subscribe',
    feeds: ['orderbook.sfox.ethbtc']
  }
  ws.send(JSON.stringify(subscribeMsg));
});

Last updated