tickstreamdocs

DOCS

WebSocket stream

A persistent WebSocket delivers every tick the moment it prints. Subscribe, unsubscribe, and reconnect with confidence.

Streaming is a single long-lived WebSocket connection. Open it once, subscribe to the symbols you care about, and ticks arrive as compact JSON frames. The SDKs wrap all of this — heartbeats, backpressure and reconnection — behind a simple iterator.

Connect & subscribe

from tickstream import Tickstream

ts = Tickstream("sk_live_…")
for tick in ts.stream("ES", "NQ"):
    print(tick["symbol"], tick["price"], tick["size"], tick["ts"])
import { Tickstream } from "@tickstream/client";

const ts = new Tickstream("sk_live_…");
for await (const tick of ts.stream("ES", "NQ")) {
  console.log(tick.symbol, tick.price, tick.size, tick.ts);
}
use tickstream::{Client, Channel};

let ts = Client::new("sk_live_…");
let mut s = ts.stream(Channel::Ticks, &["ES", "NQ"]).await?;
while let Some(t) = s.next().await {
    println!("{} {} {}", t.symbol, t.price, t.size);
}
import ts "github.com/Alx90s/tickstream-go"

c := ts.New("sk_live_…")
ticks, errs := c.Stream(ctx, ts.Ticks, "ES", "NQ")
for t := range ticks {
    fmt.Println(t.Symbol, t.Price, t.Size)
}
# connect, then send a subscribe frame
wss://stream.tick-stream.xyz/v1/stream?key=sk_live_…

{ "op": "subscribe", "channel": "ticks", "symbols": ["ES", "QQQ", "SPX"] }

Subscribe frame

On a raw connection, send a JSON control frame after the socket opens:

FieldTypeDescription
opstringsubscribe or unsubscribe.
channelstringticks, book (L2), l3 (market-by-order) or options.
symbolsstring[]One or more symbols, e.g. ["ES","NQ"].
all on one channel

The ticks channel serves every symbol — futures (ES, NQ…), ETFs (QQQ, SPY…) and indices (SPX, VIX…). Futures give real trade prints (with a side); ETFs give live quotes; indices give the live level (size is 0, side is "unknown").

The tick message

Every trade prints a tick frame:

{
  "type": "tick",
  "symbol": "ES",
  "price": 5283.25,
  "size": 3,
  "side": "buy",
  "exch": "CME",
  "ts": 1749556800
}
FieldTypeDescription
symbolstringThe instrument, e.g. ES.
pricenumberTrade price.
sizenumberContracts traded.
sidestringAggressor side: buy or sell.
exchstringOriginating exchange (always CME today).
tsintegerExchange timestamp in Unix seconds.

Heartbeats & reconnection

The server sends a {"type":"ping"} every 15 seconds; reply with {"op":"pong"} (the SDKs do this for you). If the connection drops, reconnect and re-send your subscribe frame — there's no penalty for reconnecting, and the SDKs resubscribe automatically.

tip

Need depth instead of trades? Subscribe to the Level 2 book channel, or go order-by-order with L3. Need to seed history before going live? Use the REST backfill.