Cancel Batch Orders
Cancel Batch Orders
POSThttps://api.gemini.com/v1/prediction-markets/order/batch/cancel
Cancel 1 to 20 prediction market orders in one authenticated request. The batch is synchronous and non-atomic: invalid IDs reject the entire batch before cancellation begins, while exchange cancellation errors are returned per entry and do not stop later entries.
POST
curl --request POST \
--url https://api.gemini.com/v1/prediction-markets/order/batch/cancel \
--header 'Content-Type: application/json' \
--header 'X-GEMINI-APIKEY: <string>' \
--header 'X-GEMINI-PAYLOAD: <string>' \
--header 'X-GEMINI-SIGNATURE: <string>' \
--data '
{
"orderIds": [
12345678,
"12345679"
]
}
'Roles
The API key you use to access this endpoint must have the Trader role assigned. See Roles for more information.
The OAuth scope must have orders:create assigned to access this endpoint. See OAuth Scopes for more information.
Batch Behavior
- The complete payload is encoded and signed once.Code
- Each order ID may be a JSON integer or a quoted numeric string.
- Gemini validates every ID before attempting any cancellation. An invalid ID, an empty batch, or more than 20 entries rejects the entire request.
- After validation, cancellations are attempted sequentially and results remain aligned with request order.
- An exchange rejection such as is returned in that entry's result. Other valid cancellations continue to be attempted.Code
Headers
Request Body
Responses
Batch processed. Results are returned in request order and may contain both successful cancellations and per-entry errors.
Last modified on