> ## 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 an order by client order id

> Cancels one of your active orders by client order ID. Requires TRADE permission.



## OpenAPI

````yaml /api-reference/derivatives-predictions-api/rest-api/cpm-spec.json delete /api/orders
openapi: 3.0.3
info:
  title: CPM Public REST API
  version: 0.1.0
servers:
  - url: https://api.example.com
    variables: {}
security:
  - auth_api_key: []
  - auth_timestamp: []
  - auth_passphrase: []
  - auth_signature: []
paths:
  /api/orders:
    delete:
      tags:
        - Orders
      summary: Cancel an order by client order id
      description: >-
        Cancels one of your active orders by client order ID. Requires TRADE
        permission.
      operationId: cancelByClientOrderId
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CancelByClientOrderIdRequest'
        required: false
      responses:
        '200':
          description: Order canceled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancelOrderResponse'
        '400':
          description: Cancel rejected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderErrorResponse'
      deprecated: false
      security: []
components:
  schemas:
    CancelByClientOrderIdRequest:
      type: object
      additionalProperties: false
      properties:
        client_order_id:
          type: string
          description: Client order id of your active order to cancel.
          example: ord-100
    CancelOrderResponse:
      type: object
      additionalProperties: false
      properties:
        order_id:
          type: string
          description: Id of the canceled order, as a canonical decimal string.
          example: '698471892348'
        canceled_quantity:
          type: string
          description: >-
            Quantity removed from the book by the cancel, in contracts, as a
            decimal string.
          example: '15.00'
        total_filled_quantity:
          type: string
          description: >-
            Total quantity the order filled before it was canceled, in
            contracts, as a decimal string.
          example: '10.00'
        cancel_reason:
          type: string
          description: Why the order was canceled, for example USER_REQUEST.
          example: USER_REQUEST
    OrderErrorResponse:
      type: object
      additionalProperties: false
      properties:
        error:
          type: string
          description: >-
            Machine-readable error code, for example INVALID_FIELD,
            INSUFFICIENT_BALANCE, or UNAUTHORIZED.
          example: INVALID_FIELD
        message:
          type: string
          description: Human-readable description of the error.
          example: 'side must be one of: BUY, SELL, BUY_NO, SELL_NO'
  securitySchemes:
    auth_api_key:
      name: CB-ACCESS-KEY
      description: The API key string for the request
      in: header
      type: apiKey
    auth_timestamp:
      name: CB-ACCESS-TIMESTAMP
      description: The request timestamp (epoch seconds)
      in: header
      type: apiKey
    auth_passphrase:
      name: CB-ACCESS-PASSPHRASE
      description: The passphrase for the API key
      in: header
      type: apiKey
    auth_signature:
      name: CB-ACCESS-SIGN
      description: HMAC SHA-256 signature over TIMESTAMP + METHOD + REQUEST_PATH + BODY
      in: header
      type: apiKey

````