publicTrades subscription. New executions arrive as publicCompletedOrdersDelta
messages, and you can request a snapshot of recent trades with emitPublicCompletedOrders.
Upon subscription to this stream, you will receive publicCompletedOrdersDelta messages
whenever new trades are executed:
| Field | Type | Required | Description |
|---|---|---|---|
resultType | string | Yes | publicCompletedOrdersDelta |
market | string | Yes | Contract name |
data.orders | array | Yes | New trade executions since the last update |
data.orders[].executionType | string | Yes | Execution role: taker or maker |
data.orders[].matchId | string | Yes | Identifier for the trade match (shared by the taker and maker entries) |
data.orders[].price | string | Yes | Execution price |
data.orders[].quantity | string | Yes | Execution quantity |
data.orders[].side | string | Yes | Side of the order: buy or sell |
data.orders[].updatedAt | number | Yes | Execution timestamp (ms since epoch) |
data.statusCode | number | Yes | 200 |
Recent Trades Snapshot Request
Request recent trade history withemitPublicCompletedOrders, which returns a
publicCompletedOrders message. Use it to hydrate recent trades when you first subscribe, or
to resynchronize after a gap.
Request
| Field | Type | Required | Description |
|---|---|---|---|
message | string | Yes | emitPublicCompletedOrders |
content.clientRequestId | string | No | Client-generated UUID for correlation |
content.market | string | Yes | Contract name |
Response
| Field | Type | Required | Description |
|---|---|---|---|
resultType | string | Yes | publicCompletedOrders |
market | string | Yes | Contract name |
data.clientRequestId | string | No | Client-generated UUID for correlation |
data.orders | array | Yes | Snapshot of recent trade executions |
data.orders[].executionType | string | Yes | Execution role: taker or maker |
data.orders[].matchId | string | Yes | Identifier for the trade match (shared by the taker and maker entries) |
data.orders[].price | string | Yes | Execution price |
data.orders[].quantity | string | Yes | Execution quantity |
data.orders[].side | string | Yes | Side of the order: buy or sell |
data.orders[].updatedAt | number | Yes | Execution timestamp (ms since epoch) |
data.statusCode | number | Yes | 200 |