Ticker

Real-time streaming day OHLCV and last trade data

Receive aggregated 24-hour OHLCV data from all supported exchanges and the last price before each update every 3 seconds.

Subscriptions to the ticker feed will receive realtime trades that occur on any of the liquidity venues that are active on the sFOX platform.

Subscription Instructions

Subscription Format
Example

ticker.sfox.<basequote>

ticker.sfox.btcusd

Payload Details

Key
Description

amount

Quantity of the most recent trade on this pair

exchange

Location of the most recent trade on this pair

last

Price of the most recent trade on this pair

high

High price since 00:00:00 GMT

low

Low price since 00:00:00 GMT

open

Open price at 00:00:00 GMT

pair

Currency pair

source

Data source

timestamp

Time of the trade

volume

Volume traded since 00:00:00 GMT (base currency)

vwap

Volume-weighted average price since 00:00:00 GMT

Example Code & Trades 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 ticker feed
const subscribeMsg = {
  type: 'subscribe',
  feeds: ['ticker.sfox.btcusd', 'ticker.sfox.ethusd']
}

ws.send(JSON.stringify(subscribeMsg))

Last updated