跳到主要内容

计划委托下单

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

描述

计划委托下单接口,支持预设止盈止损特性。

HTTP请求

  • POST /api/v2/mix/order/place-plan-order
请求示例
curl -X POST "https://api.bitget.com/api/v2/mix/order/place-plan-order" \
-H "ACCESS-KEY:*******" \
-H "ACCESS-SIGN:*" \
-H "ACCESS-PASSPHRASE:*" \
-H "ACCESS-TIMESTAMP:1659076670000" \
-H "locale:en-US" \
-H "Content-Type: application/json" \
-d '{ "planType":"normal_plan", "symbol": "BTCUSDT", "productType": "usdt-futures", "marginMode": "isolated", "marginCoin": "USDT", "size": "0.01", "price": "24000", "callbackRatio": "", "triggerPrice": "24100", "triggerType": "mark_price", "side": "buy", "tradeSide": "open", "orderType":"limit", "clientOid": "232421412423", "reduceOnly": "NO", "presetStopSurplusPrice": "", "stopSurplusTriggerPrice": "", "stopSurplusTriggerType": "", "presetStopLossPrice": "", "stopLossTriggerPrice": "", "stopLossTriggerType": "" }'

请求参数

参数名参数类型是否必须描述
planTypeString计划委托类型
normal_plan 普通计划委托
track_plan 追踪委托
symbolString交易币对 如:ethusdt
productTypeString产品类型
USDT-FUTURES USDT专业合约
COIN-FUTURES 混合合约
USDC-FUTURES USDC专业合约
SUSDT-FUTURES USDT专业合约模拟盘
SCOIN-FUTURES 混合合约模拟盘
SUSDC-FUTURES USDC专业合约模拟盘
marginModeString仓位模式
isolated 逐仓
crossed 全仓
marginCoinString保证金币种
sizeString下单数量
priceString执行价格。
1.若下追踪委托时,则必须为空。
2.若下普通计划委托时,订单类型(orderType)为限价单(limit)则必填,为市价单(market)时则为空。
callbackRatioString执行回调幅度(只适用追踪委托)
1.若下追踪委托时必填,且幅度不可大于10。
triggerPriceString触发价格
1.若下普通计划委托、追踪委托时必填
triggerTypeString触发类型
1.若下普通计划委托、追踪委托时必填
mark_price 标记价格
fill_price 成交价格
index_price 指数价格
sideString下单方向
buy 买,sell 卖
tradeSideString交易方向
1.开平仓(双向持仓)模式下必填。
为空则视为买卖(单向持仓)模式。
open 开,close 平。
补充:
开多:side 填写 buy; tradeSide 填写 open
开空:side 填写 sell; tradeSide 填写 open
平多:side 填写 buy;tradeSide 填写 close
平空:side 填写 sell; tradeSide 填写 close
orderTypeString订单类型
1.若下追踪委托时,则必填且必须为market。
2.若下普通计划委托时,则必须传递任意类型。
limit 限价单,
market 市价单
clientOidString自定义订单id
reduceOnlyString是否只减仓。
YES;NO
默认NO;
1.仅适用于买卖(单向持仓)模式下。
2.开平仓(双向持仓)模式下必须为空或no。
stopSurplusTriggerPriceString止盈触发价/止盈触发百分比。1.为普通委托时,代表止盈触发价;2.为追踪委托时,为止盈触发百分比,且最大比例必须小于等于999.99,最小0.01;3.为空或0则默认不设止盈。。
stopSurplusExecutePriceString止盈执行价格
1.若下追踪委托时,则必须为空。
2.若下普通计划委托时,同时携带了stopSurplusTriggerPrice参数,为空或为0,则代表市价订单执行;不为空且大于0则为限价执行。。
stopSurplusTriggerTypeString止盈触发类型
默认为成交价格
1.若下追踪委托时,则必须为空。
2.若下普通计划委托,若同时携带了stopSurplusTriggerPrice参数,则必填。
fill_price 成交价格
mark_price 标记价格
index_price 指数价格
stopLossTriggerPriceString止损触发价/止损触发百分比
1.为普通委托时,代表止损触发价
2.为追踪委托时,为止损触发百分比,且最大比例必须小于等于999.99,最小0.01
3.为空或0则默认不设止损
stopLossExecutePriceString止损执行价格
1.若下追踪委托时,则必须为空。
2.若下普通计划委托时,同时携带了stopLossTriggerPrice参数,为空或为0,则代表市价订单执行;不为空且大于0则为限价执行
stopLossTriggerTypeString止损触发类型
默认为成交价格
1.若下追踪委托时,则必须为空。
2.若下普通计划委托,若同时携带了stopLossTriggerPrice参数,则必填。
fill_price 成交价格
mark_price 标记价格
index_price 指数价格
stpModeStringSTP模式, default none
none 不设置STP
cancel_taker 取消taker单
cancel_maker 取消maker单
cancel_both 两者都取消
返回示例
{
"code": "00000",
"data": {
"orderId": "121212121212",
"clientOid": "BITGET#1627293504612"
},
"msg": "success",
"requestTime": 1627293504612
}

返回参数

返回字段参数类型字段说明
orderIdString计划委托订单id
clientOidString自定义计划委托订单id