Documentation Index
Fetch the complete documentation index at: https://docs.rails.xyz/llms.txt
Use this file to discover all available pages before exploring further.
This stream provides real-time order book updates for a specified market.
Upon subscription to this stream, you will receive publicOrderBookDelta messages whenever the order book changes:
{
"resultType": "publicOrderBookDelta",
"market": "ETH-USD",
"data": {
"orders": [
{
"orderType": "sell",
"price": "3181.41",
"quantity": "38.92"
},
{
"orderType": "buy",
"price": "3181.39",
"quantity": "38.98"
}
],
"statusCode": 200,
"ts": 1772576154169
}
}
| Field | Type | Required | Description |
|---|
resultType | string | Yes | publicOrderBookDelta |
market | string | No | Market name, present when connected with market=ALL |
data.orders | array | Yes | Incremental order book changes |
data.orders[].orderType | string | Yes | Order side: buy or sell |
data.orders[].price | string | Yes | Price level |
data.orders[].quantity | string | Yes | New total quantity at this price level |
data.statusCode | number | Yes | 200 |
data.ts | number | Yes | Update timestamp in milliseconds since epoch |
Order Book Snapshot Request
There is one request called emitPublicOrderBook that returns a full order book snapshot with publicOrderBook response messages. This request is useful for:
- Bootstrap order book state when first subscribing to the stream
- Recover after temporary data loss or connection issues
- Synchronize local book models with the current market state
- Get the complete order book picture before processing delta updates
Request
{
"message":"emitPublicOrderBook",
"content": {
"clientRequestId": "4cc68b60-ed2d-42aa-a21e-cb5486f8fd1a",
"market": "ETH-USD"
}
}
| Field | Type | Required | Description |
|---|
message | string | Yes | emitPublicOrderBook |
content.clientRequestId | string | No | Client-generated UUID for correlation |
content.market | string | No | Market name, only required when connecting with market=ALL |
Response
{
"resultType": "publicOrderBook",
"market": "ETH-USD",
"data": {
"clientRequestId": "4cc68b60-ed2d-42aa-a21e-cb5486f8fd1a",
"orders": [
{
"orderType": "buy",
"price": "3181.39",
"quantity": "38.98"
},
{
"orderType": "sell",
"price": "3181.41",
"quantity": "38.92"
}
],
"statusCode": 200,
"ts": 1772576154169
}
}
| Field | Type | Required | Description |
|---|
resultType | string | Yes | publicOrderBook |
market | string | No | Market name, present when connected with market=ALL |
data.clientRequestId | string | No | Client-generated UUID for correlation |
data.orders | array | Yes | Full order book entries |
data.orders[].orderType | string | Yes | Order side: buy or sell |
data.orders[].price | string | Yes | Price level |
data.orders[].quantity | string | Yes | Total quantity at this price level |
data.statusCode | number | Yes | 200 |
data.ts | number | Yes | Snapshot timestamp in milliseconds since epoch |