# 全部成交明細

`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"
      }
    ]
  }
}
```
