Available streams
Streams are identified using the format:{type}.{asset_pair}
Stream types
Depth
Order book depth updates showing bid and ask levels
Trade
Executed trades with price, quantity, and timestamp
Ticker
24-hour ticker statistics including price changes
Supported asset pairs
BTC_USDT- Bitcoin / TetherETH_USDT- Ethereum / TetherSOL_USDT- Solana / TetherSOL_USDC- Solana / USD Coin
Subscribing to streams
Send a subscribe message to start receiving updates for a specific stream.Format the subscription message
Create a JSON message with the
SUBSCRIBE method:| Field | Type | Description |
|---|---|---|
method | string | Must be "SUBSCRIBE" |
params | array | Array of stream names to subscribe to |
id | number | Unique identifier for this request |
Unsubscribing from streams
To stop receiving updates, send an unsubscribe message:When you unsubscribe, the server will immediately stop sending updates for that stream. If you’re the last subscriber to a stream, the server will also unsubscribe from the Redis channel to optimize resources.
Stream data formats
Each stream type sends updates with a consistent structure. All updates include astream field identifying the source and a data field containing the actual market data.
Depth stream
Order book depth updates for a trading pair. Stream name format:depth.{ASSET_PAIR}
Example subscription:
| Field | Type | Description |
|---|---|---|
e | string | Event type: "depth" |
s | string | Symbol/trading pair |
E | number | Event time (microseconds) |
T | number | Transaction time (microseconds) |
U | number | First update ID |
u | number | Final update ID |
a | array | Ask levels: [[price, quantity], ...] |
b | array | Bid levels: [[price, quantity], ...] |
Price levels with quantity
"0" indicate that level should be removed from the order book.Trade stream
Real-time executed trades. Stream name format:trade.{ASSET_PAIR}
Example subscription:
| Field | Type | Description |
|---|---|---|
e | string | Event type: "trade" |
s | string | Symbol/trading pair |
t | number | Trade ID |
p | string | Price |
q | string | Quantity |
T | number | Trade time (microseconds) |
m | boolean | Is buyer the market maker |
Ticker stream
24-hour rolling window statistics. Stream name format:ticker.{ASSET_PAIR}
Example subscription:
| Field | Type | Description |
|---|---|---|
e | string | Event type: "ticker" |
s | string | Symbol/trading pair |
E | number | Event time (microseconds) |
p | string | Price change |
P | string | Price change percent |
c | string | Current/last price |
o | string | Open price |
h | string | High price |
l | string | Low price |
v | string | Volume |
q | string | Quote volume |
Multiple subscriptions
You can subscribe to multiple streams in a single message or send separate subscription requests:Single message with multiple streams
Currently, the server processes one subscription at a time from the
params array. For best results, send separate subscription messages for each stream.Separate messages
Subscription lifecycle
Subscribe to streams
Send
SUBSCRIBE messages for the streams you want. The server:- Adds your connection to the subscription list
- Subscribes to the Redis channel if it’s the first subscriber
- Starts routing updates to you
Receive updates
As market events occur, the server:
- Receives updates via Redis Pub/Sub
- Routes them to all subscribed connections
- Sends as JSON text frames
Error handling
Invalid stream names
If you subscribe to an invalid stream (unsupported type or asset pair), the server will log an error but won’t send a response. Ensure your stream names match the supported formats. Valid examples:trade.BTC_USDT✓depth.ETH_USDT✓ticker.SOL_USDC✓
trade.INVALID_PAIR✗invalid_type.BTC_USDT✗BTC_USDT✗ (missing type)