Margin Account New OCO (TRADE)
Changed onSend in a new OCO for a margin account
- Price Restrictions:
- SELL: Limit Price > Last Price > Stop Price
- BUY: Limit Price < Last Price < Stop Price
- Quantity Restrictions:
- Both legs must have the same quantity
- ICEBERG quantities however do not have to be the same.
- Order Rate Limit
- OCO counts as 2 orders against the order rate limit.
Weight(UID): 6
Request
- Base URLhttps://api.binance.com
- URLhttps://api.binance.com/sapi/v1/margin/order/oco
- AuthAPI key in header X-MBX-APIKEY
Query parameters
Trading symbol, e.g. BNBUSDT
- TRUE - For isolated margin
- FALSE - Default, not for isolated margin
A unique Id for the entire orderList
A unique Id for the limit order
Order price
A unique Id for the stop loss/stop loss limit leg
If provided, stopLimitTimeInForce is required.
Set the response JSON.
Default NO_SIDE_EFFECT
The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE.
The value cannot be greater than 60000
UTC timestamp in ms
Signature
Response
New Margin OCO details
Example response
{
"contingencyType": "OCO",
"listStatusType": "EXEC_STARTED",
"listOrderStatus": "EXECUTING",
"listClientOrderId": "JYVpp3F0f5CAG15DhtrqLp",
"transactionTime": 1563417480525,
"symbol": "LTCBTC",
"marginBuyBorrowAmount": "5",
"marginBuyBorrowAsset": "BTC",
"orders": [
{
"symbol": "LTCBTC",
"orderId": 2,
"clientOrderId": "Kk7sqHb9J6mJWTMDVW7Vos"
},
{
"symbol": "LTCBTC",
"orderId": 3,
"clientOrderId": "xTXKaGYd4bluPVp78IVRvl"
}
],
"orderReports": [
{
"symbol": "LTCBTC",
"orderId": 2,
"orderListId": 0,
"clientOrderId": "Kk7sqHb9J6mJWTMDVW7Vos",
"transactTime": 1563417480525,
"price": "0.000000",
"origQty": "0.624363",
"executedQty": "0.000000",
"cummulativeQuoteQty": "0.000000",
"status": "NEW",
"timeInForce": "GTC",
"type": "STOP_LOSS",
"side": "BUY",
"stopPrice": "0.960664"
},
{
"symbol": "LTCBTC",
"orderId": 3,
"orderListId": 0,
"clientOrderId": "xTXKaGYd4bluPVp78IVRvl",
"transactTime": 1563417480525,
"price": "0.036435",
"origQty": "0.624363",
"executedQty": "0.000000",
"cummulativeQuoteQty": "0.000000",
"status": "NEW",
"timeInForce": "GTC",
"type": "LIMIT_MAKER",
"side": "BUY"
}
]
}Changes
- info
added the new optional
queryrequest parameterselfTradePreventionMode
- info
- breaking
for the
queryrequest parameterrecvWindow, the format changed from no format toint64 - breaking
for the
queryrequest parametertimestamp, the format changed from no format toint64 - info
for the
queryrequest parameterlimitIcebergQty, the format was generalized fromfloattodouble - info
for the
queryrequest parameterprice, the format was generalized fromfloattodouble - info
for the
queryrequest parameterquantity, the format was generalized fromfloattodouble - info
for the
queryrequest parameterstopIcebergQty, the format was generalized fromfloattodouble - info
for the
queryrequest parameterstopLimitPrice, the format was generalized fromfloattodouble - info
for the
queryrequest parameterstopPrice, the format was generalized fromfloattodouble - info
the response property
became required for the status - info
the response property
became required for the status - info
the response property
became required for the status - info
the response property
became required for the status - info
the response property
became required for the status - info
the response property
became required for the status - info
the response property
became required for the status - info
the response property
became required for the status - info
the response property
became required for the status - info
the response property
became required for the status - info
the response property
became required for the status - info
the response property
became required for the status - info
the response property
became required for the status - info
the response property
//became required for the status - info
the response property
//became required for the status - info
the response property
//became required for the status - info
the response property
//became required for the status - info
the response property
//became required for the status - info
the response property
//became required for the status - info
the response property
//became required for the status - info
the response property
//became required for the status - info
the response property
//became required for the status - info
the response property
//became required for the status - info
the response property
//became required for the status - info
the response property
//became required for the status - info
the response property
//became required for the status - info
the response property
//became required for the status - info
the response property
became required for the status - info
the response property
//became required for the status - info
the response property
//became required for the status - info
the response property
//became required for the status - info
the response property
became required for the status - info
the response property
became required for the status
- breaking