Message Schema
This page documents the payload formats pushed by TickDB WebSocket.Common Fields
Most server messages use:| Field | Type | Description |
|---|---|---|
| cmd | string | Message type (usually equals channel name) |
| data | object | Payload data |
timestamp fields are milliseconds (ms).
ticker Message
Example
Fields
| Field | Type | Description |
|---|---|---|
| symbol | string | Trading symbol |
| last_price | string | Last traded price |
| timestamp | int | Server timestamp in ms |
depth Message (Stocks & Crypto only)
Example
Fields
| Field | Type | Description |
|---|---|---|
| symbol | string | Trading symbol |
| bids | array | Bid levels: [price, quantity] |
| asks | array | Ask levels: [price, quantity] |
| timestamp | int | Server timestamp in ms |
bids: price descendingasks: price ascending
trade Message (Stocks & Crypto only)
Example
Fields
| Field | Type | Description |
|---|---|---|
| symbol | string | Trading symbol |
| price | string | Trade price |
| quantity | string | Trade quantity |
| side | string | buy or sell |
| timestamp | int | Server timestamp in ms |
