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

# Cancel all orders

> Cancel every resting order you placed through the API — optionally only one market or series. Never rate limited.



## OpenAPI

````yaml api-reference/openapi.json DELETE /portfolio/orders
openapi: 3.1.0
info:
  title: updown Trade API
  version: 1.0.0
  description: >-
    Public REST API. Market data needs no key; `/account` (and order entry, when
    it ships) takes an API key. Prices are dollar strings on the 1¢ grid, counts
    are contract strings, times are epoch ms. Generated from packages/protocol —
    do not edit by hand.
servers:
  - url: https://api.updown.fast/trade-api/v1
    description: production
security: []
paths:
  /portfolio/orders:
    delete:
      summary: Cancel all orders
      description: >-
        Cancel every resting order you placed through the API — optionally only
        one market or series. Never rate limited.
      operationId: cancelAllOrders
      parameters:
        - name: market_ticker
          in: query
          required: false
          schema:
            type: string
            pattern: ^[a-z0-9][a-z0-9-]{0,63}-\d{6}-\d{4}-\d{4}(d\d{1,2})?$
            description: >-
              Market ticker (one window of a series), e.g.
              "btc-15m-261002-1400-1415". Opaque.
        - name: series_ticker
          in: query
          required: false
          schema:
            type: string
            pattern: ^[a-z0-9][a-z0-9-]{0,63}$
            description: Series ticker, e.g. "btc-15m".
      responses:
        '200':
          description: The orders this call cancelled.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancelAllResponse'
        '400':
          description: Invalid request (code BAD_REQUEST).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: No API key, or one that isn't valid (code UNAUTHORIZED).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            The key lacks the permission, or the account can't trade yet (code
            FORBIDDEN).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limited (code RATE_LIMITED); wait `Retry-After` seconds.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: The book could not be read (code EXCHANGE_UNAVAILABLE); retry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - apiKey: []
components:
  schemas:
    CancelAllResponse:
      type: object
      properties:
        canceled_order_ids:
          type: array
          items:
            type: string
      required:
        - canceled_order_ids
      additionalProperties: false
    Error:
      type: object
      properties:
        code:
          type: string
          enum:
            - BAD_REQUEST
            - NOT_FOUND
            - SERIES_NOT_FOUND
            - MARKET_NOT_FOUND
            - METHOD_NOT_ALLOWED
            - RATE_LIMITED
            - UNAUTHORIZED
            - FORBIDDEN
            - ORDER_NOT_FOUND
            - IDEMPOTENCY_CONFLICT
            - ACCOUNT_BUSY
            - MARKET_NOT_OPEN
            - INSUFFICIENT_BALANCE
            - LIMIT_EXCEEDED
            - POST_ONLY_CROSS
            - SELF_TRADE
            - TRADING_PAUSED
            - ORDER_REJECTED
            - INTERNAL_ERROR
            - EXCHANGE_UNAVAILABLE
        message:
          type: string
        details:
          type: string
      required:
        - code
        - message
      additionalProperties: false
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: >-
        An API key from your account: `Authorization: Bearer
        udk_<live|test>_<id>_<secret>`.

````

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