| Channel | URL | Auth | Use Case |
|---|---|---|---|
| Market | /ws/market | None | Orderbook snapshots, trades, market events |
| Price | /ws/price | None | Pyth oracle price ticks |
| User | /ws/user | API creds | Fills, cancels, balance updates |
Market WebSocket
Subscribe to orderbook updates and trades for specific tokens:Snapshot Format
Gap Recovery
If you suspect missed messages (e.g., after a network blip), request a fresh snapshot:Price WebSocket
Subscribe to Pyth oracle price ticks by stock symbol:Tick Format
User WebSocket
Receive private events for your account through two unified callbacks:on_state_changed— full snapshot of your USDC balance, positions, and open orders. Delivered after every mutation (fill, cancel, settlement, redemption).on_notification— discrete events like fills, cancellations, and rejections with enriched data (market symbol, token type).
Authentication
The User WebSocket authenticates using the same API credentials fromcreate_or_derive_api_creds():
State Changed Format
Delivered on connect (auth snapshot) and after every user-affecting mutation:Notification Format
Discrete events with enriched data:order_fill, order_cancelled, order_accepted, order_rejected.

