Stream
WSS
wss://api.tickerbot.io/ v2/ streamHold a socket open and receive each subscribed ticker's freshly-computed row the moment the minute refresh turns it over.
Server messages
authedKey accepted. Carries your resolved plan. **Wait for this ack before sending subscribe** — a frame that arrives while auth is still resolving is rejected with
auth_required, so sending auth and subscribe back-to-back in onopen races.subscribedAcks a subscribe. Returns count (distinct tickers on the account), plus rejected (over cap), invalid (malformed symbols) and dropped_fields when present.
updateOne ticker's new row: { ticker, as_of, data }. One per subscribed ticker per minute turnover.
unsubscribedAcks an unsubscribe frame.
pongReply to a ping frame.
Error frames
auth_requiredFirst message was not a valid auth frame and no Bearer header was sent. The socket closes.
auth_timeoutNo credential arrived within 10 seconds of connecting. The socket closes (1008).
unauthenticatedMalformed, unknown, or revoked API key.
bad_jsonA frame was not valid JSON.
unknown_typeA frame's
type is not one of auth/subscribe/unsubscribe/ping.bad_requesttickers missing or empty, or more than 200 symbols in one subscribe frame.
subscription_limitYou are subscribed to N of M tickers on your plan. Unsubscribe some or upgrade to add more. Over-cap tickers come back in the subscribed ack's rejected list (the error frame arrives before the ack). On Free the cap is 0, and the frame carries
plan and upgrade_url.too_many_connectionsMax 5 concurrent stream connections per account, pooled across every API key on the account. An abuse guard, not a plan limit.
connection_closedThe connection was closed server-side while a frame was in flight.
internalUnexpected server error; the socket closes with 1011.
Notes
- An
updateframe carries the same record asGET /v2/tickers/{ticker}. Per-minute during US market hours (4 AM–8 PM ET), equities and ETFs; the feed is quiet when the market is closed. - Caps are per ACCOUNT, not per API key. Concurrent distinct tickers are pooled across every live connection your account holds, so issuing additional keys grants no additional capacity, and two connections subscribed to the same symbol cost one slot. Unsubscribing or disconnecting frees slots immediately — it is a live gauge, not a consumption meter. Check current consumption with
GET /v2/stream/usage. - Authenticate with
Authorization: Bearerat the handshake, or send an auth frame as the first message —{type:"auth", api_key}, or{type:"auth", id_token}from a signed-in browser session. Authenticate within 10 seconds or the socket closes with1008. - Client frames:
{type:"auth", …},{type:"subscribe", tickers, fields?},{type:"unsubscribe", tickers},{type:"ping"}. A partially-rejected subscribe emits itserrorframe *before* thesubscribedack it refers to. - Subscribe validates symbol *shape* only: an unknown but well-formed symbol acks cleanly, consumes a cap slot, and simply never emits an update. Malformed symbols come back in the ack's
invalidlist. - Keepalive and backpressure: the server pings every 30 seconds and terminates unresponsive peers. A slow consumer with over 4 MB buffered silently loses the rest of that tick's updates; past 16 MB the socket closes with
1013. - Close codes:
1008policy/auth (bad key, auth timeout, connection cap),1011internal error,1013slow consumer.