Orders

Cancel batch of orders by order IDs

Queues cancellation for multiple orders by providing identifiers in a batch.

The request body can contain either or both of:

  • order_ids: Array of order IDs assigned by Paradex
  • client_order_ids: Array of client-assigned order IDs
{
  "order_ids": ["order-id-1", "order-id-2"],
  "client_order_ids": ["client-id-1", "client-id-2"]
}

Returns a 200 OK status code with detailed results for each order:

{
  "results": [
    {
      "id": "order-id-1",
      "client_id": "client-id-X",
      "account": "account-1",
      "market": "BTC-USD-PERP",
      "status": "QUEUED_FOR_CANCELLATION"
    },
    {
      "id": "order-id-2",
      "client_id": "client-id-Y",
      "account": "account-1",
      "market": "ETH-USD-PERP",
      "status": "ALREADY_CLOSED"
    },
    {
      "id": "order-id-3",
      "client_id": "client-id-1",
      "account": "account-1",
      "market": "BTC-USD-PERP",
      "status": "QUEUED_FOR_CANCELLATION"
    },
    {
      "client_id": "client-id-2",
      "status": "NOT_FOUND"
    }
  ]
}

Each result includes:

  • id: Order ID (if the order was found)
  • client_id: Client order ID (if available)
  • account: Account that owns the order
  • market: Market of the order
  • status: One of:
    • QUEUED_FOR_CANCELLATION: Order was successfully queued for cancellation
    • ALREADY_CLOSED: Order was already in a closed state
    • NOT_FOUND: The order with the provided ID/client ID was not found

Confirmation of cancellation will be sent via websocket or can be verified from GET /orders/:id endpoint.

Orders that are already in a CLOSED state will be included in the response with status "ALREADY_CLOSED".

delete/orders/batch

Request body

client_order_idsstring[]

List of client order IDs to cancel

order_idsstring[]

List of order IDs to cancel

Example request

{
  "client_order_ids": [
    "[\"client-id-1\"",
    "\"client-id-2\"]"
  ],
  "order_ids": [
    "[\"order-id-1\"",
    "\"order-id-2\"]"
  ]
}

Response

List of cancellation results

Changes

Changed in 8 of the 65 revisions of this API.2329

    • added the new BLOCK_TRADE_REPLAYED_SIGNATURE enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new EVM_VAULT_OPERATORS_DISABLED enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new VAULT_DATA_PRIVATE enum value to the //// response property for the response status

      response-property-enum-value-added

    • removed the INVALID_RHINOFI_QUOTE enum value from the //// response property for the response status

      response-property-enum-value-removed

    • removed the INVALID_RHINOFI_QUOTE_COMMIT enum value from the //// response property for the response status

      response-property-enum-value-removed

    • removed the INVALID_RHINOFI_REQUEST enum value from the //// response property for the response status

      response-property-enum-value-removed

    • added the new IP_NOT_ALLOWED enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new MARKET_NOT_SETTLED enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new BLOCK_TRADE_INVALID_SIGNATURE enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new BLOCK_TRADE_SIGNER_KEY_UNAUTHORIZED enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new EVM_ADDRESS_ALREADY_ONBOARDED enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new INSUFFICIENT_EVM_BALANCE enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new PORTFOLIO_MARGIN_INVALID_ACCOUNT_KIND enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new PORTFOLIO_MARGIN_ONBOARDING_DISABLED enum value to the //// response property for the response status

      response-property-enum-value-added

    • removed the BAD_STARKNET_REQUEST enum value from the //// response property for the response status

      response-property-enum-value-removed

    • removed the INVALID_PRICE_PRECISION enum value from the //// response property for the response status

      response-property-enum-value-removed

    • removed the TRANSACTION_NOT_FOUND enum value from the //// response property for the response status

      response-property-enum-value-removed

  • 46a57608a7901211See the full diff
    • the response's property type changed from object to no type for status

      response-property-type-changed

    • added the new BLOCK_TRADE_ACCOUNT_MISMATCH enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new BLOCK_TRADE_ALREADY_CANCELLED enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new BLOCK_TRADE_EXPIRED enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new BLOCK_TRADE_INVALID_STATUS enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new BLOCK_TRADE_MISSING_SIGNATURE enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new BLOCK_TRADE_MISSING_SIGNERS enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new BLOCK_TRADE_MISSING_TRADES enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new BLOCK_TRADE_NOT_ENABLED enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new BLOCK_TRADE_NOT_FOUND enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new BLOCK_TRADE_UNAUTHORIZED enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new EVM_SIGNATURE_VERIFICATION_FAILED enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new INVALID_EVM_SIGNATURE enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new MEDIA_NOT_FOUND enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new OFFER_ALREADY_CANCELLED enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new OFFER_INVALID_STATUS enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new OFFER_PARENT_MISMATCH enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new OFFER_PARENT_NOT_ACCEPTING enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new OFFER_UNAUTHORIZED enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new PORTFOLIO_MARGIN_CONFIG_NOT_FOUND enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new SUBKEY_NOT_ACTIVATABLE enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new XP_TRANSFERS_DISABLED enum value to the //// response property for the response status

      response-property-enum-value-added

    • removed the INVALID_JOIN_WAITLIST_REQUEST enum value from the //// response property for the response status

      response-property-enum-value-removed

  • 846a2e2b455b12See the full diff
    • added required request body

      request-body-added-required

    • added the media type application/json for the response with the status

      response-media-type-added

    • added the media type application/json for the response with the status

      response-media-type-added

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog