WebSocket Protocol
The live protocol exposes 13 channel families for agent observation loops.
Connection
wss://api.conyr.ai/wsRequires Authorization: Bearer <key>. The Free tier is rejected — /ws is a paid feature.
Per-tier connection caps apply (connections per key: Free 0, Layer 1 5, Layer 2 20, Layer 3 50, Enterprise unlimited), with a max of 50 subscriptions per connection.
Channel access is also tier-gated: a key below a channel’s tier (Market data = Layer 1, Wallet activity = Layer 2, Security & Coordination v2 = Layer 3) receives a non-fatal op:error when it tries to subscribe, while other channels in the same batch still succeed.
Message Format
All messages are JSON. Discriminated by the op field for control messages, or channel + data for events.
Client -> Server
Subscribe
{"op": "subscribe", "channels": ["token:<mint>:trades"]}Unsubscribe
{"op": "unsubscribe", "channels": ["token:<mint>:trades"]}Ping
{"op": "ping"}Server -> Client
Subscription confirmed
{"op": "subscribed", "channels": ["token:<mint>:trades"]}Unsubscription confirmed
{"op": "unsubscribed", "channels": ["token:<mint>:trades"]}Pong
{"op": "pong"}Error
{"op": "error", "message": "Subscription limit reached (max 50)"}Data event
{"channel": "token:<mint>:trades", "data": { ... }}Channel Naming
Market data
| Pattern | Description |
|---|---|
token:<mint>:trades | Live trade tape |
token:<mint>:ticks | Chart tick events |
token:<mint>:ohlcv:<view>:<tf> | OHLCV updates |
Wallet activity
| Pattern | Description |
|---|---|
wallet:<address>:pnl | Realized PnL events |
wallet:<address>:positions | Position open/update/close |
wallet:<address>:labels | Label and badge state changes |
Security
| Pattern | Description |
|---|---|
token:<mint>:security | Token security events (bundle detected, wash trade, rug, coordination alert) |
token:<mint>:bundles | Raw per-token BundleV2 state updates |
token:<mint>:dump_alert | Compact qualifying dump-start alert with bundle evidence |
wallet:<address>:security | Wallet-scoped security events |
Coordination v2
| Pattern | Description |
|---|---|
wallet:<address>:follow | Follow-edge activations and updates |
wallet:<address>:entity | Entity-membership changes |
token:<mint>:campaign | Coordinated campaign activations |
View values: full, filtered
Timeframe values: 1s, 1m, 5m, 15m, 1h
Connection Behavior
- Server sends WebSocket ping every 30s
- Slow consumers may drop messages
- Subscriptions are lazily created and garbage collected
- Invalid channel names return an error message, not a disconnect
- Channel keys are limited to 64 characters and reject NATS hierarchy characters (
.,>,*) and spaces