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

# Cancel Order

> Cancel an existing order



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/order/cancel
openapi: 3.1.0
info:
  title: ekiden-gateway
  description: >-
    API Gateway and WebSocket proxy based on Axum and Utoipa, handling auth,
    rate limiting, and connection buffering.
  license:
    name: ''
  version: 0.1.1
servers:
  - url: https://api.ekiden.fi/
    description: Production
  - url: https://api.staging.ekiden.fi/
    description: Staging
  - url: https://api.dev.ekiden.fi/
    description: Development
  - url: http://localhost:4020/
    description: Local
security: []
paths:
  /api/v1/order/cancel:
    post:
      tags:
        - Trade
      summary: Cancel Order
      description: Cancel an existing order
      operationId: cancel_order
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CancelOrderRequest'
        required: true
      responses:
        '200':
          description: Order canceled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancelOrderResponse'
      security:
        - bearer_auth: []
components:
  schemas:
    CancelOrderRequest:
      type: object
      description: Request to cancel an order.
      required:
        - sub_account_address
        - symbol
      properties:
        order_id:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/OrderId'
        order_link_id:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/OrderLinkId'
        sub_account_address:
          type: string
        symbol:
          $ref: '#/components/schemas/Symbol'
    CancelOrderResponse:
      type: object
      description: Response for canceling an order.
      properties:
        order_id:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/OrderId'
        order_link_id:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/OrderLinkId'
    OrderId:
      type: string
      format: uuid
    OrderLinkId:
      type: string
    Symbol:
      type: string
      example: BTCUSDC
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer

````