Connect to the WebSocket server at /ws/connect for real-time updates.
{
"type": "subscribe",
"channel": "orderbook",
"event_id": 1,
"option_id": 1
}{
"type": "unsubscribe",
"channel": "orderbook",
"event_id": 1,
"option_id": 1
}{
"type": "orderbook_update",
"event_id": 1,
"option_id": 1,
"bids": [...],
"asks": [...],
"last_price": "50.00"
}{
"type": "trade",
"event_id": 1,
"option_id": 1,
"price": "50.00",
"quantity": 100,
"timestamp": "2024-01-01T12:00:00Z"
}{
"type": "price_update",
"updates": [
{
"event_id": 1,
"option_id": 1,
"price": "50.00",
"change_24h": "2.50"
}
]
}