- 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.
Connecting
Open a WebSocket and pass your API key as theapi_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.
Messages
Every message is a JSON object with anevent field.
subscribed
trade
heartbeat
error
Thesis events
Thesis events carryblockchain 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
Staying connected
Send the textping 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.

