# 全部成交明细

`GET` `/v3/trade/execution/all`

该接口用于获取订单的成交明细，包括买入和卖出的成交记录，同时支持当日成交和历史成交查询。

## Parameters

### Query Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `symbol` | string | No | 股票代码，使用 `ticker.region` 格式，例如：`AAPL.US` |
| `order_id` | string | No | 订单 ID，例如：`701276261045858304` |
| `start_at` | string | No | 开始时间，格式为时间戳 (秒)，例如：`1650410999`。. 开始时间为空时，默认为结束时间或当前时间前九十天。 |
| `end_at` | string | No | 结束时间，格式为时间戳 (秒)，例如：`1650410999`。. 结束时间为空时，默认为开始时间后九十天或当前时间。 |
| `page` | integer | No | 页码，从 `1` 开始。单次查询最多返回 1000 条记录，若结果超过 1000 条，`has_more` 为 `true`，可结合 `has_more` 翻页。 |

## Request Example

```bash
curl --request GET \
  --url 'https://openapi.longbridge.com/v3/trade/execution/all' \
  --header 'Authorization: Bearer <access_token>'
```

## Response

### Response Properties

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `trades` | object[] | No | 成交明细 |
| `└ trade_id` | string | No | 成交 ID |
| `└ order_id` | string | No | 订单 ID |
| `└ symbol` | string | No | 股票代码，使用 `ticker.region` 格式，例如：`AAPL.US` |
| `└ price` | string | No | 成交价格 |
| `└ quantity` | string | No | 成交数量 |
| `└ trade_done_at` | string | No | 成交时间，格式为时间戳 (秒) |
| `└ side` | string | No | 买卖方向。**可选值：**, `Buy` - 买入，`Sell` - 卖出 |
| `has_more` | boolean | No | 是否有更多记录。. 单次查询最多返回 1000 条记录，若结果超过 1000 条，has_more 为 true |

### Response JSON Example

```json
{
  "code": 0,
  "message": "success",
  "data": {
    "has_more": false,
    "trades": [
      {
        "order_id": "693664675163312128",
        "price": "388",
        "quantity": "100",
        "symbol": "700.HK",
        "trade_done_at": "1648611351",
        "trade_id": "693664675163312128-1648611351433741210",
        "side": "Buy"
      }
    ]
  }
}
```
