Skip to content

获取历史成交 ​

GET /api/v1.0/accounts/{acc_id}/fills_history

查询指定交易业务账户的历史成交列表。

注意

暂不支持查询外汇订单的历史成交。

路径参数 ​

参数类型必填说明
acc_idstring是业务账户 ID。

请求参数 ​

参数类型位置必填说明
trd_marketstring查询是交易市场。可选值参见 命名词典
codestring查询否代码筛选。返回指定代码的数据,默认返回全部数据。
startuint64查询否更新时间的起始时间,时间戳,单位微秒。
enduint64查询否更新时间的结束时间,应在起始时间之后。时间戳,单位微秒。
page_flagstring查询否翻页标记。首次请求可不传(或传空字符串)表示从头开始,之后填入服务端返回的 page_flag。
page_sizeuint32查询否每页条数。不传默认 50;传入时不得超过 50。

start 和 end 的组合说明:

startend说明
>0>0start 和 end 分别为微秒时间戳,不是日历日期。
0>0start 为 end 之前 90 天。
>00end 为 start 之后 90 天。
00start 为当前时刻之前 90 天,end 为当前时刻。

响应参数 ​

字段类型说明
order_fillslist[order_fill]成交列表,默认每次返回 50 条,最新成交在前。
page_flagstring下次请求的翻页标记
completedbool为 true 表示所有成交记录已返回,客户端应停止翻页请求。

响应示例 ​

json
{
  "s": "ok",
  "d": {
    "order_fills": [
      {
        "trd_side": "BUY",
        "deal_id": "F2024030100000001",
        "order_id": "2024030100000001",
        "code": "US.AAPL",
        "stock_name": "Apple Inc.",
        "qty": "100",
        "price": "180.000",
        "create_time": 1709251210000000,
        "update_time": 1709251210000000,
        "counter_broker_id": "9999",
        "counter_broker_name": "Goldman Sachs",
        "status": "OK"
      }
    ],
    "page_flag": "",
    "completed": true
  }
}