Skip to main content
The live stream pushes two kinds of events over one WebSocket:
  • Trades: every trade of your users’ verified wallets the moment it is indexed, with the trader’s CabalSpy ID profile. It is the live version of Latest trades and sends the same trade objects.
  • Theses: every new thesis, reply, reaction and removal, on all tokens or on one token. Theses are public, so these events are not limited to your users.
The stream is included from the Pro plan. Instances in development or sandbox mode can use it for testing.
For theses only, use the dedicated theses stream: it is included on every plan, lets you subscribe to up to 200 tokens per connection and supports the instance reach.

Connecting

Open a WebSocket and pass your API key as the api_key or apiKey query parameter, or as an Authorization Bearer header. Choose what you receive with events. There is nothing else to subscribe to, the connection starts streaming right away.
string
required
Your API key. api_key works too, or an Authorization Bearer header.
string
default:"trades"
trades, theses or trades,theses.
string
Only events on this chain. One of solana, bnb, base, eth, rh. Empty means every chain.
string
Only thesis events of this token. Needs blockchain. Trades are not filtered by mint.
string
default:"instance"
global streams trades of every CabalSpy ID user. Enterprise plan only.
string
Your Instance ID. Only needed when your account has several instances.

Messages

Every message is a JSON object with an event field.
subscribed
trade
heartbeat
error

Thesis events

Thesis events carry blockchain and mint in data next to the fields of the post. thesis and thesis.reply contain the full object as in List theses.
thesis
thesis.reaction
thesis.removed
Client-side apps without an API key can follow one token’s theses on the public websocket of the browser API.

Staying connected

Send the text ping at any time to check the connection, the server answers with pong. When you send nothing for 30 seconds, the server sends a heartbeat. At the same time it picks up users who joined or left your instance and checks that your key is still valid. A revoked or disabled key ends the connection. Reconnect with a short backoff when the connection drops, and use Latest trades or List theses to fill any gap.

Limits and errors

Each API key can hold at most 5 stream connections at once.