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

# Cancel Order

> Cancels a Limitless order by its issued order id and returns the order's current state.



## OpenAPI

````yaml /openapi/v1.json delete /v1/limitless/orders/{orderId}
openapi: 3.0.0
info:
  title: ParlayX API
  version: 1.0.0
  description: Aggregated prediction-market trading API
servers:
  - url: https://api.parlayx.com
security: []
tags:
  - name: Authentication
    description: Confirm your signing and read the server clock.
  - name: Discovery
    description: Browse sports, competitions, events, and markets.
  - name: Polymarket
    description: Submit and manage orders on Polymarket outcomes.
  - name: Kalshi
    description: Submit and manage orders on Kalshi markets.
  - name: ProphetX
    description: Submit and manage orders on ProphetX strikes.
  - name: Limitless
    description: Discover and trade Limitless markets.
paths:
  /v1/limitless/orders/{orderId}:
    delete:
      tags:
        - Limitless
      summary: Cancel Order
      description: >-
        Cancels a Limitless order by its issued order id and returns the order's
        current state.
      operationId: cancelLimitlessOrder
      parameters:
        - name: PX-Key-Id
          in: header
          required: true
          schema:
            type: string
          description: The key id issued for your signing keypair.
        - name: PX-Timestamp
          in: header
          required: true
          schema:
            type: string
          description: >-
            Unix seconds at signing, valid within 30 seconds of the server
            clock.
        - name: PX-Signature
          in: header
          required: true
          schema:
            type: string
          description: Ed25519 signature of the request
        - name: PX-Content-Sha256
          in: header
          required: true
          schema:
            type: string
          description: >-
            Hex SHA-256 of the request body, or the SHA-256 of the empty string
            when there is no body.
        - schema:
            type: string
            format: uuid
            description: Issued order id.
            example: 3f8b2c9a-2d18-4f7e-9c2a-1b6e1f0c8a4d
          required: true
          name: orderId
          in: path
      responses:
        '200':
          description: Cancel request accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LimitlessOrderView'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: The request was not authenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthError'
        '403':
          description: The key is not permitted to perform this action
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthError'
        '404':
          description: Order not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '409':
          description: Order cannot be cancelled from its current state; retry
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '429':
          description: >-
            The organization has exceeded its request rate; retry after the
            Retry-After interval
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthError'
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '503':
          description: Authentication is temporarily unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthError'
components:
  schemas:
    LimitlessOrderView:
      type: object
      properties:
        queuePosition:
          type: string
          nullable: true
          description: >-
            Queue position is unavailable for this venue and is returned as
            null.
        orderId:
          type: string
          format: uuid
          description: Issued order id.
          example: 3f8b2c9a-2d18-4f7e-9c2a-1b6e1f0c8a4d
        tokenId:
          type: string
          description: Limitless outcome conditional-token id (raw integer string).
          example: >-
            10999813436902295279687793687143205491693625423224337570276428722503253471600
        side:
          $ref: '#/components/schemas/LimitlessSide'
        type:
          $ref: '#/components/schemas/TradingOrderType'
        size:
          type: string
          nullable: true
          description: >-
            Share-sized BUY or resting order size in outcome shares, otherwise
            null.
        price:
          type: string
          nullable: true
          description: Resting price in dollars from 0 to 1, or null for a market order.
        amount:
          type: string
          nullable: true
          description: >-
            Market order size, in dollars for a buy and whole outcome shares for
            a sell, or null for a resting order.
        postOnly:
          type: boolean
          nullable: true
          description: >-
            Whether a resting order rests as maker-only, or null for a market
            order.
        status:
          $ref: '#/components/schemas/TradingOrderStatus'
        venueOrderId:
          type: string
          nullable: true
          description: Limitless order id, or null until the venue acknowledges the order.
        createdAt:
          type: string
          description: Time the order was created, in ISO-8601.
        updatedAt:
          type: string
          description: Time the order was last updated, in ISO-8601.
        filledShares:
          type: string
          nullable: true
          description: >-
            Outcome shares filled, or null until the order reaches a terminal
            state. A resting order reports null even after a partial fill; read
            the fills for its progress.
        averagePrice:
          type: string
          nullable: true
          description: >-
            Average price executed, in dollars from 0 to 1, excluding fees, or
            null until the order reaches a terminal state.
        feesUsd:
          type: string
          nullable: true
          description: >-
            Total fees charged in dollars, or null until the order reaches a
            terminal state. Charged on top of the executed notional, so it is
            additive to cost on a buy and deducted from proceeds on a sell.
        closedAt:
          type: string
          nullable: true
          description: Time the order reached a terminal state, or null while still open.
        error:
          type: object
          nullable: true
          properties:
            code:
              $ref: '#/components/schemas/TradingOrderErrorCode'
            message:
              type: string
              nullable: true
              description: >-
                The venue's own wording for the failure, or null when there is
                none to relay.
              example: >-
                polymarket rejected the order: invalid amount for a marketable
                BUY order ($0.55), min size: $1
          required:
            - code
            - message
          description: >-
            Why the order failed, or null if it did not; always null on a listed
            order.
      required:
        - orderId
        - tokenId
        - side
        - type
        - size
        - price
        - amount
        - postOnly
        - status
        - venueOrderId
        - createdAt
        - updatedAt
        - filledShares
        - averagePrice
        - feesUsd
        - closedAt
        - error
    ApiError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              $ref: '#/components/schemas/ApiErrorCode'
            message:
              type: string
              description: Plain-text explanation of the error.
            orderId:
              type: string
              format: uuid
              description: >-
                The affected order, present only on
                ORDER_RECONCILIATION_REQUIRED; read it back to determine whether
                it reached the venue.
          required:
            - code
            - message
      required:
        - error
      title: API Error
    AuthError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              $ref: '#/components/schemas/AuthErrorCode'
            message:
              type: string
              description: Plain-text explanation of the error.
          required:
            - code
            - message
      required:
        - error
      title: Auth Error
    LimitlessSide:
      type: string
      enum:
        - BUY
        - SELL
      description: Order direction.
      example: BUY
    TradingOrderType:
      type: string
      enum:
        - LIMIT
        - MARKET
      description: Order type.
      example: LIMIT
    TradingOrderStatus:
      type: string
      enum:
        - PENDING
        - SUBMITTED
        - OPEN
        - FILLED
        - CANCELLED
        - REJECTED
      description: >-
        Order lifecycle status.


        | Status | Meaning |

        | --- | --- |

        | `PENDING` | Accepted, not yet sent to the venue. |

        | `SUBMITTED` | At the venue, outcome not yet known. Either not yet
        acknowledged, or an immediate-or-cancel order acknowledged but not yet
        settled. |

        | `OPEN` | Resting on the venue, and cancellable. |

        | `FILLED` | Fully filled. |

        | `CANCELLED` / `REJECTED` | Terminal. |
      example: OPEN
    TradingOrderErrorCode:
      type: string
      enum:
        - VENUE_REJECTED
        - INVALID_ORDER
        - NOT_FEASIBLE
        - CREDENTIALS_INVALID
        - UNKNOWN
      description: Stable identifier for the error category.
    ApiErrorCode:
      type: string
      enum:
        - INVALID_REQUEST
        - NOT_FOUND
        - INSUFFICIENT_BALANCE
        - IDEMPOTENCY_CONFLICT
        - ORDER_NOT_CANCELLABLE
        - ORDER_RECONCILIATION_REQUIRED
        - RATE_LIMITED
        - INTERNAL_ERROR
      description: Stable identifier for the error category.
    AuthErrorCode:
      type: string
      enum:
        - UNAUTHORIZED
        - BAD_CONTENT_HASH
        - FORBIDDEN
        - RATE_LIMITED
        - AUTH_UNAVAILABLE
      description: Stable identifier for the error category.

````

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