跳到主要内容

获取当前计划委托

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

描述

可获取当前普通单和计划委托,支持单个和全量查询。

HTTP请求

  • GET /api/v2/mix/order/orders-plan-pending
请求示例
curl -X GET "https://api.bitget.com/api/v2/mix/order/orders-plan-pending?orderId=123&clientOid=1234&planType=profit_loss&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:仓位止损)
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
(时间跨度最大支持三个月,若不传结束时间,则默认结束时间为三个月。)
endTimeString结束时间戳
Unix时间戳的毫秒数格式,如 1597026383085
(时间跨度最大支持三个月,若不传开始时间,则默认开始时间为三个月。)
limitString查询条数 默认100,最大100
返回示例
{
"code": "00000",
"data": {
"entrustedList": [
{
"planType": "normal_plan",
"symbol": "ethusdt",
"size": "1",
"orderId": "123",
"clientOid": "121212",
"price": "1900",
"callbackRatio": "",
"triggerPrice": "1901",
"triggerType": "mark_price",
"planStatus": "not_trigger",
"side": "buy",
"posSide": "long",
"marginCoin": "usdt",
"marginMode": "crossed",
"enterPointSource": "api",
"tradeSide": "open",
"posMode": "hedge_mode",
"orderType": "limit",
"orderSource": "normal",
"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
>clientOidString自定义计划委托订单id
>priceString执行价格
当计划委托为追踪委托时,则不存在
>callbackRatioString执行回调幅度。(范围为1-10)
只有为追踪委托时才会存在。
>triggerPriceString触发价格
普通计划委托/追踪委托时会存在。
>triggerTypeString触发类型
普通计划委托/追踪委托时会存在。
fill_price 成交价格
mark_price 标记价格
index_price 指数价格
>planStatusString订单状态
当前计划委托中,状态仅会为live(未触发)
>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 市价单
>orderSourceString订单资源
normal 正常下单
market 市价单
profit_market 市价止盈单
loss_market 市价止损单
Trader_delegate 交易员带单下单
trader_profit 交易员止盈
trader_loss 交易员止损
trader_reverse 交易员带单反手
profit_limit 止盈限价
loss_limit 止损限价
delivery_close_short 空仓交割
pos_profit_limit 仓位止盈限价
pos_profit_market 仓位止盈市价
pos_loss_limit 仓位止损限价
pos_loss_market 仓位止损市价
>cTimeString创建时间
>uTimeString最近更新时间
>presetStopSurplusPriceString预设止盈值
>stopSurplusTriggerPriceString预设止盈触发价格
>stopSurplusTriggerTypeString预设止盈触发类型
fill_price 成交价格
mark_price 标记价格
index_price 指数价格
>presetStopLossPriceString预设仓位止损值
>stopLossTriggerPriceString预设止损触发价格
>stopLossTriggerTypeString预设止损触发类型
fill_price 成交价格
mark_price 标记价格
index_price 指数价格
endIdString最后的订单ID
指定idLessThan/idGreaterThan作为范围查询时以此为准。