Skip to content

历史订单列表

GET /api/v1/crypto/accounts/{acc_id}/orders/history

查询已完结的历史订单,支持多维度筛选。查询区间不得超过 3 个月

路径参数

参数类型必填说明
acc_iduint64账户 ID

请求参数

参数类型位置必填说明
start_timeint64查询开始时间(Unix 微秒时间戳),不能为 0
end_timeint64查询结束时间(Unix 微秒时间戳),不能为 0
page_sizeuint32查询每页条数,最大 50,默认 50
page_flagstring查询翻页游标,首次请求不传
symbolstring查询交易对筛选,如 BTCUSD
order_statusstring[]查询订单状态筛选,可多选(重复参数名),可选值参见命名词典
currencystring[]查询结算货币筛选,可多选(重复参数名)
sidestring[]查询买卖方向筛选,可多选(重复参数名),可选值参见命名词典
ord_typestring[]查询订单类型筛选,可多选(重复参数名),可选值参见命名词典

响应参数

字段类型说明
orderslist[OrderItem]订单列表,按创建时间降序排列
page_flagstring下次请求的翻页游标
completedbooltrue 表示所有数据已返回,客户端应停止翻页请求

请求示例

bash
curl -X GET "https://webapi.futunn.com/api/v1/crypto/accounts/123456/orders/history?start_time=1750000000000000&end_time=1750086400000000&symbol=BTCUSD&side=BUY&order_status=FILLED&order_status=PARTIAL_FILLED" \
  -H "X-Api-Key: <AppKey>" \
  -H "X-Timestamp: <timestamp_ms>" \
  -H "X-Nonce: <nonce>" \
  -H "Authorization: <signature_base64>"

响应示例

json
{
  "code": 0,
  "msg": "success",
  "data": {
    "orders": [
      {
        "order_id": "FTHC2989880641155745280T",
        "version": 2,
        "symbol_pair": { "symbol": "BTCUSD", "base": "BTC", "quote": "USD" },
        "side": "BUY",
        "order_qty": "0.01",
        "price": "30000",
        "order_amount": "300.00",
        "cum_qty": "0.01",
        "avg_px": "30000",
        "fill_amount": "300.00",
        "ord_type": "LIMIT",
        "time_in_force": "TIF_GTC",
        "create_time": 1750000000000000,
        "update_time": 1750000100000000,
        "ord_status": "FILLED",
        "order_show_id": "SHOW-001",
        "is_close": true,
        "trigger_price": "",
        "trigger_time": 0,
        "cash_order_qty": ""
      }
    ],
    "page_flag": "",
    "completed": true
  }
}

失败响应:

json
{
  "code": 1,
  "msg": "Error Message."
}