跳转到主要内容

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-order

请求限制

参见 速率限制详细

请求参数

请求
curl 
 -H 'X-BM-KEY:{{AccessKey}}'
 -H 'X-BM-TIMESTAMP:{{currentTime}}'
 -H 'X-BM-SIGN:{{SIGN}}' 
 -X POST -d '{
  "symbol":"ETHUSDT",
  "client_order_id":"BM1234",
  "side":4,
  "type":"limit",
  "mode":1,
  "leverage":"1",
  "open_type":"isolated",
  "size":10,
  "price":"2000"
}'
https://cloud-api.wooxpro.com/contract/private/submit-order
参数类型是否必填描述
symbolString必填合约交易对(如BTCUSDT)
client_order_idString选填用户自定义ID, 字母(区分大小写)与数字的组合,可以是纯字母、纯数字且长度要在1-32位之间
typeString选填订单类型
-limit=限价单(默认)
-market=市价单
sideInt必填订单方向
双向持仓
-1=开多
-2=平空
-3=平多
-4=开空
单向持仓
-1=买入
-2=买入(只减仓)
-3=卖出(只减仓)
-4=卖出
leverageString选填杠杆下单倍数
open_typeString选填开仓类型
-cross=全仓
-isolated=逐仓
modeInt选填下单方式
-1=GTC(默认)
-2=FOK
-3=IOC
-4=Maker Only
priceString必填下单价格,限价单模式必填。
sizeInt必填订单数量 张数
preset_take_profit_price_typeInt选填预设止盈委托价格类型
-1=最新成交价(默认)
-2=标记价格
preset_stop_loss_price_typeInt选填预设止损委托价格类型
-1=最新成交价(默认)
-2=标记价格
preset_take_profit_priceString选填预设止盈价格
preset_stop_loss_priceString选填预设止损价格
stp_modeInt选填自成交保护模式
-1=cancel_maker(默认)
-2=cancel_taker
-3=cancel_both

响应详情

响应
{
  "code": 1000,
  "message": "Ok",
  "data": {
    "order_id": 220609666322019,
    "price": "25637.2"
  },
  "trace": "13f7fda9-9543-4e11-a0ba-cbe117989988"
}
字段类型描述
order_idInt订单编号
priceString订单价格,若提交市价单,将直接返回固定字符串:“market price”