Docs
Product 4

WebSocket Streaming

Subscribe to live, normalized trade updates over one WebSocket, with an instant snapshot on subscribe and strictly ordered ticks.

WSSwss://api.apextick.com/v1/market/streamTrader Pro+

Open one connection, authenticate with the apikey header, and subscribe to the symbols you need. ApexTick pushes a normalized trade message whenever an instrument's state changes.

Plan limits

PlanConcurrent symbols
HobbyistNot included: the connection is refused with 403
Trader Pro10
Quant & Community50
Enterprise200

The limit counts distinct symbols per API key across all of your open connections. Subscribing to the same symbol on two connections uses one slot.

Connect and subscribe

Send JSON frames with an action and a list of symbols:

JSON
{ "action": "subscribe", "symbols": ["AAPL", "NVDA", "BTC-USD", "EURUSD=X"] }
JSON
{ "action": "unsubscribe", "symbols": ["EURUSD=X"] }

You can subscribe and unsubscribe at any time on the same connection.

Messages

Trade updates

JSON
{ "type": "trade", "symbol": "BTC-USD", "price": 67412.5, "volume": 12, "timestamp": "2026-10-16T14:30:05Z" }
FieldDescription
typeAlways trade for market updates.
symbolThe instrument, in the notation you subscribed with.
priceLast price.
volumeVolume reported with the update.
timestampEvent time of the update (UTC).

Errors

Refused requests arrive as error frames. When a subscription would exceed your plan's limit, the symbols that didn't fit are listed and the rest of the request still succeeds:

JSON
{ "type": "error", "message": "Concurrent symbol limit reached for current plan (10)", "symbols": ["AMD", "TSLA"] }

Delivery guarantees

  • Snapshot on subscribe. When you subscribe to a symbol that already has a known state, its latest trade frame is sent immediately, so your client never starts from a blank screen. Then live updates follow.
  • Monotonic ordering. Updates for a symbol never go back in time: an update older than the last one delivered is dropped.
  • No duplicates. An update is only sent when the state changes: a newer event time, or more volume at the same time. Identical states are not repeated.
  • Freshness. Crypto, select futures and benchmark forex pairs are real-time; equities stream active intraday snapshots, refreshed continuously while the market is open.

Examples

Browsers can't set custom headers on WebSocket connections, so connect from your server and fan updates out to your frontend.

Shell
npx wscat -c wss://api.apextick.com/v1/market/stream -H "apikey: $APEXTICK_API_KEY"
# Once connected, type:
# {"action":"subscribe","symbols":["AAPL","NVDA","BTC-USD"]}
Reconnect and re-subscribe

Subscriptions belong to a connection. After a reconnect, send your subscribe frame again; the snapshot-on-subscribe behavior gives you the latest state immediately.