Skip to main content

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​

SectionDescription
General API InformationConnection URLs, protocol, SDK setup
AuthenticationToken flow and connection auth
Error CodesError codes and handling
LimitsRate limits and connection limits
Data SourcesReal-time data flow and formats

RPC Methods​

CategoryDescription
RPC CommandsAll available RPC methods
ChannelsReal-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​