跳到主要内容

杠杆账户下单(TRADE)

接口描述

杠杆账户下单

HTTP请求

POST /papi/v1/margin/order

请求权重

1

请求参数

名称类型是否必需描述
symbolSTRINGYES
sideENUMYESBUY ; SELL
typeENUMYES详见枚举定义:订单类型
quantityDECIMALNO
quoteOrderQtyDECIMALNO
priceDECIMALNO
stopPriceDECIMALNOSTOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT,和 TAKE_PROFIT_LIMIT 订单一起使用
newClientOrderIdSTRINGNO客户自定义的唯一订单ID。若未发送自动生成。
newOrderRespTypeENUMNO设置响应: JSON。 ACKRESULT, 或 FULL; MARKETLIMIT 订单类型默认为 FULL, 所有其他订单默认为 ACK
icebergQtyDECIMALNOLIMITSTOP_LOSS_LIMIT,和 TAKE_PROFIT_LIMIT 一起使用创建 iceberg 订单
sideEffectTypeENUMNONO_SIDE_EFFECTMARGIN_BUYAUTO_REPAY,AUTO_BORROW_REPAY;默认为 NO_SIDE_EFFECT
timeInForceENUMNOGTCIOCFOK
selfTradePreventionModeENUMNO允许的 ENUM 取决于交易对的配置。支持的值有 EXPIRE_TAKER,EXPIRE_MAKER,EXPIRE_BOTH,NONE
autoRepayAtCancelBOOLEANNOOnly when MARGIN_BUY or AUTO_BORROW_REPAY order takes effect, true means that the debt generated by the order needs to be repay after the order is cancelled. The default is true
recvWindowLONGNO赋值不能超过 60000
timestampLONGYES

响应示例

{
"symbol": "BTCUSDT",
"orderId": 28,
"clientOrderId": "6gCrw2kRUAF9CvJDGP16IP",
"transactTime": 1507725176595,
"price": "1.00000000",
"origQty": "10.00000000",
"executedQty": "10.00000000",
"cummulativeQuoteQty": "10.00000000",
"status": "FILLED",
"timeInForce": "GTC",
"type": "MARKET",
"side": "SELL",
"marginBuyBorrowAmount": 5, // 下单后没有发生借款则不返回该字段
"marginBuyBorrowAsset": "BTC", // 下单后没有发生借款则不返回该字段
"fills": [
{
"price": "4000.00000000",
"qty": "1.00000000",
"commission": "4.00000000",
"commissionAsset": "USDT"
},
{
"price": "3999.00000000",
"qty": "5.00000000",
"commission": "19.99500000",
"commissionAsset": "USDT"
}
]
}