歷史訂單列表
GET/api/v1/crypto/accounts/{acc_id}/orders/history查詢已完結的歷史訂單,支持多維度篩選。查詢區間不得超過 3 個月。
路徑參數
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
acc_id | uint64 | 是 | 賬戶 ID |
請求參數
| 參數 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
start_time | int64 | 查詢 | 是 | 開始時間(Unix 微秒時間戳),不能為 0 |
end_time | int64 | 查詢 | 是 | 結束時間(Unix 微秒時間戳),不能為 0 |
page_size | uint32 | 查詢 | 否 | 每頁條數,最大 50,默認 50 |
page_flag | string | 查詢 | 否 | 翻頁游標,首次請求不傳 |
symbol | string | 查詢 | 否 | 交易對篩選,如 BTCUSD |
order_status | string[] | 查詢 | 否 | 訂單狀態篩選,可多選(重複參數名),可選值參見命名詞典 |
currency | string[] | 查詢 | 否 | 結算貨幣篩選,可多選(重複參數名) |
side | string[] | 查詢 | 否 | 買賣方向篩選,可多選(重複參數名),可選值參見命名詞典 |
ord_type | string[] | 查詢 | 否 | 訂單類型篩選,可多選(重複參數名),可選值參見命名詞典 |
響應參數
| 字段 | 類型 | 說明 |
|---|---|---|
orders | list[OrderItem] | 訂單列表,按創建時間降序排列 |
page_flag | string | 下次請求的翻頁游標 |
completed | bool | 為 true 表示所有數據已返回,客戶端應停止翻頁請求 |
請求示例
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."
}