> ## 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.

# Trade Stream

This stream provides real-time trade updates for your account across all markets regardless of which market you subscribed to.

Upon subscription to this stream, you will receive `completedOrdersDelta` messages whenever new trades are executed:

```json theme={null}
{
  "resultType": "completedOrdersDelta",
  "data": [
    {
      "market": "BTC-USDT",
      "orderId": "01JSG88WSP6MWEXBNXT0F43S59",
      "matchId": "65284509-5284-4f64-9b80-ed6aa9819b9b",
      "orderType": "buy",
      "tradeType": "market",
      "executionType": "taker",
      "fillType": "partial",
      "price": "92911.48605",
      "quantity": "23.4",
      "leverage": "1",
      "fees": "2174.12877357",
      "orderCreatedAt": 1745436937022,
      "orderFilledAt": 1745376015255,
      "triggerType": "none",
      "triggerPrice": "0",
      "triggerCreatedAt": 0
    },
    {
      "market": "ETH-USDT",
      "orderId": "01JSG88WSP6MWEXBNXT0F43S60",
      "matchId": "95284509-5284-4f64-9b80-ed6aa9819b9a",
      "orderType": "sell",
      "tradeType": "limit",
      "executionType": "maker",
      "fillType": "complete",
      "price": "3598.04",
      "quantity": "6.6",
      "leverage": "1",
      "fees": "9.49",
      "orderCreatedAt": 1745436937023,
      "orderFilledAt": 1745376015256,
      "triggerType": "none",
      "triggerPrice": "0",
      "triggerCreatedAt": 0
    }
  ]
}
```

| Field                     | Type   | Required | Description                                                                     |
| ------------------------- | ------ | -------- | ------------------------------------------------------------------------------- |
| `resultType`              | string | Yes      | `completedOrdersDelta`                                                          |
| `data`                    | array  | Yes      | Batch of completed order entries                                                |
| `data[].market`           | string | Yes      | Market name                                                                     |
| `data[].orderId`          | string | Yes      | Unique identifier of the order                                                  |
| `data[].matchId`          | string | Yes      | Unique identifier for the trade match                                           |
| `data[].orderType`        | string | Yes      | Order side: `buy` or `sell`                                                     |
| `data[].tradeType`        | string | Yes      | Order type: `limit` or `market`                                                 |
| `data[].executionType`    | string | Yes      | Order execution role: `taker` or `maker`                                        |
| `data[].fillType`         | string | Yes      | Fill type: `partial` or `complete`                                              |
| `data[].price`            | string | Yes      | Execution price                                                                 |
| `data[].quantity`         | string | Yes      | Execution quantity                                                              |
| `data[].leverage`         | string | Yes      | Leverage at time of execution                                                   |
| `data[].fees`             | string | Yes      | Fees charged for the trade                                                      |
| `data[].orderCreatedAt`   | number | Yes      | Order creation timestamp (milliseconds since epoch)                             |
| `data[].orderFilledAt`    | number | Yes      | Order fill timestamp (milliseconds since epoch)                                 |
| `data[].triggerType`      | string | Yes      | Trigger type for the order: `none`, `take_profit`, `stop_loss` or `liquidation` |
| `data[].triggerPrice`     | string | Yes      | Trigger price for the order                                                     |
| `data[].triggerCreatedAt` | number | Yes      | Trigger creation timestamp (milliseconds since epoch)                           |
