WebSocket
Public WebSocket
Upgrade to a WebSocket connection for real-time public market data.
Public WebSocket streams do not require authentication.
Subscribe
{"action":"subscribe","channel":"ticker","market":"BTCZAR"}
{"action":"subscribe","channel":"orderbook","market":"BTCZAR","limit":10}
{"action":"subscribe","channel":"trades","market":"BTCZAR"}
Unsubscribe
{"action":"unsubscribe","channel":"ticker","market":"BTCZAR"}
Client message fields
| Field | Type | Description |
|---|---|---|
| action | string | subscribe or unsubscribe. |
| channel | string | ticker, orderbook, or trades. |
| market | string | Market symbol, for example BTCZAR. |
| limit | integer | Order book depth. Applies to orderbook only. Default 50, maximum 200. |
Server frames
{"channel":"subscribed","market":"BTCZAR","subscription":"ticker"}
{"channel":"ticker","market":"BTCZAR","data":{}}
{"channel":"orderbook","market":"BTCZAR","data":{}}
{"channel":"trades","market":"BTCZAR","data":[]}
{"channel":"error","message":"..."}
Poll intervals
| Channel | Interval |
|---|---|
| ticker | 1 second |
| orderbook | 500 milliseconds |
| trades | 1 second |
Frames are only pushed when data changes. The server sends a WebSocket ping every 45 seconds. Clients must respond with a pong within 60 seconds or the connection is closed.
get/ws
Changes
No recorded changes to this endpoint across all 1 revision of this API.