Skip to content

Batch Place Orders

Description

Place orders in batch

HTTP Request

  • POST /open/api/batchOrders

Request Parameters

ParameterTypeRequiredDescription
api_keyStringYesthe key is in the user api management
timeLongYesit is the current timestamp
signStringYesthe string is generated according to signature rule
symbolStringYescoin pair, example: btcusdt
orderListList<Object>Noorder list, which length must be less than 100
>orderList.volumeStringYesorder volume
>orderList.priceStringNoorder price, when the type is 2, it isn't required
>orderList.sideStringYesorder side: BUY, SELL
>orderList.typeIntegerYesorder type: 1 limit,2 market
>orderList.volumeTypeIntegerYesorder volume type
1 amount value volume, e.g. buy or sell with a total value of 1000 USDT.
2 base coin amount volume, e.g. buy or sell 1 BTC.
If the order is limit order (type = 1), then vlumeType must be 2. If it is market order (type = 2), whether it's a buy or sell order, volumeType can be either 1 or 2
>orderList.clientOrderIdStringNoclient order ID

Request Example

http
curl -X POST 'https://openapi.100ex.com/open/api/batchOrders' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'api_key=*********&time=1743921229830&sign=*********&symbol=BTCUSDT&symbol=BTCUSDT&orderList=[{"price":"70000","side":"BUY","type":1,"volume":0.00001,"volumeType":1,"clientOrderId":"client00004"},{"price":"70200","side":"BUY","type":1,"volume":0.00001,"volumeType":1,"clientOrderId":"client00005"}],
{"price":"70300","side":"BUY","type":1,"volume":0.00001,"volumeType":1,"clientOrderId":"client000001"}'

Response Parameters

ParameterTypeDescription
successListListSuccessful order list
>orderIdLongOrder ID
>clientOrderIdStringClient order ID
>sideStringOrder side
>priceStringOrder price
failureListListFailed order list
>orderIdLongOrder ID
>clientOrderIdStringClient order ID
>errorMsgStringError information

Response Example

json
{
    "code": "0",
    "msg": "suc",
    "data": {
        "failureList": [
            {
                "orderId": 443037583316877312,
                "clientOrderId": "client000001",
                "errMsg": "duplicate clientOrderId"
            }
        ],
        "successList": [
            {
                "side": "BUY",
                "orderId": 443057883307835392,
                "price": "70000",
                "clientOrderId": "client00004"
            },
            {
                "side": "BUY",
                "orderId": 443057883307835393,
                "price": "70200",
                "clientOrderId": "client00005"
            }
        ]
    },
    "message": null,
    "traceId": null
}

Status Code

CodeDescription
0success
1system error
2parameters error
3user's trading has been frozen
5fail to place order
9the trading was froze
31the price or amount is less than the minimum value
35placing orders is not allowed
100004illegal parameter
100005illegal sign
100007illegal ip address
100008the request time is expired
10062price or volume precision exceeds the maximum limit.
10063the volume is less than the minimum value
101151there are open liquidation orders for the coin pair
210006this user isn't in the whitelist of open-api
210014Spot bulk order exceeds the maximum limit
210015Spot bulk cancellation exceeds the maximum limit