> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cdp.coinbase.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Cancel Orders

> Initiate cancel requests for one or more orders.

**Equities:** Equity orders use the same `order_ids` request and per-order result format as other products. Do not include `equity_order_metadata` when canceling an order.



## OpenAPI

````yaml POST  /api/v3/brokerage/orders/batch_cancel
openapi: 3.1.0
info:
  title: Coinbase Advanced Trade API
  version: '0.1'
servers:
  - url: https://api.coinbase.com
security:
  - ApiKey: []
  - OAuth2: []
paths:
  /api/v3/brokerage/orders/batch_cancel:
    post:
      tags:
        - Orders
      summary: Cancel Orders
      description: >-
        Initiate cancel requests for one or more orders.


        **Equities:** Equity orders use the same `order_ids` request and
        per-order result format as other products. Do not include
        `equity_order_metadata` when canceling an order.
      operationId: RetailBrokerageApi_CancelOrders
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.CancelOrdersRequest
        required: true
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.CancelOrdersResponse
            text/event-stream:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.CancelOrdersResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/grpc.gateway.runtime.Error'
      security:
        - ApiKey:
            - trade
        - OAuth2:
            - wallet:buys:create
components:
  schemas:
    coinbase.public_api.authed.retail_brokerage_api.CancelOrdersRequest:
      type: object
      properties:
        order_ids:
          type: array
          example:
            - 0000-00000
            - 1111-11111
          items:
            type: string
          description: The order IDs that cancel requests should be initiated for.
          required:
            - order_ids
      required:
        - order_ids
    coinbase.public_api.authed.retail_brokerage_api.CancelOrdersResponse:
      type: object
      properties:
        results:
          type: array
          items:
            $ref: >-
              #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.CancelOrderResponse
          description: The result of initiated cancel requests
    grpc.gateway.runtime.Error:
      type: object
      properties:
        error:
          type: string
        code:
          type: integer
          format: int32
        message:
          type: string
        details:
          type: array
          items:
            type: object
            additionalProperties: true
    coinbase.public_api.authed.retail_brokerage_api.CancelOrderResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
          description: Whether the cancel request was submitted successfully.
          required:
            - success
        failure_reason:
          description: The reason the cancel request did not get submitted
          required:
            - failure_reason
          allOf:
            - $ref: >-
                #/components/schemas/coinbase.public_api.authed.retail_brokerage_api.CancelOrderFailureReason
        order_id:
          type: string
          example: 0000-00000
          description: The ID of the order.
          required:
            - order_id
      required:
        - success
        - failure_reason
        - order_id
    coinbase.public_api.authed.retail_brokerage_api.CancelOrderFailureReason:
      type: string
      enum:
        - UNKNOWN_CANCEL_FAILURE_REASON
        - INVALID_CANCEL_REQUEST
        - UNKNOWN_CANCEL_ORDER
        - COMMANDER_REJECTED_CANCEL_ORDER
        - DUPLICATE_CANCEL_REQUEST
        - INVALID_CANCEL_PRODUCT_ID
        - INVALID_CANCEL_FCM_TRADING_SESSION
        - NOT_ALLOWED_TO_CANCEL
        - ORDER_IS_FULLY_FILLED
        - ORDER_IS_BEING_REPLACED
      default: UNKNOWN_CANCEL_FAILURE_REASON
      title: |-
        - UNKNOWN_CANCEL_FAILURE_REASON: nil value
         - INVALID_CANCEL_REQUEST: Internal error when placing cancel request
         - UNKNOWN_CANCEL_ORDER: Internal error when placing cancel request
         - COMMANDER_REJECTED_CANCEL_ORDER: Internal error when placing cancel request
         - DUPLICATE_CANCEL_REQUEST: Cancel request was placed prior for the same order
         - INVALID_CANCEL_PRODUCT_ID: Invalid product id
         - INVALID_CANCEL_FCM_TRADING_SESSION: Invalid FCM trading session
         - NOT_ALLOWED_TO_CANCEL: Invalid permissions
         - ORDER_IS_FULLY_FILLED: Order is fully filled
         - ORDER_IS_BEING_REPLACED: Order is being replaced
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        A bearer token signed using your API Key Secret, see [Creating API
        Keys](/coinbase-app/authentication-authorization/api-key-authentication)
        section of our docs for more information. See [Scope &
        Permissions](/coinbase-app/advanced-trade-apis/rest-scopes) for the
        permission each endpoint requires.
    OAuth2:
      type: oauth2
      description: >-
        An OAuth 2.0 access token from the Coinbase App OAuth2 flow. See [Scope
        & Permissions](/coinbase-app/advanced-trade-apis/rest-scopes) for the
        scope each endpoint requires.
      flows:
        authorizationCode:
          authorizationUrl: https://login.coinbase.com/oauth2/auth
          tokenUrl: https://login.coinbase.com/oauth2/token
          scopes:
            wallet:user:read: View your account information.
            wallet:user:update: Update your account information.
            wallet:accounts:read: View your accounts.
            wallet:buys:create: Place, edit, and cancel orders.
            wallet:trades:read: View your cryptocurrency conversions.
            wallet:trades:create: Convert cryptocurrencies.
            wallet:transactions:read: View your transactions.
            wallet:transactions:transfer: Transfer funds between accounts.
            wallet:payment-methods:read: View your payment methods.

````