Skip to main content
POST
/
v1
/
perps
/
orders
/
batch
Create Batched Orders
curl --request POST \
  --url https://api.ondoperps.xyz/v1/perps/orders/batch \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "orders": [
    {
      "side": "buy",
      "market": "AAPL-USD.P",
      "price": "1.55",
      "size": "20.30",
      "quoteSize": "13.0967",
      "clientOrderId": "order123",
      "type": "limit",
      "timeInForce": "GTC",
      "postOnly": false,
      "reduceOnly": false
    }
  ]
}
'
{
  "success": true,
  "result": {
    "addedOrders": [
      {
        "orderId": "197ec08e001658690721be129e7fa595",
        "side": "buy",
        "price": "227.50",
        "size": "10.00",
        "market": "AAPL-USD.P",
        "filledSize": "0.00",
        "lastFillSize": "0.00",
        "filledCost": "0.00",
        "fee": "0.00",
        "status": "open",
        "createdAt": "2025-03-05T14:30:00Z",
        "type": "limit"
      }
    ],
    "failedOrders": []
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
orders
object[]
required

Array of order requests. Must have at least 1 element and at most 20.

Required array length: 1 - 20 elements

Response

Batch order result

success
boolean
required

Whether the request was successful

Example:

true

error
string

Error message, present only on failure

Example:

""

error_code
string

Semantic error code. See each endpoint's error responses for the specific codes it can return.

deprecated
string

Deprecation notice, if applicable

Example:

""

result
object