杠杆账户下单(TRADE)
接口描述
杠杆账户下单
HTTP请求
POST /papi/v1/margin/order
请求权重
1
请求参数
| 名称 | 类型 | 是否必需 | 描述 |
|---|---|---|---|
| symbol | STRING | YES | |
| side | ENUM | YES | BUY ; SELL |
| type | ENUM | YES | 详见枚举定义:订单类型 |
| quantity | DECIMAL | NO | |
| quoteOrderQty | DECIMAL | NO | |
| price | DECIMAL | NO | |
| stopPrice | DECIMAL | NO | 与 STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT,和 TAKE_PROFIT_LIMIT 订单一起使用 |
| newClientOrderId | STRING | NO | 客户自定义的唯一订单ID。若未发送自动生成。 |
| newOrderRespType | ENUM | NO | 设置响应: JSON。 ACK, RESULT, 或 FULL; MARKET 和 LIMIT 订单类型默认为 FULL, 所有其他订单默认为 ACK |
| icebergQty | DECIMAL | NO | 与 LIMIT, STOP_LOSS_LIMIT,和 TAKE_PROFIT_LIMIT 一起使用创建 iceberg 订单 |
| sideEffectType | ENUM | NO | NO_SIDE_EFFECT, MARGIN_BUY,AUTO_REPAY,AUTO_BORROW_REPAY;默认为 NO_SIDE_EFFECT |
| timeInForce | ENUM | NO | GTC,IOC,FOK |
| selfTradePreventionMode | ENUM | NO | 允许的 ENUM 取决于交易对的配置。支持的值有 EXPIRE_TAKER,EXPIRE_MAKER,EXPIRE_BOTH,NONE |
| autoRepayAtCancel | BOOLEAN | NO | Only 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 |
| recvWindow | LONG | NO | 赋值不能超过 60000 |
| timestamp | LONG | YES |
响应示例
{
"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"
}
]
}