跳到主要内容

杠杆账户 OCO 下单 (TRADE)

接口描述

杠杆账户发送新 OCO 订单

HTTP请求

POST /papi/v1/margin/order/oco

请求权重

1

请求参数

名称类型是否必需描述
symbolSTRINGYES
listClientOrderIdSTRINGNO整个 orderList 的唯一 ID
sideENUMYES详见枚举定义:订单方向
quantityDECIMALYES
limitClientOrderIdSTRINGNO限价单的唯一 ID
priceDECIMALYES
limitIcebergQtyDECIMALNO
stopClientOrderIdSTRINGNO止损/止损限价单的唯一 ID
stopPriceDECIMALYES
stopLimitPriceDECIMALNO如果提供,须配合提交stopLimitTimeInForce
stopIcebergQtyDECIMALNO
stopLimitTimeInForceENUMNO有效值 GTC/FOK/IOC
newOrderRespTypeENUMNO详见枚举定义:订单返回类型
sideEffectTypeENUMNONO_SIDE_EFFECT, MARGIN_BUY, AUTO_REPAY; 默认为 NO_SIDE_EFFECT
recvWindowLONGNO不能大于 60000
timestampLONGYES

Other Info:

  • 价格限制:
    • SELL: 限价 > 最新成交价 >触发价
    • BUY: 限价 < 最新成交价 < 触发价
  • 数量限制:
    • 两个 legs 必须具有同样的数量
    • ICEBERG 数量不必相同
  • 下单 rate:
    • 一个OCO订单被算成 2 个普通订单

响应示例

{
"orderListId": 0,
"contingencyType": "OCO",
"listStatusType": "EXEC_STARTED",
"listOrderStatus": "EXECUTING",
"listClientOrderId": "JYVpp3F0f5CAG15DhtrqLp",
"transactionTime": 1563417480525,
"symbol": "LTCBTC",
"marginBuyBorrowAmount": "5", // 下单后没有发生借款则不返回该字段
"marginBuyBorrowAsset": "BTC", // 下单后没有发生借款则不返回该字段
"orders": [
{
"symbol": "LTCBTC",
"orderId": 2,
"clientOrderId": "Kk7sqHb9J6mJWTMDVW7Vos"
},
{
"symbol": "LTCBTC",
"orderId": 3,
"clientOrderId": "xTXKaGYd4bluPVp78IVRvl"
}
],
"orderReports": [
{
"symbol": "LTCBTC",
"orderId": 2,
"orderListId": 0,
"clientOrderId": "Kk7sqHb9J6mJWTMDVW7Vos",
"transactTime": 1563417480525,
"price": "0.000000",
"origQty": "0.624363",
"executedQty": "0.000000",
"cummulativeQuoteQty": "0.000000",
"status": "NEW",
"timeInForce": "GTC",
"type": "STOP_LOSS",
"side": "BUY",
"stopPrice": "0.960664"
},
{
"symbol": "LTCBTC",
"orderId": 3,
"orderListId": 0,
"clientOrderId": "xTXKaGYd4bluPVp78IVRvl",
"transactTime": 1563417480525,
"price": "0.036435",
"origQty": "0.624363",
"executedQty": "0.000000",
"cummulativeQuoteQty": "0.000000",
"status": "NEW",
"timeInForce": "GTC",
"type": "LIMIT_MAKER",
"side": "BUY"
}
]
}