New Order list - OCO (TRADE)
Send in an one-cancels-the-other (OCO) pair, where activation of one order immediately cancels the other.
- An OCO has 2 orders called the above order and below order.
- One of the orders must be a LIMIT_MAKER order and the other must be STOP_LOSS orSTOP_LOSS_LIMIT order.
- Price restrictions:
- If the OCO is on the SELL side: LIMIT_MAKER price > Last Traded Price > stopPrice
- If the OCO is on the BUY side: LIMIT_MAKER price < Last Traded Price < stopPrice
- OCOs add 2 orders to the unfilled order count, EXCHANGE_MAX_ORDERS filter, and the MAX_NUM_ORDERS filter.
Weight(IP): 1
Query parameters
Trading symbol, e.g. BNBUSDT
Arbitrary unique ID among open order lists. Automatically generated if not sent. A new order list with the same listClientOrderId is accepted only when the previous one is filled or completely expired. listClientOrderId is distinct from the aboveClientOrderId and the belowCLientOrderId.
Supported values : STOP_LOSS_LIMIT, STOP_LOSS, LIMIT_MAKER
Arbitrary unique ID among open orders for the above order. Automatically generated if not sent
Note that this can only be used if aboveTimeInForce is GTC.
Can be used if aboveType is STOP_LOSS or STOP_LOSS_LIMIT. Either aboveStopPrice or aboveTrailingDelta or both, must be specified.
Required if the aboveType is STOP_LOSS_LIMIT.
Arbitrary numeric value identifying the above order within an order strategy.
Arbitrary numeric value identifying the above order strategy. Values smaller than 1000000 are reserved and cannot be used.
Supported values : STOP_LOSS_LIMIT, STOP_LOSS, LIMIT_MAKER
Arbitrary unique ID among open orders for the below order. Automatically generated if not sent
Note that this can only be used if belowTimeInForce is GTC.
Can be used if belowType is STOP_LOSS_LIMIT or LIMIT_MAKER to specify the limit price.
Can be used if belowType is STOP_LOSS or STOP_LOSS_LIMIT. Either belowStopPrice or belowTrailingDelta or both, must be specified.
Required if the belowType is STOP_LOSS_LIMIT.
Arbitrary numeric value identifying the below order within an order strategy.
Arbitrary numeric value identifying the below order strategy. Values smaller than 1000000 are reserved and cannot be used.
Set the response JSON. MARKET and LIMIT order types default to FULL, all other orders default to ACK.
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 OCO details
Example response
{
"orderListId": 1,
"contingencyType": "OCO",
"listStatusType": "EXEC_STARTED",
"listOrderStatus": "EXECUTING",
"listClientOrderId": "lH1YDkuQKWiXVXHPSKYEIp",
"transactionTime": 1710485608839,
"symbol": "LTCBTC",
"orderReports": [
{
"symbol": "LTCBTC",
"orderId": 10,
"orderListId": 1,
"clientOrderId": "44nZvqpemY7sVYgPYbvPih",
"transactTime": 1710485608839,
"price": "1.000000",
"origQty": "5.00000000",
"executedQty": "0.000000",
"cummulativeQuoteQty": "0.000000",
"status": "NEW",
"timeInForce": "GTC",
"type": "STOP_LOSS_LIMIT",
"side": "SELL",
"stopPrice": "1.00000000",
"workingTime": -1,
"icebergQty": "1.00000000",
"selfTradePreventionMode": "NONE"
},
{
"symbol": "LTCBTC",
"orderId": 11,
"orderListId": 1,
"clientOrderId": "NuMp0nVYnciDiFmVqfpBqK",
"transactTime": 1710485608839,
"price": "3.00000000",
"origQty": "5.00000000",
"executedQty": "0.000000",
"cummulativeQuoteQty": "0.000000",
"status": "NEW",
"timeInForce": "GTC",
"type": "LIMIT_MAKER",
"side": "SELL",
"workingTime": 1710485608839,
"selfTradePreventionMode": "NONE"
}
]
}