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

# Get all token balances for an address

> Retrieves all token balances from the asset list for a specific address.

Supports both wallet addresses (G-prefixed) and smart contracts/accounts (C-prefixed).

Example: GET /balances/GALAXYVOIDAOPZTDLHILAJQKCVVFMD4IKLXLSZV5YHO7VY74IWZILUTO?network=mainnet



## OpenAPI

````yaml GET /balances/{walletAddress}
openapi: 3.0.0
info:
  title: Soroswap API
  description: >+

    # 🚀 Soroswap API


    **Soroswap.Finance** is both an **Automated Market Maker (AMM)** and a **DEX
    Aggregator** on the Stellar blockchain.


    It aggregates liquidity from Soroban DEXes (**Soroswap, Phoenix, Aqua and
    Comet(TBA)**), and the **Stellar Classic DEX** — giving you **the best trade
    routes, liquidity tools, and real-time market data**.


    ---


    ## 📋 What You Can Do


    - 🔄 **Quote** – Get the best trade route between two assets with
    split-routing logic across AMMs and SDEX.  

    - 🧱 **Build** – Generate and simulate unsigned transactions (XDR) for swaps
    or liquidity actions.  

    - 🚀 **Send** – Submit signed transactions via Soroban RPC or Horizon.

    - ⚡ **Gasless Trustlines** – Use `gaslessTrustline` in `/quote` to open
    trustlines for users without requiring them to hold XLM or deal with
    trustline setup themselves.

    - 💰 **Platform Fees** – Add your own fee to user swaps with
    `platformFee`.  

    - 💧 **Liquidity** – Create LPs, add liquidity, remove liquidity.  

    - 💲 **Price** – Get real-time token prices.  

    - 🧠 **Pools** – View detailed pool information for Soroswap AMM.


    📮 **[Downnload the Postman Collection
    here](https://drive.google.com/drive/folders/1G-LQYE2EojPWP1CSuuS_tDb9vjYbFR6E?usp=drive_link)**

  version: '1.0'
  contact: {}
  x-logo:
    url: https://links.paltalabs.io/soroswap-full.svg
    backgroundColor: '#0e0e0e'
    altText: Soroswap Logo
    href: https://soroswap.finance
servers: []
security: []
tags: []
paths:
  /balances/{walletAddress}:
    get:
      tags:
        - Balances
      summary: Get all token balances for an address
      description: >-
        Retrieves all token balances from the asset list for a specific address.


        Supports both wallet addresses (G-prefixed) and smart contracts/accounts
        (C-prefixed).


        Example: GET
        /balances/GALAXYVOIDAOPZTDLHILAJQKCVVFMD4IKLXLSZV5YHO7VY74IWZILUTO?network=mainnet
      operationId: BalancesController_getAllBalances
      parameters:
        - name: walletAddress
          required: true
          in: path
          description: Stellar address - wallet (G-prefixed) or contract (C-prefixed)
          schema:
            type: string
            example: GALAXYVOIDAOPZTDLHILAJQKCVVFMD4IKLXLSZV5YHO7VY74IWZILUTO
        - name: network
          required: true
          in: query
          description: Network to query balances on
          schema:
            enum:
              - mainnet
              - testnet
            type: string
      responses:
        '200':
          description: Returns balances for all tokens in the asset list
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BalancesResponseDto'
        '400':
          description: Bad Request - Invalid address
        '401':
          description: Unauthorized - Missing or invalid authentication
        '503':
          description: Service Unavailable - Database connection unavailable
components:
  schemas:
    BalancesResponseDto:
      type: object
      properties:
        wallet:
          type: string
          example: GDMTVHLWJTHSUDMZVVMXXH6VJHA2ZV3HNG5LYNAZ6RTWB7GISM6PGTUV
          description: Wallet address
        network:
          type: string
          example: mainnet
          description: Network
        balances:
          description: Array of token balances
          type: array
          items:
            $ref: '#/components/schemas/TokenBalanceDto'
        updatedAt:
          type: number
          example: 1702483200000
          description: Timestamp when balances were fetched (ms since epoch)
      required:
        - wallet
        - network
        - balances
        - updatedAt
    TokenBalanceDto:
      type: object
      properties:
        asset:
          description: Asset information
          allOf:
            - $ref: '#/components/schemas/AssetInfoDto'
        amount:
          type: string
          example: '100.0000000'
          description: Human-readable balance with decimals
        rawAmount:
          type: string
          example: '1000000000'
          description: >-
            Raw balance in smallest unit (stroops for XLM, token decimals for
            others)
        available:
          type: string
          example: '97.5000000'
          description: >-
            Available/spendable amount (for XLM on G-accounts: balance minus
            reserves)
        availableRaw:
          type: string
          example: '975000000'
          description: Raw available/spendable amount in smallest unit
      required:
        - asset
        - amount
        - rawAmount
        - available
        - availableRaw
    AssetInfoDto:
      type: object
      properties:
        code:
          type: string
          example: XLM
          description: Token code/symbol
        issuer:
          type: string
          example: GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN
          description: Asset issuer (null for native XLM and pure Soroban tokens)
          nullable: true
        contract:
          type: string
          example: CAS3J7GYLGXMF6TDJBBYYSE3HQ6BBSMLNUQ34T6TZMYMW2EVH34XOWMA
          description: Soroban contract address
        name:
          type: string
          example: Stellar Lumens
          description: Human-readable asset name
          nullable: true
        icon:
          type: string
          example: https://example.com/xlm-icon.png
          description: Asset icon URL
          nullable: true
        decimals:
          type: number
          example: 7
          description: Token decimals
      required:
        - code
        - issuer
        - contract
        - name
        - icon
        - decimals

````

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