跳到主要内容

查询历史计划委托

普通用户10次/S 根据uid限频

描述

可查询历史的个别或所有的历史计划委托。

HTTP请求

  • GET /api/v2/mix/order/orders-plan-history
请求示例
curl "https://api.bitget.com/api/v2/mix/order/orders-plan-history?planType=normal_plan&symbol=ETHUSDT&productType=usdt-futures" \
-H "ACCESS-KEY:*******" \
-H "ACCESS-SIGN:*" \
-H "ACCESS-PASSPHRASE:*" \
-H "ACCESS-TIMESTAMP:1659076670000" \
-H "locale:en-US" \
-H "Content-Type: application/json" \

请求参数

参数名参数类型是否必须描述
orderIdString订单ID
orderId和clientOid同传时以orderId为准。
clientOidString自定义订单ID
orderId和clientOid同传时以orderId为准。
planTypeString委托类型
normal_plan:普通计划委托
track_plan:追踪委托
profit_loss:止盈止损类委托(包含了:profit_plan:止盈计划, loss_plan:止损计划, moving_plan:移动止盈止损,pos_profit:仓位止盈,pos_loss:仓位止损)
planStatusString计划委托状态
若未指定,将查询所有状态
executed:已触发
fail_trigger:触发失败
cancelled:已撤销
symbolString交易对 如:ethusdt
productTypeString产品类型
USDT-FUTURES USDT专业合约
COIN-FUTURES 混合合约
USDC-FUTURES USDC专业合约
SUSDT-FUTURES USDT专业合约模拟盘
SCOIN-FUTURES 混合合约模拟盘
SUSDC-FUTURES USDC专业合约模拟盘
idLessThanString请求此ID之前(更旧的数据)的分页内容,传的值为对应接口的 endId。
startTimeString开始时间戳
Unix时间戳的毫秒数格式,如 1597026383085
(时间跨度最大支持三个月,若不传结束时间,则默认结束时间为三个月。)
(托管子账户访问时,StartTime 时间不能早于 绑定开始的时间)
endTimeString结束时间戳
Unix时间戳的毫秒数格式,如 1597026383085
(时间跨度最大支持三个月,若不传开始时间,则默认开始时间为三个月。)
limitString查询条数 默认100,最大100
返回示例
{
"code": "00000",
"data": {
"entrustedList": [
{
"planType": "normal_plan",
"symbol": "ethusdt",
"size": "1",
"orderId": "123",
"executeOrderId": "123456",
"clientOid": "",
"planStatus": "executed",
"price": "1990",
"priceAvg": "1999.2",
"baseVolume": "1",
"callbackRatio": "",
"triggerPrice": "1989",
"triggerType": "fill_price",
"side": "buy",
"posSide": "long",
"marginCoin": "usdt",
"marginMode": "cross",
"enterPointSource": "api",
"tradeSide": "open",
"posMode": "hedge_mode",
"orderType": "limit",
"cTime": "1627293504612",
"uTime": "",
"presetStopSurplusPrice": "2001",
"stopSurplusTriggerPrice": "2002",
"stopSurplusTriggerType": "fill_price",
"presetStopLossPrice": "1800",
"stopLossTriggerPrice": "1820",
"stopLossTriggerType": "fill_price"
}
],
"endId": "123"
},
"msg": "success",
"requestTime": 1627293504612
}

返回参数

返回字段参数类型字段说明
entrustedListList<String>委托集合
>planTypeString委托类型
normal_plan 普通计划委托
track_plan 追踪委托
profit_plan 止盈计划(分批止盈止损)
loss_plan 止损计划(分批止盈止损)
pos_profit 仓位止盈
pos_loss 仓位止损
moving_plan 移动止盈止损
>symbolString交易对名称
>sizeString委托数量
>orderIdString计划委托订单id
>executeOrderIdString委托触发后生成的订单ID
> clientOidString自定义计划委托订单id
>planStatusString订单状态
executed:已触发
fail_trigger:触发失败
cancelled:已撤销
>priceString委托价格
当计划委托类型为普通计划委托时,代表的是单纯的委托价格。
当计划委托类型为追踪委托时,则不存在。
>baseVolumeString交易币成交数量
订单状态为triggered(已触发)时才会有。
callbackRatioString执行回调幅度。(最大为1-10)
只有为追踪委托时才会存在
>triggerPriceString触发价格
普通计划委托/追踪委托时会存在。
>triggerTypeString触发类型
普通计划委托/追踪委托时会存在。
fill_price 成交价格
mark_price 标记价格
>sideString开单方向
buy 买,sell 卖
>posSideString持仓方向
long 双向持仓多头
short 双向持仓空头
net 单向持仓
>marginCoinString保证金币种
>marginModeString保证金模式
isolated 逐仓
crossed 全仓
>enterPointSourceString订单来源
WEB 自Web端创建的订单
API 自API端创建的订单
SYS 系统托管订单, 通常由强制平仓逻辑生成
ANDROID 自Android端创建的订单
IOS 自IOS端创建的订单
>tradeSideString交易方向
open 开(开平仓模式)
close 平(开平仓模式)
>posModeString持仓模式
one_way_mode 单向持仓
hedge_mode 双向持仓
>orderTypeString订单类型
limit 限价单
market 市价单
>cTimeString创建时间
>uTimeString最近更新时间
>presetStopSurplusPriceString预设止盈执行价
>stopSurplusTriggerPriceString预设止盈触发价格
>stopSurplusTriggerTypeString预设止盈触发类型
fill_price 成交价格
mark_price 标记价格
>presetStopLossPriceString预设止损执行价
>stopLossTriggerPriceString预设止损触发价格
>stopLossTriggerTypeString预设止损触发类型
fill_price 成交价格
mark_price 标记价格
>stopLossTriggerPriceString预设止损触发价格
endIdString最后的订单id
指定idLessThan/idGreaterThan作为范围查询时以此为准。

您的阅读体验如何?