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

# 지갑 잔액 조회

> 지정 체인에서 호출자 지갑의 네이티브/토큰 잔액.

<Note>
  네이티브 잔액 캐시 \~15초; 토큰 \~45초. `tokens`는 요청당 50개로 제한. `address` 제공 시 소유 지갑이어야 합니다.
</Note>

<ResponseExample>
  ```json 200 theme={null}
  {
    "balances": [
      {"chainType":"ethereum","chainId":8453,"address":"0xYourAddress","asset":"native","token":null,"raw":"1000000000000000000","decimals":18,"symbol":"ETH","updatedAt":"2025-09-08T00:00:00.000Z"},
      {"chainType":"ethereum","chainId":8453,"address":"0xYourAddress","asset":"erc20","token":"0xUSDC","raw":"1000000","decimals":6,"symbol":"USDC","updatedAt":"2025-09-08T00:00:00.000Z"}
    ]
  }
  ```
</ResponseExample>


## OpenAPI

````yaml GET /wallets/balances
openapi: 3.1.0
info:
  title: AFK Crypto API
  description: >-
    AFK Crypto - Non-custodial wallet automation. Simple REST APIs for EVM and
    Solana.
  version: 1.0.0
servers:
  - url: https://api.afkcrypto.com/v1
    description: Production
security:
  - apiKeyAuth: []
paths:
  /wallets/balances:
    get:
      summary: Get balances for caller wallet
      description: >-
        Retrieve native balance and optionally token balances for the caller's
        wallet on a chain.
      parameters:
        - name: chain
          in: query
          required: true
          schema:
            type: string
          description: Chain slug (e.g., base, base-sepolia, solana, solana-devnet)
        - name: address
          in: query
          required: false
          schema:
            type: string
          description: >-
            Optional wallet address; defaults to caller's default wallet for the
            chain
        - name: tokens
          in: query
          required: false
          schema:
            type: string
          description: CSV of token addresses (EVM) or mints (Solana) to include (max 50)
        - name: includeZero
          in: query
          required: false
          schema:
            type: boolean
          description: Include zero balances (default false)
        - name: fresh
          in: query
          required: false
          schema:
            type: boolean
          description: Bypass short-lived cache (default false)
      responses:
        '200':
          description: Balances response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetBalancesResponse'
          headers:
            x-request-id:
              $ref: '#/components/headers/XRequestId'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          headers:
            x-request-id:
              $ref: '#/components/headers/XRequestId'
        '404':
          description: Wallet not found or not owned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          headers:
            x-request-id:
              $ref: '#/components/headers/XRequestId'
        '429':
          description: Rate limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          headers:
            x-request-id:
              $ref: '#/components/headers/XRequestId'
            Retry-After:
              schema:
                type: integer
              description: Seconds until next window
        default:
          $ref: '#/components/responses/ErrorResponse'
components:
  schemas:
    GetBalancesResponse:
      type: object
      properties:
        balances:
          type: array
          items:
            $ref: '#/components/schemas/WalletBalance'
      required:
        - balances
    ApiError:
      type: object
      properties:
        error:
          type: string
          description: Human-readable error message.
        code:
          type: string
          enum:
            - FORBIDDEN
            - UNAUTHORIZED
            - RATE_LIMITED
            - INVALID_INPUT
            - WALLET_NOT_FOUND
            - USER_NOT_LINKED
            - WALLET_NOT_DELEGATED
            - WALLET_ID_REQUIRED
            - CHAIN_UNKNOWN
            - IDEMPOTENT_BODY_MISMATCH
            - IDEMPOTENT_REPLAY
            - PRIVY_RPC_ERROR
            - SEND_FAILED
            - SERVICE_UNAVAILABLE
            - QUOTE_FAILED
            - NOT_FOUND
            - INSUFFICIENT_FUNDS
            - INTERNAL_ERROR
          description: Stable error code for programmatic handling.
        requestId:
          type:
            - string
            - 'null'
          description: Unique request identifier (also in x-request-id header).
      required:
        - error
    WalletBalance:
      type: object
      properties:
        chainType:
          type: string
          enum:
            - ethereum
            - solana
          description: Chain family for the balance.
        chainId:
          type: integer
          description: >-
            EVM: numeric chainId; Solana: sentinel values 0=mainnet, -2=testnet,
            -3=devnet.
        address:
          type: string
          description: Wallet address the balance pertains to.
        asset:
          type: string
          enum:
            - native
            - erc20
            - spl
          description: 'Asset type: native coin or token standard.'
        token:
          type:
            - string
            - 'null'
          description: >-
            Token address (EVM) or mint (Solana) for token balances; null for
            native.
        raw:
          type: string
          description: Balance in base units as a string.
        decimals:
          type:
            - integer
            - 'null'
          description: >-
            Number of decimals for the asset (may be null if metadata
            unavailable).
        symbol:
          type:
            - string
            - 'null'
          description: >-
            Asset symbol, e.g., ETH or USDC (may be null if metadata
            unavailable).
        updatedAt:
          type: string
          format: date-time
          description: Timestamp when the balance was last refreshed.
      required:
        - chainType
        - chainId
        - address
        - asset
        - raw
        - decimals
        - symbol
        - updatedAt
  headers:
    XRequestId:
      description: Unique request identifier
      schema:
        type: string
  responses:
    ErrorResponse:
      description: Error envelope
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
      headers:
        x-request-id:
          $ref: '#/components/headers/XRequestId'
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````