Batch Order

Batch order (Authentication type:SIGNED, See Interface Permission)

Request Format

POST https://api-cloud.bitmart.com/spot/v1/batch_orders

Request Limit

See Detailed Rate Limit

Request Parameter

Field Type Required? Description
orderParams List Yes Order parameters, the number of transactions cannot exceed 10

orderParam

Field Type Required? Description
symbol string Yes Trading pair (e.g. BTC_USDT)
side string Yes Side
buy=Buy order
sell=Sell order
type string Yes Order type
Yes limit=Limit order
Yes market=Market order
Yes limit_maker
Yes ioc

Special Parameters for Limit/limit_maker/ioc Orders (type=limit/limit_maker/ioc)

Field Type Required? Description
size string Yes Order size
price string Yes Price

Special Parameters for Market Orders (type=market)

Field Type Required? Description
size string Yes Quantity sold, required when selling at market price size
notional string Yes Quantity bought, required when buying at market price notional

Instruction

Buy-limit-maker When "order price">="market lowest selling price", the system will refuse to accept the order after the order is submitted When the "order price" <"the lowest selling price in the market", the order will be accepted by the system after the submission is successful

Sell-limit-maker When "order price" <= "market highest bid price", after the order is submitted, the system will refuse to accept the order When "order price"> "market highest bid price", the order will be accepted by the system after the submission is successful

Buy-ioc,Sell-ioc After the order is placed, all orders that cannot be filled immediately are cancelled immediately

Request example

https://api-cloud.bitmart.com/spot/v1/batch_orders

{
    "orderParams":[
        {
        "symbol":"BTC_USDT",
        "size":"0.1",
        "price":"8800",
        "side":"buy",
        "type":"limit"
        },
        {
        "symbol":"BTC_USDT",
        "size":"0.1",
        "price":"8800",
        "side":"sell",
        "type":"limit"
        }
    ]
}

Response Data

Field Type Description
order_id long Order ID

Instruction

The request is successful only when order_id is returned.

Example of returned data format

{
  "code": 1000,
  "trace":"886fb6ae-456b-4654-b4e0-d681ac05cea1",
  "message": "OK",
  "data": {
    "orderResponses": [
      {
        "code": 11402,
        "msg": "Balance not enough"
      },
      {
        "code": 0,
        "msg": "SUCCESS",
        "data": {
          "orderId": 145771
        }
      }
    ]
  }
}

results matching ""

    No results matching ""