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

# Cancel resting Phoenix limit orders

> Cancel resting Phoenix limit orders by `(price_e6, order_sequence_number)`
— the identifiers from the trader's open-orders view. Phoenix cancels are
per-market batches, unlike Jupiter's per-PDA `/perp/sol/cancel`.

Idempotent on `client_order_id` for 60s.




## OpenAPI

````yaml openapi-spec/trading.yaml post /perp/sol/phoenix-cancel
openapi: 3.0.3
info:
  title: Raze Trading API
  description: >
    Trading endpoints for Solana token swaps — quote, buy, sell, atomic

    round-trips and raw instructions. Perpetuals (Jupiter Perps + Phoenix) live

    here too.


    Quotes can also be **streamed**: `/swap/sol/quote/stream` is a WebSocket
    that

    pushes a fresh quote whenever the pools under your route move. It is not

    describable in OpenAPI — see

    [Streaming quotes](/api-reference/router/quote-stream).


    Write utilities (`/utils/sol/*` — launch, transfer, burn, consolidate, fees)

    moved to the History API on `https://api.raze.bot` (see `history.yaml`).


    Runs on port 8082.


    **Auth methods**: `Authorization: Bearer sk_...` header, `X-API-Key: sk_...`
    header, or `?apiKey=sk_...` query param.
  version: 2.1.0
servers:
  - url: https://router.raze.bot
    description: >-
      Raze global trading router — GeoDNS routes to the nearest region
      automatically
security: []
paths:
  /perp/sol/phoenix-cancel:
    post:
      summary: Cancel resting Phoenix limit orders
      description: >
        Cancel resting Phoenix limit orders by `(price_e6,
        order_sequence_number)`

        — the identifiers from the trader's open-orders view. Phoenix cancels
        are

        per-market batches, unlike Jupiter's per-PDA `/perp/sol/cancel`.


        Idempotent on `client_order_id` for 60s.
      operationId: phoenixCancel
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PhoenixCancelRequest'
            example:
              wallet: 62ThHC1rs2GUfa8J4Qjcj5GD2MSL2d65pcJtenNieDnm
              market_id: phoenix:SOL-PERP
              orders:
                - price_e6: 145000000
                  order_sequence_number: 918273
              client_order_id: ui-phx-cancel-20260728-1
      responses:
        '200':
          description: Transaction built (`status` = `phoenix-cancel-orders`)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PerpTxResponse'
        '400':
          description: >-
            Invalid request (empty `orders`, missing client_order_id, bad
            wallet/market_id)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Duplicate `client_order_id`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '502':
          description: Builder error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: Blockhash cache empty — RPC unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - ApiKeyAuth: []
        - BearerAuth: []
components:
  schemas:
    PhoenixCancelRequest:
      type: object
      required:
        - wallet
        - market_id
        - orders
        - client_order_id
      properties:
        wallet:
          type: string
        market_id:
          type: string
          example: phoenix:SOL-PERP
        orders:
          type: array
          minItems: 1
          items:
            type: object
            required:
              - price_e6
              - order_sequence_number
            properties:
              price_e6:
                type: integer
                format: int64
              order_sequence_number:
                type: integer
                format: int64
          description: >-
            Orders to cancel, identified by (price, sequence) from the trader's
            open-orders view — Phoenix cancels are per-market batches, not
            per-PDA like Jupiter.
        client_order_id:
          type: string
    PerpTxResponse:
      type: object
      properties:
        success:
          type: boolean
        data:
          type: array
          items:
            $ref: '#/components/schemas/PerpTx'
        error:
          type: string
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: string
        details:
          type: string
      required:
        - success
        - error
    PerpTx:
      type: object
      description: One unsigned transaction per wallet in the request.
      properties:
        wallet:
          type: string
        tx_b64:
          type: string
          description: Base64-encoded unsigned versioned transaction.
        status:
          type: string
          description: >-
            Builder-side hint (e.g. `created`, `funded_swap`,
            `phoenix-deposit`).
        position_request:
          type: string
          description: |
            `position_request` PDA this transaction creates or targets (Jupiter
            builds only). Lets a client cancel a stuck request without a History
            API round-trip. The PDA counter is derived deterministically from
            `client_order_id`, so the same request rebuilt on another edge lands
            on the same PDA — exactly-once on-chain.
        counter:
          type: integer
          format: int64
          description: PDA counter used to derive `position_request` (create paths only).
        position:
          type: string
          description: Position PDA the request acts on.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
    BearerAuth:
      type: http
      scheme: bearer

````