止盈止损计划委托下单
- POST
/capi/v2/order/placeTpSlOrder
权重(IP): 2, 权重(UID): 5
请求参数
| 参数名 | 类型 | 是否必填 | 说明 |
|---|---|---|---|
| symbol | String | 是 | 交易对 |
| clientOrderId | String | 是 | 自定义订单号(不超过40个字符) |
| planType | String | 是 | 止盈止损类型:profit_plan:止盈计划 loss_plan:止损计划 |
| triggerPrice | String | 是 | 触发价格 |
| executePrice | String | 否 | 执行价格。不传或者传0则市价执行,大于0为限价执行 |
| size | String | 是 | 数量 |
| positionSide | String | 是 | 仓位方向:long:多仓 short:空仓 |
| marginMode | Integer | 否 | 保证金模式: 1:全仓模式 3:逐仓模式 默认值1(全仓模式) |
请求示例
curl -X POST "https://api-contract.weex.com/capi/v2/order/placeTpSlOrder" \
-H "ACCESS-KEY:*******" \
-H "ACCESS-SIGN:*" \
-H "ACCESS-PASSPHRASE:*" \
-H "ACCESS-TIMESTAMP:1659076670000" \
-H "locale:zh-CN" \
-H "Content-Type: application/json" \
-d '{"symbol": "cmt_btcusdt", "clientOrderId": "123456789", "planType": "profit_plan",
"triggerPrice": "50000", "executePrice": "0", "size": "1", "positionSide": "long", "marginMode": 1}'
返回参数
| 参数名 | 类型 | 说明 |
|---|---|---|
| success | Boolean | 止盈止损计划委托是否下单成功 |
| orderId | Long | 订单ID,失败时为0 |
返回示例
[
{
"orderId": 696073048050107226,
"success": true
}
]