> ## 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 All Orders

> Cancel all unfilled or partially filled orders for a sub-account. Pass `symbol` to limit to one market.

HTTP 200 means the request was accepted. Confirm order status via websocket or `GET /order/realtime`.



## OpenAPI

````yaml /v2/api-reference/openapi.json post /api/v1/order/cancel-all
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.dev.ekiden.fi/
    description: Production (Canton Mainnet)
security: []
paths:
  /api/v1/order/cancel-all:
    post:
      tags:
        - Trade
      summary: Cancel All Orders
      description: >-
        Cancel all unfilled or partially filled orders for a sub-account. Pass
        `symbol` to limit to one market.


        HTTP 200 means the request was accepted. Confirm order status via
        websocket or `GET /order/realtime`.
      operationId: cancel_all_orders
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CancelAllOrdersRequest'
        required: true
      responses:
        '200':
          description: Request accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancelAllOrdersResponse'
        '400':
          description: Bad request
      security:
        - bearer_auth: []
components:
  schemas:
    CancelAllOrdersRequest:
      type: object
      description: |-
        Cancel all unfilled or partially filled orders for a sub-account.

        Omit `symbol` to cancel every open order on the sub-account.
        Set `symbol` to cancel only open orders on that market.
      required:
        - sub_account_address
      properties:
        sub_account_address:
          type: string
        symbol:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Symbol'
              description: >-
                Optional market filter. Omit to cancel open orders across all
                markets.
    CancelAllOrdersResponse:
      type: object
      required:
        - result
        - exit_info
        - time
      properties:
        exit_info:
          $ref: '#/components/schemas/ExitMessage'
          description: Information about the exit status of the cancel all operation.
        result:
          type: array
          items:
            $ref: '#/components/schemas/CancelOrderResponse'
        time:
          type: string
          format: date-time
          example: '1672531200000'
    Symbol:
      type: string
      example: BTCUSDC
    ExitMessage:
      oneOf:
        - type: object
          required:
            - Error
          properties:
            Error:
              type: object
              required:
                - code
                - msg
              properties:
                code:
                  type: integer
                  format: int32
                  minimum: 0
                msg:
                  $ref: '#/components/schemas/String'
        - type: object
          required:
            - Success
          properties:
            Success:
              type: object
              required:
                - code
                - msg
              properties:
                code:
                  type: integer
                  format: int32
                  minimum: 0
                msg:
                  type: string
    CancelOrderResponse:
      type: object
      description: Acknowledgement of a cancel request.
      properties:
        order_id:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/OrderId'
        order_link_id:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/OrderLinkId'
    String:
      type: string
    OrderId:
      type: string
      format: uuid
    OrderLinkId:
      type: string
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.