Margin Account New Order (TRADE)
#
API DescriptionPost a new order for margin account.
#
HTTP RequestPOST /sapi/v1/margin/order
#
Request Weight6(UID)
#
Request ParametersName | Type | Mandatory | Description |
---|---|---|---|
symbol | STRING | YES | |
isIsolated | STRING | NO | for isolated margin or not, "TRUE", "FALSE",default "FALSE" |
side | ENUM | YES | BUY SELL |
type | ENUM | YES | |
quantity | DECIMAL | NO | |
quoteOrderQty | DECIMAL | NO | |
price | DECIMAL | NO | |
stopPrice | DECIMAL | NO | Used with STOP_LOSS , STOP_LOSS_LIMIT , TAKE_PROFIT , and TAKE_PROFIT_LIMIT orders. |
newClientOrderId | STRING | NO | A unique id among open orders. Automatically generated if not sent. |
icebergQty | DECIMAL | NO | Used with LIMIT , STOP_LOSS_LIMIT , and TAKE_PROFIT_LIMIT to create an iceberg order. |
newOrderRespType | ENUM | NO | Set the response JSON. ACK, RESULT, or FULL; MARKET and LIMIT order types default to FULL, all other orders default to ACK. |
sideEffectType | ENUM | NO | NO_SIDE_EFFECT, MARGIN_BUY, AUTO_REPAY,AUTO_BORROW_REPAY; default NO_SIDE_EFFECT. |
timeInForce | ENUM | NO | GTC,IOC,FOK |
selfTradePreventionMode | ENUM | NO | The allowed enums is dependent on what is configured on the symbol. The possible supported values are 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 | The value cannot be greater than 60000 |
timestamp | LONG | YES |
- autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid under high frequent new order/cancel order execution
#
Response ExampleResponse ACK:
Response RESULT:
Response FULL: