Order Book
Real-time order books for a specified currency pair.
Subscription Instructions
Subscription Format
Example
Payload Details
Key
Description
Example Code & Order Book Message
const WebSocket = require('ws')
const ws = new WebSocket('wss://ws.sfox.com/ws')
ws.on('open', function() {
const authMessage = {
type: 'authenticate',
apiKey: '<ENTERPRISE_API_KEY>',
enterprise: 'true'
}
ws.send(JSON.stringify(authMessage))
})
// After successful authentication, subscribe to order book feed
const subscribeMsg = {
type: 'subscribe',
feeds: ['orderbook.net.btcusd', 'orderbook.net.ethusd']
}
ws.send(JSON.stringify(subscribeMsg))Last updated