WebSocket
WebSocket
Connect to the WebSocket endpoint for real-time market data.
Connection
wss://api.settled.pro/ws
Subscribe to Channels
After connecting, send JSON messages to subscribe:
Market prices (public)
{ "type": "subscribe", "channel": "market:8166597e-..." }
All series updates (public)
{ "type": "subscribe", "channel": "series" }
Your account updates (authenticated)
{
"type": "subscribe",
"channel": "user:Dc5tRex7r3EYi7HVNNjr3FkfhytDksWFtT1CLjgVYCSU",
"token": "<jwt>"
}
Message Types
Price Update
Sent when a trade moves the market price.
{
"type": "price_update",
"channel": "market:8166597e-...",
"data": {
"yes_price": "0.742000",
"no_price": "0.258000",
"trade_count": 48,
"total_volume": "1240.50"
}
}
Trade
Sent on every trade execution.
{
"type": "trade",
"channel": "market:8166597e-...",
"data": {
"side": "yes",
"shares": "13.70",
"price": "0.73",
"timestamp": "2026-03-18T09:15:32Z"
}
}
Settlement
Sent when a market resolves.
{
"type": "settlement",
"channel": "series",
"data": {
"slug": "binance-lynusdt",
"market_id": "8166597e-...",
"outcome": "yes",
"actual_rate": "0.00041339",
"round_number": 11
}
}
Balance Update (authenticated)
Sent when your balance changes (trade, deposit, withdrawal, settlement payout).
{
"type": "balance_update",
"channel": "user:Dc5tRex7...",
"data": {
"usdc_balance": "103.899380",
"reason": "settlement_payout",
"market_id": "8166597e-..."
}
}
Unsubscribe
{ "type": "unsubscribe", "channel": "market:8166597e-..." }
Connection Limits
- 5 WebSocket connections per IP
- Idle connections are closed after 5 minutes with no subscriptions
- Heartbeat ping every 30 seconds (respond with pong to keep alive)