Ticker

Real-time streaming day OHLCV data and last trade

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 exchanges that are active on the sFOX platform.

Subscription Instructions

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

Subscription FormatExample

ticker.sfox.<basequote>

ticker.sfox.btcusd

Payload Details

KeyDescription

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 & Ticker 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: ['ticker.sfox.btcusd']
  }
  ws.send(JSON.stringify(subscribeMsg));
});

Last updated