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

# Cancel all own orders

> Cancels every open order you hold, optionally narrowed by market
and outcome — on the query string, or as a JSON body
`{"market_id": 12, "side": "yes"}` (a body field wins over the same
query parameter). `orders` lists the orders cancelled, as `GET /orders`
rows (state `cancel`); `failed` counts orders that could not be.
To cancel named orders use `POST /orders/cancel/batch`.
Shares a per-member budget with single cancels
(429 `market.order.rate_limited` over it).



## OpenAPI

````yaml /api-reference/openapi/calibri.yaml post /api/v2/pythia/orders/cancel
openapi: 3.1.0
info:
  title: Calibri API
  version: 1.0.0
  description: >-
    The Calibri API. Discover markets, read live books, place signed orders, and
    manage positions and account data.

    Routed by path prefix to the service that answers it — which is an
    implementation detail, not something a caller has to reason about.
servers:
  - description: Production
    url: https://calibri.io
security: []
tags:
  - name: Health
    description: Service liveness.
    x-displayName: Health
  - name: Events
    description: Discover events and their metadata.
    x-displayName: Events
  - name: Markets
    description: List markets and load market detail for trading.
    x-displayName: Markets
  - name: Series
    description: Recurring event series.
    x-displayName: Series
  - name: Tags
    description: Editorial shelves used to browse the catalogue.
    x-displayName: Tags
  - name: Market Data
    description: Order book, depth, trade tape, tickers, and candles.
    x-displayName: Market Data
  - name: Assets
    description: Underlying asset price history for price-feed markets.
    x-displayName: Assets
  - name: Community
    description: Leaderboard and platform activity.
    x-displayName: Community
  - name: Currencies
    description: Currency registry.
    x-displayName: Currencies
  - name: Trade
    description: Place, list, and cancel orders.
    x-displayName: Trade
  - name: Positions
    description: Your matched contracts.
    x-displayName: Positions
  - name: Wallet
    description: Self-custody Safe, passkey, session keys, and relay.
    x-displayName: Wallet
  - name: Rewards
    description: Maker rebates and referral earnings.
    x-displayName: Rewards
  - name: Account
    description: Balances, ledger, PnL, limits, preferences, and profile.
    x-displayName: Account
  - name: Categories
    description: Categories
    x-displayName: Categories
  - name: Other
    description: Other
    x-displayName: Other
paths:
  /api/v2/pythia/orders/cancel:
    post:
      tags:
        - Trade
      summary: Cancel all own orders
      description: |-
        Cancels every open order you hold, optionally narrowed by market
        and outcome — on the query string, or as a JSON body
        `{"market_id": 12, "side": "yes"}` (a body field wins over the same
        query parameter). `orders` lists the orders cancelled, as `GET /orders`
        rows (state `cancel`); `failed` counts orders that could not be.
        To cancel named orders use `POST /orders/cancel/batch`.
        Shares a per-member budget with single cancels
        (429 `market.order.rate_limited` over it).
      parameters:
        - description: Only orders in this market
          in: query
          name: market_id
          schema:
            type: integer
        - description: Only orders on this outcome (yes|no)
          in: query
          name: side
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - type: object
                - $ref: '#/components/schemas/CancelAllRequest'
                  description: The same filters as a JSON body
                  summary: body
        description: The same filters as a JSON body
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancelAllResult'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unauthorized
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Too Many Requests
      security:
        - apiKey: []
