跳转到主要内容

Documentation Index

Fetch the complete documentation index at: https://developer.wooxpro.com/llms.txt

Use this file to discover all available pages before exploring further.

查询合约历史订单 (KEYED)

适用于查询某合约订单历史记录

请求URL

GET https://cloud-api.wooxpro.com/contract/private/order-history

请求限制

参见 速率限制详细

请求参数

请求
curl -H 'X-BM-KEY:{{AccessKey}}'
https://cloud-api.wooxpro.com/contract/private/order-history?symbol=BTCUSDT&start_time=1662368173&end_time=1662368179
参数类型是否必填描述
symbolString必填合约交易对(如BTCUSDT)
order_idString选填订单编号
client_order_idString选填用户自定义订单ID
accountString选填交易用户
-futures=合约主账号
-copy_trading=跟单子账号
start_timeLong选填开始时间(时间戳,精确到秒)
end_timeLong选填结束时间(时间戳,精确到秒)
注意
  • 没有填写时间范围 start_timeend_time,默认查询最近7天数据
  • 填写时间范围的话,end_time 必须比 start_time 的值大, 并且start_timeend_time 最大支持 90 天的查询间隔
  • 每次请求最多返回200条,超过的将不会返回

响应详情

响应
{
  "code": 1000,
  "message": "Ok",
  "data": [
    {
      "order_id": "3000101684062644",
      "client_order_id": "PLAN_3000097492004577",
      "price": "0",
      "trigger_price": "0",
      "execution_price": "0",
      "size": "1",
      "symbol": "BTCUSDT",
      "state": 4,
      "side": 2,
      "type": "market",
      "account": "futures",
      "position_mode": "hedge_mode",
      "leverage": "20",
      "open_type": "cross",
      "deal_avg_price": "84802",
      "deal_size": "1",
      "create_time": 1743160485193,
      "update_time": 1743160485258,
      "activation_price_type": 1,
      "activation_price": "0",
      "callback_rate": "0",
      "preset_take_profit_price_type": 0,
      "preset_stop_loss_price_type": 0,
      "preset_take_profit_price": "",
      "preset_stop_loss_price": ""
    }
  ],
  "trace": "b15f261868b540889e57f826e0420621.80.17434162457898722"
}
字段类型描述
symbolString合约交易对(如BTCUSDT)
order_idString订单编号
client_order_idString用户自定义ID(如果该字段未定义,则返回空)
sideInt订单方向
双向持仓
-1=开多
-2=平空
-3=平多
-4=开空
单向持仓
-1=买入
-2=买入(只减仓)
-3=卖出(只减仓)
-4=卖出
typeString订单类型
-limit=限价单
-market=市价单
-liquidate=强平单
-bankruptcy=爆仓破产单
-adl=adl单
-trailing=跟踪委托单
-planorder=计划委托单
accountString交易用户
-futures=合约主账号
-copy_trading=跟单子账号
position_modeString持仓模式
-hedge_mode=双向持仓
-one_way_mode=单向持仓
leverageString杠杆下单倍数
open_typeString开仓类型
-cross=全仓
-isolated=逐仓
deal_avg_priceString成交均价
deal_sizeString成交数量
priceString委托价格
trigger_priceString触发价格,计划委托单返回
execution_priceString执行价格,计划委托单返回
-Market price=如果执行价格为市价,返回Market
-Limit price=如果执行价格为限价,返回设置的限价价格
sizeString委托数量
stateInt订单状态
-2=委托中
-4=已结束
activation_priceString激活价格,跟踪委托单返回
callback_rateString回调幅度,跟踪委托单返回
activation_price_typeInt激活价格类型,跟踪委托单返回
-1=最新成交价
-2=标记价格
executive_order_idString触发执行订单编号
preset_take_profit_price_typeInt预设止盈委托价格类型
-0=未设置
-1=最新成交价
-2=标记价格
preset_stop_loss_price_typeInt预设止损委托价格类型
-0=未设置
-1=最新成交价
-2=标记价格
preset_take_profit_priceString预设止盈价格
preset_stop_loss_priceString预设止损价格
create_timeLong订单创建时间(ms)
update_timeLong订单更新时间(ms)