Channel: orders
Authentication: Required
{
"method": "subscribe",
"params": {
"channel": "orders",
"market_ids": [1, 2],
"makers": ["0x1234567890123456789012345678901234567890"]
}
}
| Parameter | Type | Required | Description |
|---|
market_ids | number[] | No | Filter by market IDs. Empty = all markets |
makers | string[] | No | Filter by maker addresses. Empty = authenticated account only |
Sent immediately after subscribing. Contains all active (OPEN) orders matching your filters.
{
"method": "snapshot",
"channel": "orders",
"type": "snapshot",
"data": [
{
"@type": "type.googleapis.com/boom.v1.api.Order",
"id": "123456789",
"price": "50000000000000000000000",
"size": "1000000000000000000",
"market_id": "1",
"side": "BUY",
"type": "LIMIT",
"time_in_force": "GTC",
"expiry": 0,
"post_only": false,
"reduce_only": false,
"cancel_reason": "",
"block_number": "12345678",
"log_index": "0",
"stp_mode": "EXPIRE_TAKER",
"filled_size": "0",
"status": "ORDER_STATUS_OPEN",
"sender": "0x1234567890123456789012345678901234567890",
"fee_bps": "5",
"avg_price": "0",
"cancel_requested": false,
"created_at": "1703123456000000000",
"tx_hash": "0xabc123...",
"cancel_requested_at": "0",
"cancel_tx_hash": ""
}
],
"order_count": 1,
"timestamp": "1703123456123456789"
}
Sent when an order is placed, filled, or cancelled.
{
"channel": "orders",
"type": "update",
"market_id": "1",
"data": [
{
"@type": "type.googleapis.com/boom.v1.api.Order",
"id": "123456789",
"price": "50000000000000000000000",
"size": "1000000000000000000",
"market_id": "1",
"side": "BUY",
"type": "LIMIT",
"time_in_force": "GTC",
"expiry": 0,
"post_only": false,
"reduce_only": false,
"cancel_reason": "",
"block_number": "12345679",
"log_index": "1",
"stp_mode": "EXPIRE_TAKER",
"filled_size": "500000000000000000",
"status": "ORDER_STATUS_OPEN",
"sender": "0x1234567890123456789012345678901234567890",
"fee_bps": "5",
"avg_price": "50000000000000000000000",
"cancel_requested": false,
"created_at": "1703123456000000000",
"tx_hash": "0xdef456...",
"cancel_requested_at": "0",
"cancel_tx_hash": ""
}
],
"tx_hash": "0xdef456...",
"block_number": 12345679,
"log_index": 1,
"block_timestamp": "1703123457000000000",
"timestamp": "1703123457123456789"
}
| Field | Type | Description |
|---|
method | string | Always "snapshot" |
channel | string | Always "orders" |
type | string | Always "snapshot" |
data | array | Array of Order objects |
order_count | number | Total number of orders |
timestamp | string | Server timestamp (nanoseconds) |
| Field | Type | Description |
|---|
channel | string | Always "orders" |
type | string | Always "update" |
market_id | string | Market ID |
data | array | Array of Order objects |
tx_hash | string | Transaction hash |
block_number | number | Blockchain block number |
log_index | number | Log index within the block |
block_timestamp | string | Blockchain timestamp (nanoseconds) |
timestamp | string | Server timestamp (nanoseconds) |
| Field | Type | Description |
|---|
@type | string | Protobuf message type |
id | string | Unique order ID |
price | string | Order price (wei, 18 decimals) |
size | string | Total order size (wei, 18 decimals) |
market_id | string | Market ID |
side | string | BUY or SELL |
type | string | LIMIT or MARKET |
time_in_force | string | GTC, GTT, FOK, or IOC |
expiry | number | Order expiry time (seconds since epoch, 0 = no expiry) |
post_only | boolean | If true, order will only be placed as maker |
reduce_only | boolean | If true, order can only reduce position |
cancel_reason | string | Cancellation reason (if cancelled) |
block_number | string | Block number of last update |
log_index | string | Log index within the block |
stp_mode | string | Self-trade prevention mode (see below) |
filled_size | string | Amount already filled (wei, 18 decimals) |
status | string | Order status (see below) |
sender | string | Order owner address |
fee_bps | string | Fee rate in basis points |
avg_price | string | Average fill price (wei, 18 decimals) |
cancel_requested | boolean | If true, cancel has been requested |
created_at | string | Creation timestamp (nanoseconds) |
tx_hash | string | Transaction hash of last update |
cancel_requested_at | string | Cancel request timestamp (nanoseconds) |
cancel_tx_hash | string | Transaction hash of cancel request |
| Status | Description |
|---|
ORDER_STATUS_NONE | Unknown status |
ORDER_STATUS_OPEN | Order is active and can be filled |
ORDER_STATUS_FILLED | Order has been completely filled |
ORDER_STATUS_CANCELLED | Order was cancelled |
| Side | Description |
|---|
BUY | Long position |
SELL | Short position |
| Type | Description |
|---|
LIMIT | Limit order with specified price |
MARKET | Market order at best available price |
| Value | Description |
|---|
GTC | Good Till Cancelled |
GTT | Good Till Time (uses expiry field) |
FOK | Fill Or Kill |
IOC | Immediate Or Cancel |
| Mode | Description |
|---|
EXPIRE_MAKER | Cancel the maker order |
EXPIRE_TAKER | Cancel the taker order |
EXPIRE_BOTH | Cancel both orders |
EXPIRE_NONE | Allow self-trade |
{
"method": "subscribe",
"params": {
"channel": "orders"
}
}
{
"method": "subscribe",
"params": {
"channel": "orders",
"market_ids": [1, 2]
}
}
{
"method": "subscribe",
"params": {
"channel": "orders",
"market_ids": [1],
"makers": ["0x1234567890123456789012345678901234567890"]
}
}
{
"method": "unsubscribe",
"params": {
"channel": "orders"
}
}