跳到主要内容

获取历史委托

描述

查询90天内的历史委托单

  • 查询时间范围
    每次查询只支持查询90天内的30天数据

HTTP请求

  • GET /api/v3/trade/history-orders
  • 限频规则: 20次/秒/UID
  • 需要统一账户交易只读/读写权限
请求示例
curl "https://api.bitget.com/api/v3/trade/history-orders?category=USDT-FUTURES" \
-H "ACCESS-KEY:your apiKey" \
-H "ACCESS-SIGN:*" \
-H "ACCESS-PASSPHRASE:*" \
-H "ACCESS-TIMESTAMP:1659076670000" \
-H "locale:zh-CN" \
-H "Content-Type: application/json"

请求参数

参数名参数类型是否必须描述
categoryString产品类型
SPOT 现货交易
MARGIN 杠杆交易
USDT-FUTURES USDT合约
COIN-FUTURES 币本位合约
USDC-FUTURES USDC合约
symbolString交易对名称
例如:BTCUSDT
startTimeString开始时间戳
Unix时间戳的毫秒数格式,如 1597026383085
最大查询范围90天
endTimeString结束时间戳
Unix时间戳的毫秒数格式,如 1597026383085
startTimeendTime间隔不超过30天
limitString每页条目数
最大100,默认100
cursorString游标ID
用于翻页,首次查询不传,查询第二页及后面的数据时,取上一次查询返回的最小orderId,结果会返回小于该值的数据
返回示例
{
"code": "00000",
"msg": "success",
"requestTime": 1730186348272,
"data": {
"list": [
{
"orderId": "111111111111111111",
"clientOid": "111111111111111111",
"category": "USDT-FUTURES",
"symbol": "BTCUSDT",
"orderType": "limit",
"side": "sell",
"price": "49534.4",
"qty": "0.429",
"amount": "0",
"cumExecQty": "0.429",
"cumExecValue": "21250.2929",
"avgPrice": "49534.4",
"timeInForce": "gtc",
"orderStatus": "filled",
"posSide": "long",
"holdMode": "hedge_mode",
"delegateType": "normal",
"reduceOnly": "NO",
"feeDetail": [
{
"feeCoin": "USDT",
"fee": "4.2500586"
}
],
"cancelReason": "normal_cancel",
"execType": "liquidation",
"createdTime": "1730181468493",
"updatedTime": "1730181468493"
}
],
"cursor": "1233319323918499840"
}
}

返回参数

