Margin Account New OCO (TRADE)
Send 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
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
Changed in 2 of the 26 revisions of this API.240
- ○
added the new optional
queryrequest parameterselfTradePreventionModenew-optional-request-parameter
- ○
- ▲
for the
queryrequest parameterrecvWindow, the type/format was changed frominteger/tointeger/int64request-parameter-type-changed
- ▲
for the
queryrequest parametertimestamp, the type/format was changed frominteger/tointeger/int64request-parameter-type-changed
- ○
for the
queryrequest parameterlimitIcebergQty, the type/format was generalized fromnumber/floattonumber/doublerequest-parameter-type-generalized
- ○
for the
queryrequest parameterprice, the type/format was generalized fromnumber/floattonumber/doublerequest-parameter-type-generalized
- ○
for the
queryrequest parameterquantity, the type/format was generalized fromnumber/floattonumber/doublerequest-parameter-type-generalized
- ○
for the
queryrequest parameterstopIcebergQty, the type/format was generalized fromnumber/floattonumber/doublerequest-parameter-type-generalized
- ○
for the
queryrequest parameterstopLimitPrice, the type/format was generalized fromnumber/floattonumber/doublerequest-parameter-type-generalized
- ○
for the
queryrequest parameterstopPrice, the type/format was generalized fromnumber/floattonumber/doublerequest-parameter-type-generalized
- ○
the response property
codebecame required for the status400response-property-became-required
- ○
the response property
codebecame required for the status401response-property-became-required
- ○
the response property
contingencyTypebecame required for the status200response-property-became-required
- ○
the response property
isIsolatedbecame required for the status200response-property-became-required
- ○
the response property
listClientOrderIdbecame required for the status200response-property-became-required
- ○
the response property
listOrderStatusbecame required for the status200response-property-became-required
- ○
the response property
listStatusTypebecame required for the status200response-property-became-required
- ○
the response property
marginBuyBorrowAmountbecame required for the status200response-property-became-required
- ○
the response property
marginBuyBorrowAssetbecame required for the status200response-property-became-required
- ○
the response property
msgbecame required for the status400response-property-became-required
- ○
the response property
msgbecame required for the status401response-property-became-required
- ○
the response property
orderListIdbecame required for the status200response-property-became-required
- ○
the response property
orderReportsbecame required for the status200response-property-became-required
- ○
the response property
orderReports/items/clientOrderIdbecame required for the status200response-property-became-required
- ○
the response property
orderReports/items/cummulativeQuoteQtybecame required for the status200response-property-became-required
- ○
the response property
orderReports/items/executedQtybecame required for the status200response-property-became-required
- ○
the response property
orderReports/items/orderIdbecame required for the status200response-property-became-required
- ○
the response property
orderReports/items/orderListIdbecame required for the status200response-property-became-required
- ○
the response property
orderReports/items/origQtybecame required for the status200response-property-became-required
- ○
the response property
orderReports/items/pricebecame required for the status200response-property-became-required
- ○
the response property
orderReports/items/sidebecame required for the status200response-property-became-required
- ○
the response property
orderReports/items/statusbecame required for the status200response-property-became-required
- ○
the response property
orderReports/items/stopPricebecame required for the status200response-property-became-required
- ○
the response property
orderReports/items/symbolbecame required for the status200response-property-became-required
- ○
the response property
orderReports/items/timeInForcebecame required for the status200response-property-became-required
- ○
the response property
orderReports/items/transactTimebecame required for the status200response-property-became-required
- ○
the response property
orderReports/items/typebecame required for the status200response-property-became-required
- ○
the response property
ordersbecame required for the status200response-property-became-required
- ○
the response property
orders/items/clientOrderIdbecame required for the status200response-property-became-required
- ○
the response property
orders/items/orderIdbecame required for the status200response-property-became-required
- ○
the response property
orders/items/symbolbecame required for the status200response-property-became-required
- ○
the response property
symbolbecame required for the status200response-property-became-required
- ○
the response property
transactionTimebecame required for the status200response-property-became-required
- ▲