Place Multiple Orders

Rate Limit: 1 request per 1 second

Tip:
You can create order by websocket after login.

Request

only support market reduce-only orders currently.

{
   "id":"",
   "action":"MULTI_PLACE_ORDER",
   "args":[
      {
         "clientOrderId":"",
         "sym":"OKX_PERP_ETH_USDT",
         "side":"SELL",
         "orderType":"MARKET",
         "timeInForce":"IOC",
         "positionSide":"LONG",
         "orderQty":"0.7"
      },
      {
         "clientOrderId":"",
         "sym":"OKX_PERP_ETH_USDT",
         "side":"SELL",
         "orderType":"MARKET",
         "timeInForce":"GTC",
         "positionSide":"LONG",
         "orderQty":"0.4"
      },
      {
         "clientOrderId":"",
         "sym":"OKX_PERP_ETH_USDT",
         "side":"SELL",
         "orderType":"MARKET",
         "timeInForce":"GTC",
         "positionSide":"LONG",
         "orderQty":"0.1"
      }
   ]
}

Field nameTypeNecessaryRemarks
idStringNclient request id
actionStringYplace_order
argsObjectYrequest params
> clientOrderIdStringNCustomer defined order ID ,only support letters(a-z) and numbers(0-9)
> symStringYSym(unique identifier:Exchange_Business_Base_Counter.
Example:
If you want to place a SPOT order for the BTC/USDT trading pair on the Binance exchange, you can use a unique identifier like this: "BINANCE_SPOT_BTC_USDT" ;
If you want to place a PERPETUAL order for the BTC/USDT trading pair on the Binance exchange, you can use a unique identifier like this: "BINANCE_PERP_BTC_USDT" ;
)

Note that we currently only support the SPOT and PERPETUAL trade of Binance and OKX.
> sideStringYSide(BUY, SELL)
> orderTypeStringYOnly support MARKET for now
> timeInForceStringNTimeInForce (default GTC, support type enums:GTC,IOC,FOK,GTX),
GTX = GTC + Post only
> orderQtyStringNOrder quantity(Mandatory, unless spot market buy ) note: trading unit of OKX is the number of contracts/ trading unit of Binance is the number of coin
> positionSideStringNPosition side, must NONE/LONG/SHORT

Response

Success example:

{
   "id":"",
   "event":"MULTI_PLACE_ORDER",
   "code":200000,
   "msg":"Success",
   "data":[
      {
         "orderId":"2028325069557826",
         "clientOrderId":"2028325069557826"
      },
      {
         "orderId":"2028325069558082",
         "clientOrderId":"2028325069558082"
      },
      {
         "orderId":"2028325069558338",
         "clientOrderId":"2028325069558338"
      }
   ]
}

Fail example:

{
   "channel":"Orders",
   "instId":"OKX_PERP_ETH_USDT",
   "data":{
      "portfolioId":"1732605780300000",
      "orderId":"2028325069558338",
      "clientOrderId":"2028325069558338",
      "exchangeType":"OKX",
      "businessType":"PERP",
      "sym":"OKX_PERP_ETH_USDT",
      "limitPrice":"1800.02",
      "orderQty":"0.1",
      "quoteOrderQty":"0",
      "side":"SELL",
      "orderType":"DMA",
      "exchangeOrderType":"MARKET",
      "timeInForce":"GTC",
      "executedQty":"0",
      "executedAmount":"0",
      "executedAvgPrice":"0",
      "lastExecutedQty":"0",
      "lastExecutedPrice":"0",
      "lastExecutedAmount":"0",
      "borrowAmount":"0",
      "borrowAsset":"",
      "fee":"0",
      "feeCoin":"",
      "rebate":"0",
      "rebateCoin":"",
      "orderState":"FAIL",
      "updateAt":"1745894381668",
      "createAt":"1745894381668",
      "reason":"{\"code\":\"401093\",\"message\":\"This order is close order, but your positionQty is 0\"}",
      "reduceOnly":true,
      "leverage":"10",
      "positionSide":"LONG",
      "tpTriggerPrice":"",
      "tpTriggerType":"",
      "tpPrice":"",
      "slTriggerPrice":"",
      "slTriggerType":"",
      "slPrice":""
   }
}
Field nameTypeRemarks
idStringclient request id
eventStringEvent
codeStringCode
msgStringMsg
dataObjectresponse data
> orderIdStringOrder ID
> clientOrderIdStringCustomer defined order ID