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
Status 400: Bad request
Status 500: Internal server error
Notes on Batch Ordering:
Speed Bump (Latency Protection)
Batch orders are subject to a conditional ~200ms delay to protect liquidity providers from adverse selection: Speed bump is applied if the batch contains:
Market orders (CreateMarket)
Limit orders with TIF = GTC or IOC
Speed bump is NOT applied if the batch only contains:
Add Liquidity Only orders (TIF = ALO)
Top of Book orders (TIF = TOB)
Cancel operations
TP/SL operations
Signature Requirements
Each action in the batch must be individually signed
All signatures must be valid for the batch to process
Execution Behavior and Limits
Maximum 10 actions per batch request
Actions are executed atomically in the order provided
If one action fails, subsequent actions are still attempted
Last updated