openapi: 3.0.3
info:
  title: Temp API
  description: >
    A holding pen for short-lived endpoints that do not have a permanent home in
    the main Raydium API.

    Endpoints in this service may change, be deprecated, or move without notice.


    **Stability warning:** This service prioritizes rapid iteration and minimal
    API stability guarantees.

    Only use for non-critical paths, internal tools, or features in active
    development.
  version: 1.0.0
  contact:
    name: Raydium
    url: https://raydium.io
servers:
  - url: https://temp-api-v1.raydium.io
    description: Mainnet
  - url: https://temp-api-v1-devnet.raydium.io
    description: Devnet
tags:
  - name: Temporary
    description: Temporary endpoints (unstable)
paths:
  /limit-order/order/list:
    get:
      summary: List a wallet's currently-parked CLMM limit orders
      description: >
        Return CLMM limit orders owned by `wallet` that are still on-chain —
        both fully

        unfilled and partially filled orders are returned in a single payload.
        Each row

        is the decoded on-chain `LimitOrderState` plus the pool keys and a
        `pendingSettle`

        amount that the indexer has computed from the latest tick state.


        Data is served from the indexer's Redis cache and may lag the chain by a
        few seconds.
      operationId: listLimitOrders
      tags:
        - Temporary
      parameters:
        - name: wallet
          in: query
          required: true
          description: Wallet public key (base58)
          schema:
            type: string
            example: <your-wallet-pubkey>
        - name: showErr
          in: query
          required: false
          description: >
            When present, the response also includes an `e` array of
            soft-failure messages

            from the indexer (e.g. a missing pool or tick-array cache entry that
            caused a

            row to be skipped).
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LimitOrderListResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /limit-order/history/order/list-by-user:
    get:
      summary: List a wallet's historical CLMM limit orders
      description: >
        Return closed CLMM limit orders owned by `wallet`. Each row summarizes
        the order at

        the time it left the active set. Cursor-paginated via `nextPageId`.
      operationId: listLimitOrderHistoryByUser
      tags:
        - Temporary
      parameters:
        - name: wallet
          in: query
          required: true
          description: Wallet public key (base58)
          schema:
            type: string
            example: <your-wallet-pubkey>
        - name: hideCancel
          in: query
          required: false
          description: >
            When set to `true`, exclude orders that closed without ever being
            filled

            (i.e. cancelled). Default `false`.
          schema:
            type: string
        - name: poolId
          in: query
          required: false
          description: >-
            Optional CLMM pool to filter by. Mutually exclusive with `mint1` /
            `mint2`.
          schema:
            type: string
        - name: mint1
          in: query
          required: false
          description: >-
            Optional mint filter (token A or B). Mutually exclusive with
            `poolId`.
          schema:
            type: string
        - name: mint2
          in: query
          required: false
          description: Optional second mint filter. Mutually exclusive with `poolId`.
          schema:
            type: string
        - name: nextPageId
          in: query
          required: false
          description: Opaque pagination cursor returned by the previous page (TTL ~1h).
          schema:
            type: string
        - name: size
          in: query
          required: false
          description: Page size (1–100, default 20).
          schema:
            type: integer
            default: 20
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LimitOrderHistoryByUserResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /limit-order/history/event/list-by-pda:
    get:
      summary: List the on-chain event log for one or more limit-order PDAs
      description: >
        Return the event log (`open`, `increase`, `decrease`, `settle`, `close`)
        for one or

        more limit-order PDAs. Useful for rendering a per-order timeline.
        Cursor-paginated

        via `nextPageId`.
      operationId: listLimitOrderEventsByPda
      tags:
        - Temporary
      parameters:
        - name: pda
          in: query
          required: true
          description: >
            One or more limit-order PDA public keys, comma-separated. Each must
            be a valid

            base58 pubkey.
          schema:
            type: string
        - name: nextPageId
          in: query
          required: false
          description: Opaque pagination cursor returned by the previous page (TTL ~1h).
          schema:
            type: string
        - name: size
          in: query
          required: false
          description: Page size (1–100, default 20).
          schema:
            type: integer
            default: 20
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LimitOrderEventByPdaResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /cp-creator-fee:
    get:
      summary: Get accumulated creator fees for a wallet
      description: >
        Retrieve all CPMM pools where this wallet is the creator, along with
        accumulated but unclaimed

        creator fees per pool. Returns an empty array if the wallet has no
        creator fees cached.


        **Note:** This endpoint caches user data periodically. Very recent
        creator fee activity may not

        appear immediately.
      operationId: getCpCreatorFee
      tags:
        - Temporary
      parameters:
        - name: wallet
          in: query
          required: true
          description: Wallet public key (base58)
          schema:
            type: string
            example: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnop
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreatorFeeResponse'
        '400':
          description: Invalid wallet address
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    CreatorFeeResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        data:
          type: array
          description: Array of pools with accumulated creator fees
          items:
            $ref: '#/components/schemas/CreatorFeeItem'
      required:
        - success
        - data
    CreatorFeeItem:
      type: object
      description: A single CPMM pool with accumulated creator fees
      properties:
        poolInfo:
          type: object
          description: Pool metadata (structure varies; see pools API for schema)
        poolKey:
          type: object
          description: Pool configuration key
        fee:
          $ref: '#/components/schemas/FeeAmount'
      required:
        - poolInfo
        - poolKey
        - fee
    FeeAmount:
      type: object
      description: Accumulated fee amounts in raw token units
      properties:
        amountA:
          type: string
          description: Creator fee amount for token A (in smallest units)
        amountB:
          type: string
          description: Creator fee amount for token B (in smallest units)
      required:
        - amountA
        - amountB
    LimitOrderListResponse:
      type: object
      description: Payload for `/limit-order/order/list`.
      properties:
        id:
          type: string
          description: Request id (UUID)
        success:
          type: boolean
          example: true
        data:
          type: object
          properties:
            rows:
              type: array
              items:
                $ref: '#/components/schemas/LimitOrderListItem'
            e:
              type: array
              description: >
                Optional. Present only when the request was made with `showErr`.
                Each entry

                is a soft-failure message from the indexer (e.g. a missing pool
                or tick-array

                cache entry that caused a row to be skipped).
              items:
                type: string
          required:
            - rows
      required:
        - success
        - data
    LimitOrderListItem:
      type: object
      description: A single currently-parked limit order.
      properties:
        pda:
          type: string
          description: LimitOrderState account public key
        poolId:
          type: string
        owner:
          type: string
        tick:
          type: integer
          description: Quantized tick at which this order rests.
        price:
          type: number
          description: Human-readable price at `tick`, scaled by mint decimals.
        zeroForOne:
          type: boolean
          description: true = sell token_0, buy token_1; false = the other direction.
        orderPhase:
          type: string
          description: u64 stringified — FIFO cohort phase of this order at its tick.
        totalAmount:
          type: string
          description: u64 stringified — total input committed by the order.
        filledAmount:
          type: string
          description: u64 stringified — accumulated input consumed by swaps so far.
        openTime:
          type: string
          description: u64 stringified — unix timestamp the order was opened.
        pendingSettle:
          type: string
          description: >-
            u64 stringified — output amount currently owed to the owner that is
            awaiting `SettleLimitOrder`.
        filledAmountUpdate:
          type: string
          description: >-
            u64 stringified — mirror of `filledAmount`, returned for client
            convenience.
        mintA:
          type: string
        mintB:
          type: string
        mintDecimalsA:
          type: integer
        mintDecimalsB:
          type: integer
        poolCurrentPrice:
          type: number
          description: Human-readable current pool price (token_1 / token_0).
      required:
        - pda
        - poolId
        - owner
        - tick
        - price
        - zeroForOne
        - orderPhase
        - totalAmount
        - filledAmount
        - openTime
        - pendingSettle
        - filledAmountUpdate
        - mintA
        - mintB
        - mintDecimalsA
        - mintDecimalsB
        - poolCurrentPrice
    LimitOrderHistoryByUserResponse:
      type: object
      description: Payload for `/limit-order/history/order/list-by-user`.
      properties:
        id:
          type: string
        success:
          type: boolean
          example: true
        data:
          type: object
          properties:
            rows:
              type: array
              items:
                $ref: '#/components/schemas/LimitOrderHistoryItem'
            nextPageId:
              type: string
              nullable: true
              description: >-
                Opaque cursor for the next page; absent when this is the last
                page.
          required:
            - rows
      required:
        - success
        - data
    LimitOrderHistoryItem:
      type: object
      description: A single closed limit order, summarized.
      properties:
        pda:
          type: string
        owner:
          type: string
        poolId:
          type: string
        mintA:
          type: string
        mintB:
          type: string
        zeroForOne:
          type: boolean
        tick:
          type: integer
        price:
          type: number
        openBlockTime:
          type: integer
          description: Unix timestamp the order was opened.
        fillStatus:
          type: string
          enum:
            - NONE
            - PARTIAL
            - FULL
          description: |
            How much of the order was eventually filled before it closed:
            `NONE` (cancelled with zero fill), `PARTIAL`, or `FULL`.
        orderInputAmountUi:
          type: number
          description: Original input amount, in human units (decimals applied).
        orderOutputAmountUi:
          type: number
          description: >-
            Output amount the order would have paid out at its tick, in human
            units.
        filledInputAmountUi:
          type: number
        filledOutputAmountUi:
          type: number
      required:
        - pda
        - owner
        - poolId
        - mintA
        - mintB
        - zeroForOne
        - tick
        - price
        - openBlockTime
        - fillStatus
        - orderInputAmountUi
        - orderOutputAmountUi
        - filledInputAmountUi
        - filledOutputAmountUi
    LimitOrderEventByPdaResponse:
      type: object
      description: Payload for `/limit-order/history/event/list-by-pda`.
      properties:
        id:
          type: string
        success:
          type: boolean
          example: true
        data:
          type: object
          properties:
            rows:
              type: array
              items:
                $ref: '#/components/schemas/LimitOrderEventItem'
            nextPageId:
              type: string
              nullable: true
              description: >-
                Opaque cursor for the next page; absent when this is the last
                page.
          required:
            - rows
      required:
        - success
        - data
    LimitOrderEventItem:
      type: object
      description: A single on-chain mutation observed against a limit-order PDA.
      properties:
        pda:
          type: string
        txid:
          type: string
        slot:
          type: integer
        blockTime:
          type: integer
        poolId:
          type: string
        mintA:
          type: string
        mintB:
          type: string
        zeroForOne:
          type: boolean
        tick:
          type: integer
        price:
          type: number
        autoRunner:
          type: boolean
          description: >-
            True when the event was performed by the `limit_order_admin` keeper;
            false when signed by the owner.
        type:
          type: string
          enum:
            - open
            - increase
            - decrease
            - settle
            - close
        inputAmountChangeUi:
          type: number
          description: Net change to the order's input balance, in human units (signed).
        inputAmountValuePreUi:
          type: number
        inputAmountValuePostUi:
          type: number
        outputAmountChangeUi:
          type: number
          description: >-
            Net change to the order's accumulated output, in human units
            (signed).
        outputAmountValuePreUi:
          type: number
        outputAmountValuePostUi:
          type: number
      required:
        - pda
        - txid
        - slot
        - blockTime
        - poolId
        - mintA
        - mintB
        - zeroForOne
        - tick
        - price
        - autoRunner
        - type
        - inputAmountChangeUi
        - inputAmountValuePreUi
        - inputAmountValuePostUi
        - outputAmountChangeUi
        - outputAmountValuePreUi
        - outputAmountValuePostUi
    ErrorResponse:
      type: object
      properties:
        id:
          type: string
        success:
          type: boolean
          example: false
        msg:
          type: string
          description: Error message
      required:
        - success
        - msg
