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

# Get the live withdraw queue of a KVault

> Returns the on-chain withdraw queue of every allocation reserve of a Kamino Earn Vault: market ticket flags, queue counters, queued and available liquidity, and the open withdraw tickets of every owner on the reserve, not only those issued through this vault. Fully redeemed tickets are closed on-chain and do not appear; use `/kvaults/vaults/:pubkey/enqueued-withdraw-transactions` for history. `wallet` filters the returned tickets only, `position` and the amounts ahead always count the whole reserve queue. Returns 404 when the vault does not exist.



## OpenAPI

````yaml /kamino-api.json get /kvaults/vaults/{pubkey}/withdraw-queue
openapi: 3.1.0
info:
  version: 1.0.0
  title: Kamino Public API
  description: >
    The Kamino API provides a comprehensive way to interact with Kamino without
    reading directly from the blockchain.


    The API also provides the ability to fetch data that might not be available
    from just reading the chain.


    The API is rate-limited for unauthenticated users. If you feel you need to
    make more requests or run into rate-limit issues, please reach out.
servers:
  - url: https://api.kamino.finance
security: []
paths:
  /kvaults/vaults/{pubkey}/withdraw-queue:
    get:
      tags:
        - Kamino Earn Vaults
      summary: Get the live withdraw queue of a KVault
      description: >-
        Returns the on-chain withdraw queue of every allocation reserve of a
        Kamino Earn Vault: market ticket flags, queue counters, queued and
        available liquidity, and the open withdraw tickets of every owner on the
        reserve, not only those issued through this vault. Fully redeemed
        tickets are closed on-chain and do not appear; use
        `/kvaults/vaults/:pubkey/enqueued-withdraw-transactions` for history.
        `wallet` filters the returned tickets only, `position` and the amounts
        ahead always count the whole reserve queue. Returns 404 when the vault
        does not exist.
      parameters:
        - schema:
            $ref: '#/components/schemas/AddressBase58'
          required: true
          description: Valid base58-encoded address
          name: pubkey
          in: path
        - schema:
            allOf:
              - $ref: '#/components/schemas/AddressBase58'
              - description: >-
                  Only return tickets owned by this wallet. Queue positions are
                  still computed over every ticket on the reserve.
          required: false
          description: >-
            Only return tickets owned by this wallet. Queue positions are still
            computed over every ticket on the reserve.
          name: wallet
          in: query
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KvaultWithdrawQueueResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: High-level error message describing the failure
                    example: Invalid query params
                  details:
                    type: array
                    items:
                      type: object
                      additionalProperties: {}
                    description: >-
                      Detailed validation issues (present only for validation
                      errors)
                required:
                  - error
                description: Bad request response (400)
                example:
                  error: Invalid query request
                  details:
                    - code: invalid_union
                      errors:
                        - - code: custom
                            path: []
                            message: Invalid date string
                        - - expected: number
                            code: invalid_type
                            path: []
                            message: 'Invalid input: expected number, received string'
                      path:
                        - start
                      message: Invalid input
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  metadata:
                    type: string
                    description: Error message describing why it was not found
                    example: Account could not be found
                required:
                  - metadata
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    AddressBase58:
      type: string
      description: Valid base58-encoded address
      example: VEG1EMtttdHunMbSza8uoms1R18VXmYSph2bBpHcSJd
    KvaultWithdrawQueueResponse:
      type: object
      properties:
        reserves:
          type: array
          items:
            $ref: '#/components/schemas/KvaultWithdrawQueueReserve'
          description: Withdraw queue of each vault allocation reserve
      required:
        - reserves
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error message for internal server failure
          example: An internal error occurred
      required:
        - error
      description: Internal server error response (500)
      example:
        error: An internal error occurred
    KvaultWithdrawQueueReserve:
      type: object
      properties:
        reserve:
          allOf:
            - $ref: '#/components/schemas/AddressBase58'
            - description: Allocation reserve public key
        market:
          allOf:
            - $ref: '#/components/schemas/AddressBase58'
            - description: Lending market public key of the reserve
        liquidityMint:
          allOf:
            - $ref: '#/components/schemas/AddressBase58'
            - description: Liquidity token mint of the reserve
        issuanceEnabled:
          type: boolean
          description: Whether the market allows issuing new withdraw tickets
        redemptionEnabled:
          type: boolean
          description: Whether the market allows redeeming queued withdraw tickets
        cancellationEnabled:
          type: boolean
          description: Whether the market allows cancelling withdraw tickets
        nextIssuedTicketSequenceNumber:
          allOf:
            - $ref: '#/components/schemas/Integer'
            - description: Sequence number the next issued ticket gets (u64)
        nextWithdrawableTicketSequenceNumber:
          allOf:
            - $ref: '#/components/schemas/Integer'
            - description: Sequence number of the ticket at the head of the queue (u64)
        queuedLiquidityAmount:
          allOf:
            - $ref: '#/components/schemas/Decimal'
            - description: >-
                Liquidity token amount queued on the reserve across all tickets,
                at the current collateral exchange rate
        queuedUsdValue:
          allOf:
            - $ref: '#/components/schemas/Decimal'
            - description: USD value queued on the reserve across all tickets
        availableLiquidity:
          allOf:
            - $ref: '#/components/schemas/Decimal'
            - description: >-
                Liquidity token amount held by the reserve; queued tickets are
                served from it before other withdrawals
        tickets:
          type: array
          items:
            $ref: '#/components/schemas/KvaultWithdrawTicket'
          description: >-
            Withdraw tickets on the reserve from every owner, sorted by sequence
            number
      required:
        - reserve
        - market
        - liquidityMint
        - issuanceEnabled
        - redemptionEnabled
        - cancellationEnabled
        - nextIssuedTicketSequenceNumber
        - nextWithdrawableTicketSequenceNumber
        - queuedLiquidityAmount
        - queuedUsdValue
        - availableLiquidity
        - tickets
    Integer:
      type: string
      description: Total number of unique users participating in the airdrop
      example: '1'
      examples:
        - '0'
        - '1'
        - '100'
        - '-1'
    Decimal:
      type: string
      description: Decimal value represented as string
      example: '1234.56789'
    KvaultWithdrawTicket:
      type: object
      properties:
        ticket:
          allOf:
            - $ref: '#/components/schemas/AddressBase58'
            - description: Withdraw ticket account public key
        sequenceNumber:
          allOf:
            - $ref: '#/components/schemas/Integer'
            - description: Ticket sequence number in the reserve withdraw queue (u64)
        owner:
          allOf:
            - $ref: '#/components/schemas/AddressBase58'
            - description: Wallet that owns the withdraw ticket
        kvault:
          anyOf:
            - $ref: '#/components/schemas/AddressBase58'
            - type: 'null'
          description: >-
            This vault when the ticket was issued by one of its `redeemInKind`
            redemptions, otherwise null
        queuedCollateralAmount:
          allOf:
            - $ref: '#/components/schemas/Integer'
            - description: >-
                Reserve collateral (cToken, raw u64 units) still queued on the
                ticket
        queuedLiquidityAmount:
          allOf:
            - $ref: '#/components/schemas/Decimal'
            - description: >-
                Liquidity token amount still queued on the ticket, at the
                current collateral exchange rate
        queuedUsdValue:
          allOf:
            - $ref: '#/components/schemas/Decimal'
            - description: USD value still queued on the ticket, at the current token price
        createdOn:
          type: string
          format: date-time
          description: Time the ticket was issued
        invalid:
          type: boolean
          description: Whether the ticket was marked invalid on-chain
        position:
          type: integer
          description: >-
            Number of tickets on the reserve with a lower sequence number and
            collateral still queued
        liquidityAhead:
          allOf:
            - $ref: '#/components/schemas/Decimal'
            - description: Liquidity token amount queued on the tickets ahead of this one
        usdAhead:
          allOf:
            - $ref: '#/components/schemas/Decimal'
            - description: USD value queued on the tickets ahead of this one
      required:
        - ticket
        - sequenceNumber
        - owner
        - kvault
        - queuedCollateralAmount
        - queuedLiquidityAmount
        - queuedUsdValue
        - createdOn
        - invalid
        - position
        - liquidityAhead
        - usdAhead

````

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