v26

latestOpenAPI 3.0.2raw.githubusercontent.com2024-10-0834042975.6 KB
Margin

Margin Account New Order (TRADE)

Post a new order for margin account.

Weight(UID): 6

post/sapi/v1/margin/order

Query parameters

symbolstring required
Example:BNBUSDT

Trading symbol, e.g. BNBUSDT

isIsolated'TRUE' | 'FALSE'
  • TRUE - For isolated margin
  • FALSE - Default, not for isolated margin
side'SELL' | 'BUY' required
Example:SELL
type'LIMIT' | 'MARKET' | 'STOP_LOSS' | 'STOP_LOSS_LIMIT' | 'TAKE_PROFIT' | 'TAKE_PROFIT_LIMIT' | 'LIMIT_MAKER' required
Example:LIMIT

Order type

quantitynumber double required
Example:1
quoteOrderQtynumber double

Quote quantity

pricenumber double
Example:219

Order price

stopPricenumber double
Example:221.01

Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders.

newClientOrderIdstring

Used to uniquely identify this cancel. Automatically generated by default

icebergQtynumber double

Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order.

newOrderRespType'ACK' | 'RESULT' | 'FULL'

Set the response JSON.

sideEffectType'NO_SIDE_EFFECT' | 'MARGIN_BUY' | 'AUTO_REPAY'

Default NO_SIDE_EFFECT

timeInForce'GTC' | 'IOC' | 'FOK'
Example:GTC

Order time in force

autoRepayAtCancelboolean required
Example:true
selfTradePreventionMode'EXPIRE_TAKER' | 'EXPIRE_MAKER' | 'EXPIRE_BOTH' | 'NONE'
Example:EXPIRE_TAKER

The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE.

recvWindowinteger
Example:5000

The value cannot be greater than 60000

timestampinteger required

UTC timestamp in ms

signaturestring required

Signature

Response

Margin order info

OR
OR

Example response

{
  "symbol": "BTCUSDT",
  "orderId": 28,
  "clientOrderId": "6gCrw2kRUAF9CvJDGP16IP",
  "transactTime": 1507725176595
}