Skip to main content

New Margin Order(TRADE)

API Description#

New Margin Order

HTTP Request#

POST /papi/v1/margin/order

Request Weight#

1

Request Parameters#

NameTypeMandatoryDescription
symbolSTRINGYES
sideENUMYESBUY ; SELL
typeENUMYES
quantityDECIMALNO
quoteOrderQtyDECIMALNO
priceDECIMALNO
stopPriceDECIMALNOUsed with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders.
newClientOrderIdSTRINGNOA unique id among open orders. Automatically generated if not sent.
newOrderRespTypeENUMNOSet the response JSON. ACK, RESULT, or FULL; MARKET and LIMIT order types default to FULL, all other orders default to ACK.
icebergQtyDECIMALNOUsed with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order
sideEffectTypeENUMNONO_SIDE_EFFECT, MARGIN_BUY, AUTO_REPAY; default NO_SIDE_EFFECT.
timeInForceENUMNOGTC,IOC,FOK
recvWindowLONGNOThe value cannot be greater than 60000
timestampLONGYES

Response Example#

{  "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,       // will not return if no margin trade happens  "marginBuyBorrowAsset": "BTC",    // will not return if no margin trade happens  "fills": [    {      "price": "4000.00000000",      "qty": "1.00000000",      "commission": "4.00000000",      "commissionAsset": "USDT"    },    {      "price": "3999.00000000",      "qty": "5.00000000",      "commission": "19.99500000",      "commissionAsset": "USDT"    }  ]}