Batch Cancel Orders

Batch cancel up to 300 orders that satisfy the specified conditions.

Check the proper endpoint based on your region.
The examples in this page is written using Singapore fiat code(SGD). Set the quote currency to match your region. The base_url differs by country/region. Make sure to specify the correct region value for your environment.

- Singapore (sg): https://sg-api.upbit.com
- Indonesia (id): https://id-api.upbit.com
- Thailand (th): https://th-api.upbit.com

Batch Cancellation Eligibility by Order Status

The Batch cancellation API can only cancel orders in the WAIT (pending) status.

However, since trades may occur during the cancellation process, the order quantity at the time of the cancellation request and the canceled order quantity after completion may differ.

Orders in a reserved state (WATCH) cannot be canceled using the Bulk Cancel API. TTo cancel these orders, use either the Cancel Order or the Cancel Orders by IDs API.


Cancellation Target Specification

To specify the orders for bulk cancellation, you can use the following criteria:

  • Order Side: Optionally cancel only buy or sell orders.
  • Pairs: Specify up to 20 pairs to include for cancellation, or specify pairs to exclude from cancellation.
  • Market (Quote Asset): Cancel orders only within a specific market.
  • Cancellation Count and Sorting Option: Cancel a specified number of orders sorted by newest or oldest first.

If any pairs included in the target pairs or target market overlap with pairs listed in the exclusion list (excluded_pairs), the exclusion list takes higher priority, and such pairs are excluded from cancellation.

Order Cancellation Request Rejection Cases
Order cancellation requests may be rejected for the following reasons:
  • Orders that have already been fully executed and cannot be canceled
  • Orders that have already been canceled
  • Orders whose pairs have been temporarily suspended due to rebranding or other reasons
  • This API supports only query parameter format.
    All request parameters must be sent as query parameters. Form or JSON format parameters in the Request Body are not supported.

    Example /v1/orders/open?cancel_side=bid
    The pair(s) and market (quote_currencies) conditions cannot be used simultaneously.
    Only one of these parameters can be included at most. If neither parameter is specified, the bulk cancellation order applies to all markets.

    Version Date Changes
    v1.1.9 2024-12-11 Addition of Batch Order Cancel
    Rate Limit
    Up to 2 calls per second are allowed. This is measured on an account basis and request counts are shared within the exchange 'order-cancel-all' group.

    API Key Permission
    This API requires authentication and an API Key with [Make Orders] permission.
    If you encounter an out_of_scope error, please verify your permissions in the API Key Management page.
    Query Params
    string

    List of quote currencies to cancel orders of the market.
    A filter parameter that allows you to limit the orders to be canceled by the currency used to purchase digital assets (SGD, BTC, USDT). Cancels all open orders belonging to the specified market.

    [Example] Specifying "SGD" cancels all open orders in the SGD market.

    string
    enum
    Defaults to all

    Direction of orders to cancel.
    A filter parameter that allows you to limit the cancellation target by buy/sell type. The available values are "all" (both buy and sell), "ask" (sell), and "bid" (buy).

    [Example] "ask" cancels all open sell orders.

    Allowed:
    integer
    Defaults to 20

    Number of orders to cancel (max 300).
    Default: 20.
    If the number of open orders exceeds this limit, orders will be canceled according to the specified sorting order up to this limit.

    string
    enum
    Defaults to desc

    Sorting method for orders to cancel.
    Cancels orders sorted by creation time up to the "count" limit. Default is "desc".

    The available values are "desc" (descending, latest orders first) or "asc" (ascending, oldest orders first). The default value is "desc".

    Allowed:
    string

    Trading pairs to cancel orders for.
    A filter parameter that allows you to limit the cancellation target by order pair. Cancels only open orders for the specified pair. Up to 20 pairs can be specified, and when specifying two or more pairs, use a comma-separated string format.

    [Example] pairs=SGD-BTC,SGD-ETH

    string

    Trading pairs to cancel orders for.
    A filter parameter that allows you to limit the cancellation target to all pairs except the specified pair. Cancels all orders except those for the specified pair.
    Up to 20 pairs can be specified, and when specifying two or more pairs, use a comma-separated string format.

    [Example] pairs=SGD-BTC,SGD-ETH

    Responses

    Language
    URL
    LoadingLoading…
    Response
    Choose an example:
    application/json