DocsOverview

WebSocket stream

One native WebSocket. Authenticate on connect, wait for ready, subscribe to channels, receive quote and trade frames. No Socket.IO.

Open .md

How it works

  1. Connect

    Open wss://stream.tickerlayer.com/?apiKey=…; the parameter name is exactly apiKey. The key is checked on this upgrade only, never on later frames (Connection, Authentication).

  2. Wait for ready

    The first frame is { "type": "system", "event": "ready" }. Send nothing before it.

  3. Subscribe

    Send a JSON text frame with action, channels and symbols. The server replies with subscribed and, by default, a snapshot.

  4. Receive

    Live quote and trade frames arrive on those channels. Use unsubscribe and ping as needed.

Try it live

Signed in with an active key? Pick an asset and a stream, add up to two symbols, and watch the latest tick update in place.

Try it live

WebSocket playground

Connect with your account key, subscribe to one channel, and watch the latest tick update in place. The key is never shown in this panel.

Idle
Stream

Channel crypto.quotes

Flow: connect → ready → subscribe → live quote / trade frames. Same protocol as production clients.

Latest frame

Connect to see the live tick update here.

Minimal example

The same flow in code. The Quickstart walks through it step by step.

Browser / Node
const ws = new WebSocket(
  "wss://stream.tickerlayer.com/?apiKey=" + encodeURIComponent(rawKey)
);

ws.onmessage = (ev) => {
  const msg = JSON.parse(String(ev.data));
  if (msg.type === "system" && msg.event === "ready") {
    ws.send(JSON.stringify({
      action: "subscribe",
      channels: ["crypto.quotes"],
      symbols: ["BTCUSD"],
    }));
    return;
  }
  console.log(msg); // quote | trade | system | error
};

Supported channels

Asset classChannelsExample
Stocksstocks.quotes stocks.trades stocks.agg stocks.statusUS:KO DE:BMW
Forexforex.quotes forex.tradesEURUSD
Cryptocrypto.quotes crypto.tradesBTCUSD
Indicesindices.quotes indices.tradesUS500
ETFsetfs.quotes etfs.trades etfs.aggUS500ETF
Commoditiescommodities.quotes commodities.tradesXAUUSD
Bondsbonds.quotesUS:10Y
Perpetualsperpetuals.quotes perpetuals.marks perpetuals.tradesXAUUSDT
Futures CFDsfutures.quotesWTIUSD.C1 XAUUSD.DEC26
stocks.agg
Settled US OHLCV bars, from 1 minute to 1 day.
etfs.agg
The same settled bars for US-listed ETFs, with ETF access.
stocks.status
US trading halt and resume events.
bonds.quotes
The latest daily yield on subscribe, then one frame per new observation.
perpetuals.*
Composite top of book, mark price and trades, streamed on the Perpetuals Business plan.
futures.quotes
Contract months, the C1-C3 chain and roll series, for accounts with Futures CFDs.
Forex raw line
SYMBOL.RAW streams a single-venue line; see Forex.

Symbols come from the same registries as REST, and each channel needs its asset class on your plan.

Deeper reference