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

# Wallet Portfolio

> Returns the wallet's tokens with balances and USD values. Reusable beyond the pay-with-wallet flow (swap source picker, deposit balance display, etc.). Hits BalanceService caches; force_refresh bypasses L1+L2.



## OpenAPI

````yaml https://api.coinvoyage.io/v2/openapi.json post /wallet/portfolio
openapi: 3.1.0
info:
  title: CoinVoyage API
  description: Cryptocurrency payment processing API
  version: 2.2.0
servers:
  - url: https://api.coinvoyage.io/v2
security: []
paths:
  /wallet/portfolio:
    post:
      tags:
        - wallet
      summary: Wallet Portfolio
      description: >-
        Returns the wallet's tokens with balances and USD values. Reusable
        beyond the pay-with-wallet flow (swap source picker, deposit balance
        display, etc.). Hits BalanceService caches; force_refresh bypasses
        L1+L2.
      operationId: walletPortfolio
      parameters:
        - description: API key for authentication
          in: header
          name: X-API-KEY
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WalletPortfolioRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WalletPortfolioResponse'
          description: Portfolio scan succeeded
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unauthorized
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Invalid request body
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Rate-limit bucket exceeded; Retry-After header set
      security:
        - APIKeyHeader: []
components:
  schemas:
    WalletPortfolioRequest:
      example:
        chain_ids:
          - 1
          - 8453
          - 137
        chain_type: EVM
        force_refresh: false
        min_balance_usd: 1
        wallet_address: 0x1234...abcd
      properties:
        wallet_address:
          example: 0x1234...abcd
          type: string
        chain_type:
          $ref: '#/components/schemas/ChainType'
          example: EVM
        chain_ids:
          example:
            - 1
            - 8453
            - 137
          items:
            $ref: '#/components/schemas/ChainID'
          type: array
        min_balance_usd:
          example: 1
          type:
            - number
            - 'null'
        force_refresh:
          example: false
          type: boolean
      required:
        - wallet_address
        - chain_type
      type: object
    WalletPortfolioResponse:
      example:
        chain_type: EVM
        currencies:
          - address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'
            balance:
              raw_amount: '2400000'
              ui_amount: 2.4
              ui_amount_display: '2.4'
              value_usd: 123.45
            chain_id: 1
            chain_logo_uri: >-
              https://assets.coingecko.com/asset_platforms/images/279/standard/ethereum.png
            decimals: 6
            logo_uri: https://assets.coingecko.com/coins/images/6319/large/usdc.png
            price_usd: 1
            symbol: USDC
        wallet_address: 0x1234...abcd
      properties:
        wallet_address:
          example: 0x1234...abcd
          type: string
        chain_type:
          $ref: '#/components/schemas/ChainType'
          example: EVM
        scanned_at:
          format: date-time
          type: string
        expires_at:
          format: date-time
          type: string
        currencies:
          items:
            $ref: '#/components/schemas/WalletPortfolioCurrency'
          type: array
      required:
        - wallet_address
        - chain_type
        - scanned_at
        - expires_at
        - currencies
      type: object
    ErrorResponse:
      example:
        code: 400
        error: Bad Request
        message: Invalid request parameters
      properties:
        error:
          example: Bad Request
          type: string
        message:
          example: Invalid request parameters
          type: string
        code:
          example: 400
          format: int64
          type: integer
        details:
          anyOf:
            - type: string
            - type: number
            - type: object
      required:
        - error
        - message
        - code
      type: object
    ChainType:
      enum:
        - EVM
        - SOL
        - SUI
        - UTXO
      type: string
    ChainID:
      enum:
        - 1
        - 10
        - 56
        - 137
        - 8453
        - 42161
        - 20000000000001
        - 30000000000001
        - 30000000000002
      example: 1
      format: int64
      type: integer
    WalletPortfolioCurrency:
      example:
        address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'
        balance:
          raw_amount: '2400000'
          ui_amount: 2.4
          ui_amount_display: '2.4'
          value_usd: 123.45
        chain_id: 1
        chain_logo_uri: >-
          https://assets.coingecko.com/asset_platforms/images/279/standard/ethereum.png
        decimals: 6
        logo_uri: https://assets.coingecko.com/coins/images/6319/large/usdc.png
        price_usd: 1
        symbol: USDC
      properties:
        chain_id:
          $ref: '#/components/schemas/ChainID'
          example: 1
        address:
          example: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'
          type:
            - string
            - 'null'
        symbol:
          example: USDC
          type: string
        decimals:
          example: 6
          format: int64
          type: integer
        balance:
          $ref: '#/components/schemas/CurrencyAmount'
        price_usd:
          example: 1
          type:
            - number
            - 'null'
        logo_uri:
          example: https://assets.coingecko.com/coins/images/6319/large/usdc.png
          type:
            - string
            - 'null'
        chain_logo_uri:
          example: >-
            https://assets.coingecko.com/asset_platforms/images/279/standard/ethereum.png
          type:
            - string
            - 'null'
      required:
        - chain_id
        - symbol
        - decimals
        - balance
      type: object
    CurrencyAmount:
      example:
        raw_amount: '2400000'
        ui_amount: 2.4
        ui_amount_display: '2.4'
        value_usd: 123.45
      properties:
        ui_amount:
          deprecated: true
          description: >-
            Approximate numeric amount. Do not use for payment construction; use
            raw_amount for exact amounts and ui_amount_display for display.
          example: 2.4
          type: number
        ui_amount_display:
          example: '2.4'
          type: string
        raw_amount:
          $ref: '#/components/schemas/BigInt'
          example: '2400000'
        value_usd:
          example: 123.45
          type: number
      required:
        - ui_amount
        - ui_amount_display
        - raw_amount
        - value_usd
      type: object
    BigInt:
      description: A big integer represented as a string to preserve precision
      example: '1000000000000000000'
      type: string
  securitySchemes:
    APIKeyHeader:
      in: header
      name: X-API-KEY
      type: apiKey

````