返回字段参数类型字段说明
listArray
>orderIdString订单ID
>clientOidString自定义订单ID
>categoryString产品类型
SPOT 现货交易
MARGIN 杠杆交易
USDT-FUTURES U本位合约
COIN-FUTURES 币本位合约
USDC-FUTURES USDC合约
>symbolString交易对名称
例如:BTCUSDT
>priceString委托价格
>qtyString委托数量
单位为base coin
>amountString委托金额
单位为quote coin
适用于现货和杠杆
>orderTypeString交易类型
limit: 限价
market: 市价
>cumExecQtyString累计成交数量
单位为base coin
>cumExecValueString累计成交额
单位为quote coin
>avgPriceString成交均价
>orderStatusString订单状态
live: 订单已创建
new: 订单已进入撮合
partially_filled: 部分成交
filled: 全部成交
cancelled: 已撤销
>sideString开单方向
buy: 买
sell: 卖
>timeInForceString订单有效期
ioc: 无法立即成交的部分就撤销
fok: 无法全部立即成交就撤
gtc: 普通订单, 订单会一直有效,直到被成交或者取消
post_only: 只做maker
>posSideString仓位方向
long: 双向持仓多头
short: 双向持仓空头
>holdModeString持仓模式
one_way_mode: 单向持仓
hedge_mode: 双向持仓
>delegateTypeString委托类型
normal: 限价普通
stop_profit_market: 最优价止盈
stop_loss_market: 最优价止损
stop_profit_chase: 止盈追价委托
stop_loss_chase: 止损追价委托
trader_delegate: 带单委托
trader_stop_profit: 带单止盈
trader_stop_loss: 带单止损
follower_delegate: 跟单委托
reduce_offset_delegate: 减仓扎差委托
market: 最优价普通
market_risk: 最优价风险处理
plan_limit: 限价计划委托
plan_market: 最优价计划委托
back_contract: 反手
trader_back_contract: 带单反手
strategy_grid_positive: 策略-正向网格
strategy_grid_reverse: 策略-反向网格
strategy_unlimited: 无限策略
stop_profit_limit: 限价止盈
stop_loss_limit: 限价止损
move_stop_limit: 限价移动止盈止损
move_stop_market: 最优价移动止盈止损
position_stop_profit_limit: 限价仓位止盈
position_stop_profit_market: 最优价仓位止盈
position_stop_loss_limit: 限价仓位止损
position_stop_loss_market: 最优价仓位止损
tracking_plan_limit: 限价追踪委托
tracking_plan_market: 最优价追踪委托
delivery_close_long: 多头交割
delivery_close_short: 空头交割
liquidation: 爆仓清算
strategy_dca_positive: DCA策略-正向
strategy_dca_reverse: DCA策略-反向
spot_trace_trader_buy: 现货带单买
spot_trace_follower_buy: 现货跟单买
spot_trace_trader_sell: 现货带单卖
spot_trace_follower_sell: 现货跟单卖
strategy_oco_limit: 策略-OCO限价单
strategy_oco_trigger: 策略-OCO触发单
modify_limit_order: 限价修改
strategy_regular_buy: 策略-定投策略买
strategy_grid_middle: 策略-中性网格
strategy_cta_positive: CTA策略-正向
strategy_cta_reverse: CTA策略-反向
strategy_tpsl_limit: 现货止盈止损限价单
strategy_tpsl_market: 现货止盈止损市价单
strategy_contract_ai: 合约AI智投
strategy_trace_market: 追踪委托市价单
strategy_trace_limit: 追踪委托限价单
strategy_portfolio_buy: 策略-囤币宝买
strategy_portfolio_sell: 策略-囤币宝卖
strategy_tradingview: TRADINGVIEW信号接入策略
sigan_trace: 信号跟单
mmr_stop_loss_market: 最优价MMR止损
bbo_opponent1: BBO-对手价1
bbo_opponent5: BBO-对手价5
bbo_companion1: BBO-同向价1
bbo_companion5: BBO-同向价5
bbo_opponent1_profit: BBO-对手价1止盈
bbo_opponent5_profit: BBO-对手价5止盈
bbo_companion1_profit: BBO-同向价1止盈
bbo_companion5_profit: BBO-同向价5止盈
bbo_opponent1_loss: BBO-对手价1止损
bbo_opponent5_loss: BBO-对手价5止损
bbo_companion1_loss: BBO-同向价1止损
bbo_companion5_loss: BBO-同向价5止损
spot_bbo_opponent1_tpsl: BBO-对手价1止盈止损
spot_bbo_opponent5_tpsl: BBO-对手价5止盈止损
spot_bbo_companion1_tpsl: BBO-同向价1止盈止损
spot_bbo_companion5_tpsl: BBO-同向价5止盈止损
dummy_bbo_profit: BBO-止盈
dummy_bbo_loss: BBO-止损
strategy_pre_tpsl_limit: 现货预设止盈止损限价单
strategy_pre_tpsl_market: 现货预设止盈止损市价单
future_signal_delegate: 合约喊单跟单限价单
grant_market: 体验券开仓
tg_signal_limit: TG信号单
tg_signal_tp_market: TG信号单止盈
tg_signal_sl_market: TG信号单止损
strategy_preset_tpsl_limit: 现货预设计划委托止盈止损限价单
strategy_preset_tpsl_market: 现货预设计划委托止盈止损市价单
trader_iceberg_limit: 冰山委托
trader_time_share_market: 分时委托
strategy_arbitrage_positive: 资金费套利策略正向
strategy_arbitrage_reverse: 资金费套利策略反向
liquidation_take_over_long: 爆仓接管多仓
liquidation_take_over_short: 爆仓接管空仓
convert_hedging: 闪兑操盘
off_close: 下架平仓
>reduceOnlyString是否减仓单
YES: 是
NO: 否
>feeDetailArray手续费明细
>> feeCoinString手续费币种
>> feeString手续费
>cancelReasonString撤销原因
normal_cancel: 常规撤销
>execTypeString执行类型
normal: 正常订单
offset: 轧差订单
reduce: 强制减仓单
liquidation: 爆仓单
delivery: 交割订单
>stpModeStringSTP模式(自成交预防)
none:不设置STP(默认值)
cancel_taker:取消taker单
cancel_maker:取消maker单
cancel_both:两者都取消
>createdTimeString创建时间
Unix毫秒时间戳
>updatedTimeString更新时间
Unix毫秒时间戳
cursorString分页游标