跳转到主要内容

Documentation Index

Fetch the complete documentation index at: https://developer.wooxpro.com/llms.txt

Use this file to discover all available pages before exploring further.

合约止盈止损下单 (SIGNED)

适用于用户进行合约止盈止损订单下单

请求URL

POST https://cloud-api.wooxpro.com/contract/private/submit-tp-sl-order

请求限制

参见 速率限制详细

请求参数

请求
curl 
 -H 'X-BM-KEY:{{AccessKey}}'
 -H 'X-BM-TIMESTAMP:{{currentTime}}'
 -H 'X-BM-SIGN:{{SIGN}}' 
 -X POST -d '{
  "symbol":"ETHUSDT",
  "side":2,
  "type":"take_profit",
  "size":10,
  "trigger_price":"2000",
  "executive_price":"1450",
  "price_type":1,
  "plan_category":1,
  "client_order_id":"123456789",
  "category":"limit"
}'
https://cloud-api.wooxpro.com/contract/private/submit-tp-sl-order
参数类型是否必填描述
symbolString必填合约交易对(如BTCUSDT)
typeString必填订单类型
-take_profit=止盈单
-stop_loss=止损单
sideInt必填订单方向
双向持仓
-2=平空
-3=平多
单向持仓
-2=买入(只减仓)
-3=卖出(只减仓)
sizeInt选填订单数量 张数 默认仓位数量(对应仓位止盈止损)
trigger_priceString必填触发价格
executive_priceString必填执行价格
price_typeInt必填触发价格类型
-1=最新成交价
-2=标记价格
plan_categoryInt选填止盈止损类型
-1=部分仓位止盈止损
-2=全仓止盈止损(默认)
client_order_idString选填用户自定义ID, 字母(区分大小写)与数字的组合,可以是纯字母、纯数字且长度要在1-32位之间
categoryString选填触发订单的类型,全仓止盈止损默认为market
-limit=限价单
-market=市价单

响应详情

响应
{
  "code": 1000,
  "message": "Ok",
  "data": {
    "order_id": "220609666322019",
    "client_order_id": "123456789"
  },
  "trace": "13f7fda9-9543-4e11-a0ba-cbe117989988"
}
字段类型描述
order_idString订单编号
client_order_idString客户端自定义id