# 定投交易歷史

`GET` `/v1/dailycoins/query-records`

:::warning 僅支援 Longbridge 香港 / 新加坡賬戶
此方法僅支援 Longbridge 香港 / 新加坡賬戶，可操作任意標的，包括美股。
:::

獲取指定定投的執行歷史，包含交易日期、金額和價格。

## Parameters

### Query Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `plan_id` | string | Yes | 定投計劃 ID。 |
| `page` | integer | Yes | 頁碼，從 `1` 開始。 |
| `size` | integer | Yes | 每頁記錄數。 |

## Request Example

```bash
curl --request GET \
  --url 'https://openapi.longbridge.com/v1/dailycoins/query-records?plan_id=<plan_id>&page=<page>&size=<size>' \
  --header 'Authorization: Bearer <access_token>'
```

## Response

### Response Properties

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `records` | object[] | Yes | 執行紀錄列表， |
| `└ symbol` | string | Yes | 證券代碼 |
| `└ order_id` | string | No | 關聯訂單 ID |
| `└ status` | string | No | 執行狀態 |
| `└ action` | string | No | 操作類型 |
| `└ order_type` | string | No | 訂單類型 |
| `└ executed_qty` | string | No | 成交數量 |
| `└ executed_price` | string | No | 成交價格 |
| `└ executed_amount` | string | No | 成交金額 |
| `└ rejected_reason` | string | No | 拒絕原因（如有） |
| `└ created_at` | string | No | 執行時間 |
| `has_more` | boolean | No | 是否有更多紀錄 |

### Response JSON Example

```json
{
  "code": 0,
  "message": "success",
  "data": {
    "has_more": false,
    "records": [
      {
        "symbol": "AAPL.US",
        "order_id": "123456",
        "status": "Filled",
        "action": "Buy",
        "order_type": "Market",
        "executed_qty": "1",
        "executed_price": "180.50",
        "executed_amount": "180.50",
        "created_at": "1763769600",
        "rejected_reason": ""
      }
    ]
  }
}
```
