Timeout
Maximum session timeout is 1 hour. Clients must manage reconnections.Heartbeat
The server sends WebSocket ping frames every 30 seconds. The heartbeat timer refreshes when:- A pong frame is received
- Any subscribe or unsubscribe activity occurs
Authentication
All WebSocket connections require authentication via theSec-Websocket-Protocol header:
<API_KEY> with your Bearer token from Geomi.
See REST Authentication for how to get credentials.
Subscribe/Unsubscribe
Send a JSON message withmethod and topic:
"method":"unsubscribe" with the same topic.
Handling Reconnection
Since the maximum session timeout is 1 hour, your client must handle reconnections gracefully.Best Practices
- Implement exponential backoff for reconnection attempts
- Track active subscriptions to restore them after reconnecting
- Use sequence numbers to detect missed messages (for orderbook updates)
Error Messages
Error responses use the same format as subscribe/unsubscribe responses:Common Errors
| Error | Cause |
|---|---|
Unknown topic type '{name}' | Unrecognized channel name |
Missing user address for {topic} topic | Topic requires a user/account address but none provided |
Missing market address for {topic} topic | Topic requires a market address but none provided |
Invalid user address '{addr}' | Malformed address |
Invalid market address '{addr}' | Malformed address |
Invalid aggregation level '{level}' for depth topic | Must be one of: 1, 2, 5, 10, 100, 1000 |
Invalid interval '{interval}' for market_candlestick topic | Must be one of: 1m, 5m, 15m, 30m, 1h, 2h, 4h, 1d, 1w, 1mo |
Maximum client topic subscription count of 100 reached | Too many active subscriptions on one connection |
SDK Managed Connections
The TypeScript SDK handles connection management automatically. See TypeScript SDK Overview.Related
WebSocket Overview
Available channels and message formats
Authentication
How to get bearer tokens

