Skip to content

历史订单 ​

GET /api/v1.0/sim-trade/{acc_id}/history-orders

获取历史订单(支持时间范围 + 分页)。

请求参数 ​

参数类型位置必填说明
acc_idstringpath是业务账户 ID
marketintquery是市场(来自账户列表的 market_id)
time_beginint64query否起始时间(Unix 微秒)
time_endint64query否结束时间(Unix 微秒)
page_sizeintquery否分页大小(默认 50)
next_keystringquery否翻页游标

请求示例 ​

bash
curl -s "https://webapi.moomoo.com/api/v1.0/sim-trade/80303779/history-orders?market=1&page_size=10" -H "Authorization: Bearer <AccessToken>" | jq

响应字段 ​

订单字段同今日订单,额外包含分页信息:pagination.has_more(bool)、pagination.next_key(string)。

响应示例 ​

json
{
  "ret_code": 0,
  "ret_msg": "success",
  "data": {
    "orders": []
  },
  "pagination": {
    "has_more": false,
    "next_key": ""
  }
}

错误响应 ​

HTTP 状态始终为 200。请求失败时返回非 0 的 ret_code 和 error 对象。

json
{
  "ret_code": -3,
  "ret_msg": "invalid request",
  "error": {"code": "invalid_parameter", "message": "invalid request"}
}