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

# Get Positions

> Retrieves the user's lending positions, each with token balances read live from chain. Read-only.

Filter on `has_active_balance` rather than applying a dust threshold of your own. Requires a read signature; see [Signing Requests](/guide/integration/signing#signing-requests) and [Position State](/guide/integration/lending#position-state).



## OpenAPI

````yaml POST /borrow/positions
openapi: 3.0.1
info:
  title: Vanish Core API
  description: API endpoints for the Vanish Core service.
  license:
    name: MIT
  version: 2.0.0
servers:
  - url: https://core-api-dev.vanish.trade
security:
  - ApiKeyAuth: []
paths:
  /borrow/positions:
    post:
      summary: Get Positions
      description: >-
        Retrieves the user's lending positions, each with token balances read
        live from chain. Read-only.


        Filter on `has_active_balance` rather than applying a dust threshold of
        your own. Requires a read signature; see [Signing
        Requests](/guide/integration/signing#signing-requests) and [Position
        State](/guide/integration/lending#position-state).
      requestBody:
        description: Request payload for querying lending positions.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BorrowPositionsRequest'
        required: true
      responses:
        '200':
          description: A successful response containing the user's lending positions.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BorrowPosition'
        '400':
          description: >-
            Bad request. The user address format is invalid, or the timestamp is
            outside the freshness window.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BorrowError'
        '401':
          description: >-
            Unauthorized. The request is missing a valid API key or the
            signature is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BorrowError'
        '429':
          description: >-
            Rate limit exceeded. Contact the Vanish team to raise your team's
            requests-per-second cap.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BorrowError'
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BorrowError'
components:
  schemas:
    BorrowPositionsRequest:
      required:
        - user_address
        - timestamp
        - user_signature
      type: object
      properties:
        user_address:
          description: The Solana wallet address of the user.
          type: string
        timestamp:
          description: >-
            The current timestamp in milliseconds used for signature
            verification. Read-scoped: accepted within 24 hours. Can be provided
            as a string or a number
          oneOf:
            - type: string
              pattern: ^[0-9]+$
            - type: integer
              format: int64
        user_signature:
          description: >-
            Signature of the 'By signing, I hereby agree to Vanish's Terms of
            Service and agree to be bound by them (docs.vanish.trade/legal/TOS)


            Details: read:{timestamp}' string signed using the user's wallet.
          type: string
    BorrowPosition:
      required:
        - smart_wallet_id
        - address
        - protocol_label
        - status
        - created_at
        - balances
        - has_active_balance
      type: object
      properties:
        smart_wallet_id:
          description: Identifier of the position's one-time wallet.
          type: integer
          example: 4821
        address:
          description: The one-time wallet's Solana address.
          type: string
        protocol_label:
          description: The label set when the one-time wallet was created.
          type: string
          example: kamino-lend-v2
        status:
          description: >-
            Current status of the position. It is closed once a settle with
            cleanup_leftover_sol has been committed.
          enum:
            - open
            - closed
          type: string
        created_at:
          description: >-
            Timestamp (ISO 8601 format) indicating when the one-time wallet was
            created.
          type: string
        closed_at:
          description: >-
            Timestamp (ISO 8601 format) indicating when the position was closed;
            null while it is open.
          type: string
          nullable: true
        balances:
          type: array
          items:
            $ref: '#/components/schemas/TokenBalance'
          description: >-
            Live token balances read from chain for this one-time wallet. An
            empty array means the balance lookup did not return - treat it as
            unknown rather than a confirmed zero.
        has_active_balance:
          description: >-
            True only when balances holds a non-SOL token with a positive
            balance. Leftover SOL dust alone does not count - filter on this
            field instead of applying your own dust threshold.
          type: boolean
    BorrowError:
      required:
        - error
      type: object
      properties:
        error:
          description: >-
            The error code or short description. Endpoint errors use the HTTP
            status text (for example '400 Bad Request'); errors raised by the
            API key middleware and the rate limiter carry the description here
            instead.
          type: string
        message:
          description: >-
            The specific reason for the failure. Null on a signature
            verification failure, and absent entirely on API key and rate limit
            errors - check for the presence of this field rather than assuming
            every error body has the same shape.
          type: string
          nullable: true
    TokenBalance:
      required:
        - token_address
        - balance
        - program_id
      type: object
      properties:
        token_address:
          description: The token address
          type: string
        balance:
          description: Token balance in the smallest unit (e.g., lamports for SOL).
          type: string
          format: int64
        program_id:
          description: Owner Program
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````