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

# Cancel Order

> Cancels an open order.



## OpenAPI

````yaml DELETE /v1/api/orders/{id}
openapi: 3.1.0
info:
  title: Dot Prediction API
  description: >-
    A unified API for accessing prediction market data across Kalshi,
    Polymarket, and Limitless.
  version: 1.0.0
servers:
  - url: https://api.dotprediction.io
security:
  - apiKey: []
paths:
  /v1/api/orders/{id}:
    delete:
      tags:
        - Orders
      summary: Cancel order
      description: Cancels an open order.
      operationId: cancelOrder
      parameters:
        - name: id
          in: path
          required: true
          description: The order ID to cancel.
          schema:
            type: string
        - name: platform
          in: query
          required: true
          description: The platform the order was placed on.
          schema:
            type: string
            enum:
              - kalshi
              - polymarket
              - limitless
        - name: credential_id
          in: query
          required: false
          description: Credential ID to use.
          schema:
            type: integer
      responses:
        '200':
          description: Order cancellation result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancelOrderResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: 0d5813fe-a3df-4eee-bda5-8e01bfe0683a
        '500':
          $ref: 13256dda-f2cf-48d5-853d-eda20215fa08
components:
  schemas:
    CancelOrderResponse:
      type: object
      properties:
        order:
          $ref: '#/components/schemas/Order'
        cancelled:
          type: boolean
        meta:
          $ref: '#/components/schemas/OrderMeta'
    Order:
      type: object
      properties:
        order_id:
          type: string
        platform:
          type: string
        market_id:
          type: string
        side:
          type: string
          enum:
            - buy
            - sell
        outcome:
          type: string
        type:
          type: string
          enum:
            - limit
            - market
        price:
          type: number
        size:
          type: number
        filled_size:
          type: number
        remaining_size:
          type: number
        average_fill_price:
          type: number
        status:
          type: string
        time_in_force:
          type: string
        client_order_id:
          type: string
        fees:
          $ref: '#/components/schemas/OrderFees'
        created_at:
          type: string
        updated_at:
          type: string
        expiration:
          type: string
    OrderMeta:
      type: object
      properties:
        platform:
          type: string
        request_time_ms:
          type: integer
          format: int64
        idempotent_replay:
          type: boolean
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            status:
              type: integer
              description: HTTP status code.
            message:
              type: string
              description: Human-readable error message.
            resolution:
              type: string
              description: Suggested action to resolve the error.
            error_text:
              type: string
              description: Detailed error information.
    OrderFees:
      type: object
      properties:
        maker_fee:
          type: number
        taker_fee:
          type: number
        total_fee:
          type: number
  responses:
    BadRequest:
      description: Invalid request parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        API key for authentication. Generate one via the dashboard or the
        `/v1/api/auth/api-keys` endpoint.

````