components:
  schemas:
    CancelAllRequest:
      properties:
        market_id:
          description: Only orders in this market. A JSON number or a numeric string.
          example: 12
          type: integer
        side:
          description: Only orders on this outcome.
          enum:
            - 'yes'
            - 'no'
          example: 'yes'
          type: string
      type: object
    CancelAllResult:
      properties:
        cancelled:
          example: 3
          type: integer
        failed:
          example: 0
          type: integer
        orders:
          description: Orders are the orders this call cancelled, in state `cancel`.
          items:
            $ref: '#/components/schemas/MemberOrder'
          type: array
          uniqueItems: false
        total:
          example: 3
          type: integer
      type: object
    ErrorResponse:
      properties:
        errors:
          description: Match on the code, not the HTTP status or any human text.
          example:
            - order.not_found
          items:
            type: string
          type: array
          uniqueItems: false
      type: object
    MemberOrder:
      properties:
        avg_price:
          description: >-
            AvgPrice is the average price of the filled part, in the ORDER'S OWN

            outcome price space (a NO order's fills read as NO prices, not the
            YES book

            price). Null while nothing has filled.
          example: '0.61'
          type:
            - string
            - 'null'
        client_order_id:
          description: >-
            ClientOrderID is the id the caller chose at placement; null when
            none was.
          example: bot-7f3a-0001
          type:
            - string
            - 'null'
        contracts_count:
          example: 0
          type: integer
        created_at:
          description: Timestamps are RFC3339 in UTC (`Z`), from either source.
          example: '2026-08-07T10:00:00Z'
          type: string
        direction:
          description: >-
            Direction is whether the order acquires the outcome named by `side`
            (buy)

            or disposes of held outcome tokens (sell, a position exit). `side`
            alone

            cannot tell a `sell yes` from a `buy yes`.
          enum:
            - buy
            - sell
          example: buy
          type: string
        event_slug:
          example: btc-above-70k-december-2026
          type:
            - string
            - 'null'
        event_title:
          description: >-
            EventTitle is the parent event's title, so a list that spans events
            can

            head a row "event — market" without reading the event. Null when the

            market's metadata is not available.
          example: BTC price on 31 Dec 2026
          type:
            - string
            - 'null'
        expires_at:
          description: >-
            ExpiresAt is when the order's authorisation lapses (a signed order's

            EIP-712 expiration), RFC3339 UTC; null when it has none. The engine
            never

            matches an order inside 30 seconds of it and cancels a resting one
            then.
          example: '2026-08-07T11:00:00Z'
          type:
            - string
            - 'null'
        fee:
          description: >-
            Fee is the taker fee charged to this order so far ("0" when none — a
            maker

            is never charged). In quote_currency.
          example: '0.04'
          type: string
        filled_cost:
          description: >-
            FilledCost is the cash for the filled part at the fill prices: paid,
            on a

            buy; received before fees, on a sell. Excludes the taker fee, which
            is

            `fee`. "0" while nothing has filled; null only if it cannot be
            determined.
          example: '3.05'
          type:
            - string
            - 'null'
        filled_volume:
          example: '0'
          type: string
        id:
          example: 1420
          type: integer
        ioc:
          description: >-
            IOC: immediate-or-cancel — the unfilled remainder after the order's
            one

            pass as a taker is refunded, never rested.
          example: false
          type: boolean
        locked:
          example: '6.20'
          type: string
        market_id:
          example: 12
          type: integer
        market_title:
          description: >-
            MarketTitle / EventSlug are the order's market context, so a client
            can

            name the market and link to it (the app routes

            /event/{slug}?market={id}) without reading each market.


            Null when the market's metadata is not available; the row still
            carries

            `market_id`.
          example: Will BTC close above $70,000 on 31 Dec 2026?
          type:
            - string
            - 'null'
        ord_type:
          enum:
            - limit
          example: limit
          type: string
        origin_locked:
          example: '6.20'
          type: string
        origin_volume:
          example: '10'
          type: string
        outcome_labels:
          description: >-
            OutcomeLabels are the display names of the market's two legs, `[yes,
            no]`,

            with the ["Yes","No"] default applied, as on
            /public/markets/{market}. With

            market_title and event_slug they name the outcome `side` holds
            without a

            market read. Null when the market's metadata is not available.
          example:
            - 'Yes'
            - 'No'
          items:
            type: string
          type:
            - array
            - 'null'
          uniqueItems: false
        post_only:
          description: >-
            PostOnly: the order could only rest as a maker; it was rejected
            rather

            than allowed to cross.
          example: false
          type: boolean
        price:
          example: '0.62'
          type: string
        quote_currency:
          example: usdc
          type: string
        remaining_volume:
          example: '10'
          type: string
        side:
          enum:
            - 'yes'
            - 'no'
          example: 'yes'
          type: string
        state:
          enum:
            - wait
            - done
            - cancel
            - reject
          example: wait
          type: string
        token_id:
          description: >-
            TokenID is the on-chain ERC-1155 id of the outcome `side` names (the

            market's yes_token_id or no_token_id), so a client can match the

            order to the token it holds without a market read. Null when the
            market

            has no on-chain token, or its metadata is unknown here.
          example: '1234567890123456789012345678901234567890'
          type:
            - string
            - 'null'
        updated_at:
          example: '2026-08-07T10:05:00Z'
          type: string
        volume:
          example: '10'
          type: string
      type: object
  securitySchemes:
    apiKey:
      description: >-
        HMAC-signed API key. Send X-Auth-Apikey, X-Auth-Nonce and
        X-Auth-Signature.
      in: header
      name: X-Auth-Apikey
      type: apiKey

````

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