v26

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

New Order List - OTOCO (TRADE)

Place an OTOCO.

  • An OTOCO (One-Triggers-One-Cancels-the-Other) is an order list comprised of 3 orders.
  • The first order is called the working order and must be LIMIT or LIMIT_MAKER. Initially, only the working order goes on the order book.
    • The behavior of the working order is the same as the OTO.
  • OTOCO has 2 pending orders (pending above and pending below), forming an OCO pair. The pending orders are only placed on the order book when the working order gets fully filled.
    • The rules of the pending above and pending below follow the same rules as the Order List OCO.
  • OTOCOs add 3 orders against the unfilled order count, EXCHANGE_MAX_NUM_ORDERS filter, and MAX_NUM_ORDERS filter.

Weight: 1

post/api/v3/orderList/otoco

Query parameters

symbolstring required
Example:BNBUSDT

Trading symbol, e.g. BNBUSDT

listClientOrderIdstring

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 workingClientOrderId and the pendingClientOrderId.

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

Set the response JSON.

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.

workingType'LIMIT' | 'LIMIT_MAKER' required

Supported values: LIMIT,LIMIT_MAKER

workingSide'BUY' | 'SELL' required

BUY,SELL

workingClientOrderIdstring

Arbitrary unique ID among open orders for the working order. Automatically generated if not sent.

workingPricenumber double required
workingQuantitynumber double required

Sets the quantity for the working order.

workingIcebergQtynumber double required

This can only be used if workingTimeInForce is GTC.

workingTimeInForce'GTC' | 'IOC' | 'FOK'

GTC, IOC, FOK

workingStrategyIdnumber double

Arbitrary numeric value identifying the working order within an order strategy.

workingStrategyTypeinteger

Arbitrary numeric value identifying the working order strategy. Values smaller than 1000000 are reserved and cannot be used.

pendingSide'BUY' | 'SELL' required

BUY,SELL

pendingQuantitynumber double required

Sets the quantity for the pending order.

pendingAboveType'LIMIT_MAKER' | 'STOP_LOSS' | 'STOP_LOSS_LIMIT' required

Supported values: LIMIT_MAKER, STOP_LOSS, and STOP_LOSS_LIMIT

pendingAboveClientOrderIdstring

Arbitrary unique ID among open orders for the pending above order. Automatically generated if not sent.

pendingAbovePricenumber double
pendingAboveStopPricenumber double
pendingAboveTrailingDeltanumber double
pendingAboveIcebergQtynumber double

This can only be used if pendingAboveTimeInForce is GTC.

pendingAboveTimeInForce'GTC' | 'IOC' | 'FOK'
pendingAboveStrategyIdnumber double

Arbitrary numeric value identifying the pending above order within an order strategy.

pendingAboveStrategyTypeinteger

Arbitrary numeric value identifying the pending above order strategy. Values smaller than 1000000 are reserved and cannot be used.

pendingBelowType'LIMIT_MAKER' | 'STOP_LOSS' | 'STOP_LOSS_LIMIT'

Supported values: LIMIT_MAKER, STOP_LOSS, and STOP_LOSS_LIMIT

pendingBelowClientOrderIdstring

Arbitrary unique ID among open orders for the pending below order. Automatically generated if not sent.

pendingBelowPricenumber double
pendingBelowStopPricenumber double
pendingBelowTrailingDeltanumber double
pendingBelowIcebergQtynumber double

This can only be used if pendingBelowTimeInForce is GTC.

pendingBelowTimeInForce'GTC' | 'IOC' | 'FOK'
pendingBelowStrategyIdnumber double

Arbitrary numeric value identifying the pending below order within an order strategy.

pendingBelowStrategyTypeinteger

Arbitrary numeric value identifying the pending below order strategy. Values smaller than 1000000 are reserved and cannot be used.

recvWindowinteger
Example:5000

The value cannot be greater than 60000

timestampinteger required

UTC timestamp in ms

signaturestring required

Signature

Response

New OTOCO details

orderListIdinteger required
contingencyTypestring required
listStatusTypestring required
listOrderStatusstring required
listClientOrderIdstring required
transactionTimeinteger required
symbolstring required

Example response

{
  "orderListId": 1,
  "contingencyType": "OTOCO",
  "listStatusType": "EXEC_STARTED",
  "listOrderStatus": "EXECUTING",
  "listClientOrderId": "RumwQpBaDctlUu5jyG5rs0",
  "transactionTime": 1712291372842,
  "symbol": "LTCBTC"
}