WebSocket API
The Cadenza WebSocket API provides real-time bidirectional communication for streaming market data and trading operations, built on Centrifugo.
Connection URL
wss://cadenza-ws.algo724.com/connection/websocket
For testing and development, see UAT Environment.
Quick Reference
| Section | Description |
|---|---|
| General API Information | Connection URLs, protocol, SDK setup |
| Authentication | Token flow and connection auth |
| Error Codes | Error codes and handling |
| Limits | Rate limits and connection limits |
| Data Sources | Real-time data flow and formats |
RPC Methods
| Category | Description |
|---|---|
| RPC Commands | All available RPC methods |
| Channels | Real-time subscription channels |
Capabilities
- Stream market data - Real-time order books, trades, and tickers
- Execute trading operations - Submit/cancel orders via RPC
- Monitor portfolios - Live balance and position updates
- Receive notifications - Order status changes, account updates
Quick Start
from centrifuge import Client
WS_URL = "wss://cadenza-ws.algo724.com/connection/websocket"
# 1. Connect with token (obtained from HTTP API login)
client = Client(WS_URL, token=access_token)
await client.connect()
# 2. Make RPC calls
result = await client.rpc("query.instrument.list", {
"venue": "BINANCE",
"limit": 50
})
instruments = result.data
# 3. Subscribe to real-time data
sub = client.new_subscription("market:orderBook:BINANCE:BTC/USDT")
sub.on_publication = lambda pub: print(pub.data)
await sub.subscribe()
See Also
- WebSocket Quick Start - Tutorial
- HTTP API - REST endpoints
- UAT Environment - Testing environment