Batch order
This endpoint allows users to submit multiple order operations in a single request. Batched orders are executed in the order they are batched in, and will not be split up by other users' orders.
The Pacifica Python SDK provides a comprehensive example on using this endpoint
POST /api/v1/orders/batchOperation Type (for signing)
None
-
Batch orders are not signed as a whole, but rather by its individual actions components.
Request Body
"actions"
array
required
List of order actions to perform Each action has an "type" field and action-specific "data"
See next two rows
"type"
string
required
Specifies type of action. This is DIFFERENT to the "type" used in signature headers
"Create" "Cancel"
(case sensitive)
{
   "actions":[
      {
         "type":"Create",
         "data":{
            "account":"42trU9A5...",
            "signature":"5UpRZ14Q...",
            "timestamp":1749190500355,
            "expiry_window":5000,
            "symbol":"BTC",
            "price":"100000",
            "reduce_only":false,
            "amount":"0.1",
            "side":"bid",
            "tif":"GTC",
            "client_order_id":"57a5efb1-bb96-49a5-8bfd-f25d5f22bc7e"
         }
      },
      {
         "type":"Cancel",
         "data":{
            "account":"42trU9A5...",
            "signature":"4NDFHyTG...",
            "timestamp":1749190500355,
            "expiry_window":5000,
            "symbol":"BTC",
            "order_id":42069
         }
      }
   ]
}Response
- Status 200: Batch operations processed successfully 
{
  "success": true,
  "data": {
    "results": [
      {
        "success": true,
        "order_id": 470506,
        "error": null
      },
      {
        "success": true,
      }
    ]
  },
    "error": null,
    "code": null
}- Status 400: Bad request 
  {
    "error": "Invalid batch operation parameters",
    "code": 400
  }- Status 500: Internal server error 
Last updated
