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

# Get ERC20 token balances

> Retrieve all token balances for all ERC20 tokens for a specified address.

By default, it will return all token balances for all ERC20 tokens that the address has ever received.
You can specify a contract address to check the balance of a non-standard contract.



## OpenAPI

````yaml get /v1/account/tokens
openapi: 3.0.2
info:
  title: 🏦 Balance API
  version: v1.0.0
servers:
  - url: https://api.chainbase.online
    description: production server
security: []
paths:
  /v1/account/tokens:
    get:
      tags:
        - Token Balances
      summary: Get ERC20 token balances
      description: >-
        Retrieve all token balances for all ERC20 tokens for a specified
        address.


        By default, it will return all token balances for all ERC20 tokens that
        the address has ever received.

        You can specify a contract address to check the balance of a
        non-standard contract.
      operationId: GetAccountTokens
      parameters:
        - description: >-
            chain network id, see [list of
            details](/platform/features/api/web3-api)
          required: true
          schema:
            title: Chain Id
            type: string
            description: >-
              chain network id, see [list of
              details](/platform/features/api/web3-api)
          example: '1'
          name: chain_id
          in: query
        - description: A hex string referencing a wallet address
          required: true
          schema:
            title: Address
            pattern: ^0[xX]{1}[a-fA-F0-9]{40}$
            type: string
            description: A hex string referencing a wallet address
          example: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'
          name: address
          in: query
        - description: >-
            The address of the token contract, or filter multiple addresses,
            (max 100),
            eg:contract_address=0xdac17f958d2ee523a2206206994597c13d831ec7,0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
          required: false
          schema:
            title: Contract Address
            pattern: ^0[xX]{1}[a-fA-F0-9]{40}$
            type: string
            description: >-
              The address of the token contract, or filter multiple addresses,
              (max 100),
              eg:contract_address=0xdac17f958d2ee523a2206206994597c13d831ec7,0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
          example: '0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0'
          name: contract_address
          in: query
        - description: The desired page size limit. Less or equal than 100
          required: false
          schema:
            title: Limit
            maximum: 100
            minimum: 1
            type: integer
            description: The desired page size limit. Less or equal than 100
            default: 20
          name: limit
          in: query
        - description: The page offset
          required: false
          schema:
            title: Page
            minimum: 1
            type: integer
            description: The page offset
            default: 1
          name: page
          in: query
        - required: true
          schema:
            title: X-Api-Key
            type: string
            example: demo
          example: demo
          name: x-api-key
          in: header
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseGetAccountTokens'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
components:
  schemas:
    ResponseGetAccountTokens:
      title: ResponseGetAccountTokens
      type: object
      properties:
        code:
          title: Code
          type: integer
          default: 0
        message:
          title: Message
          type: string
          default: ok
        data:
          title: Data
          type: array
          items:
            $ref: '#/components/schemas/TokenMeta'
        next_page:
          title: Next Page
          type: integer
        count:
          title: Count
          type: integer
    ErrorMessage:
      title: ErrorMessage
      required:
        - code
        - message
      type: object
      properties:
        code:
          title: Code
          type: integer
        message:
          title: Message
          type: string
    TokenMeta:
      title: TokenMeta
      required:
        - contract_address
        - decimals
        - name
        - symbol
        - balance
      type: object
      properties:
        contract_address:
          title: Contract Address
          type: string
          description: ERC-20 contract address.
        decimals:
          title: Decimals
          type: integer
          description: The number of decimals the token uses.
        name:
          title: Name
          type: string
          description: The name of the ERC-20 token.
        symbol:
          title: Symbol
          type: string
          description: The symbol of the ERC-20 token.
        total_supply:
          title: Total Supply
          type: string
          description: The total supply of the ERC-20 token.
        logos:
          title: Logos
          type: array
          items:
            $ref: '#/components/schemas/TokenMetaLogo'
          description: List of logo images for the ERC-20 token.
        urls:
          title: Urls
          type: array
          items:
            $ref: '#/components/schemas/TokenMetaURL'
          description: List of urls for the ERC-20 token.
        current_usd_price:
          title: Current Usd Price
          type: number
          description: The current price of the ERC-20 token in USD.
        balance:
          title: Balance
          type: string
          description: The balance of the ERC-20 token for a given wallet.
    TokenMetaLogo:
      title: TokenMetaLogo
      required:
        - uri
        - width
        - height
      type: object
      properties:
        uri:
          title: Uri
          type: string
          description: URI for the logo image.
        width:
          title: Width
          type: integer
          description: The logo image's approximate width in pixels.
        height:
          title: Height
          type: integer
          description: The logo image's approximate height in pixels.
    TokenMetaURL:
      title: TokenMetaURL
      required:
        - name
        - url
      type: object
      properties:
        name:
          title: Name
          type: string
          description: The name of the link.
        url:
          title: Url
          type: string
          description: The URL of the link.

````