账户
鉴权
签名方式:每个请求用 App Key / Secret 签名。请求头如下:
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
Authorization | string · header | 必填 | OpenAPI 后台 上的账户 Access Token,作为原始 token 传入(不带 Bearer 前缀),并参与签名计算。 |
X-Api-Key | string · header | 必填 | 你的 App Key。 |
X-Timestamp | string · header | 必填 | 请求时间戳,单位秒(Unix 时间)。 |
X-Api-Signature | string · header | 必填 | HMAC-SHA256 签名。格式:HMAC-SHA256 SignedHeaders=authorization;x-api-key;x-timestamp, Signature=。 |
仅支持 Longbridge 香港 / 新加坡账户
此方法仅支持 Longbridge 香港 / 新加坡账户,可操作任意标的,包括美股。
获取指定定投的执行历史,包含交易日期、金额和价格。
请求
查询参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
plan_id | string | 必填 | 定投计划 ID。 |
page | integer | 必填 | 页码,从 `1` 开始。 |
size | integer | 必填 | 每页记录数。 |
响应
响应字段
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
records | object[] | 必填 | 执行记录列表, |
└ symbol | string | 必填 | 证券代码 |
└ order_id | string | 可选 | 关联订单 ID |
└ status | string | 可选 | 执行状态 |
└ action | string | 可选 | 操作类型 |
└ order_type | string | 可选 | 订单类型 |
└ executed_qty | string | 可选 | 成交数量 |
└ executed_price | string | 可选 | 成交价格 |
└ executed_amount | string | 可选 | 成交金额 |
└ rejected_reason | string | 可选 | 拒绝原因(如有) |
└ created_at | string | 可选 | 执行时间 |
has_more | boolean | 可选 | 是否有更多记录 |
响应 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": ""
}
]
}
}错误码
参见错误码文档。