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

# Get wallet balances by stablecoin

> Returns the selected stablecoin's balance and USD value across supported chains.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/wallet/balances/by_coin/{user_id}/{coin}
openapi: 3.0.3
info:
  title: UniFi Public API
  version: 1.0.0
  description: >-
    Production API operations organized around the UniFi payment lifecycle.
    Internal administration, worker, dashboard, support, scheduling, and Falcon
    orchestration routes are intentionally excluded.
servers:
  - url: https://api.payunifi.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Health
    description: Check API process availability and dependency health.
  - name: Deposit
    description: Resolve deposit addresses for a UniFi wallet.
  - name: Wallet
    description: Read stablecoin balances across wallets and chains.
  - name: Preflight
    description: >-
      Check balances, allowances, and estimated fees before submitting a
      payment.
  - name: Pay
    description: Create managed-wallet, merchant, and self-custodial payments.
  - name: History
    description: Track payment sessions, receipts, finality, and history.
paths:
  /v1/wallet/balances/by_coin/{user_id}/{coin}:
    get:
      tags:
        - Wallet
      summary: Get wallet balances by stablecoin
      description: >-
        Returns the selected stablecoin's balance and USD value across supported
        chains.
      operationId: getWalletBalancesByCoin
      parameters:
        - $ref: '#/components/parameters/UserId'
        - $ref: '#/components/parameters/Coin'
      responses:
        '200':
          description: Wallet balances grouped by chain.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WalletBalancesByCoinResponse'
              example:
                status: 200 OK
                data:
                  total_usd: '1200.00'
                  price_usd: '1.00'
                  chain_details:
                    - - Ethereum
                      - balance: '1000.00'
                        value_usd: '1000.00'
                    - - Polygon
                      - balance: '200.00'
                        value_usd: '200.00'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/ServerError'
        '503':
          $ref: '#/components/responses/Unavailable'
components:
  parameters:
    UserId:
      name: user_id
      in: path
      required: true
      schema:
        type: string
      description: >-
        UniFi user identifier, such as a verified email address or wallet
        address.
    Coin:
      name: coin
      in: path
      required: true
      schema:
        $ref: '#/components/schemas/Stablecoin'
      description: Stablecoin ticker.
  schemas:
    WalletBalancesByCoinResponse:
      type: object
      required:
        - status
        - data
      properties:
        status:
          type: string
        data:
          $ref: '#/components/schemas/WalletBalancesByCoin'
    Stablecoin:
      type: string
      enum:
        - USDT
        - USDC
        - DAI
    WalletBalancesByCoin:
      type: object
      required:
        - total_usd
        - price_usd
        - chain_details
      properties:
        total_usd:
          type: string
        price_usd:
          type: string
        chain_details:
          type: array
          items:
            $ref: '#/components/schemas/WalletBalancesByCoinEntry'
    WalletBalancesByCoinEntry:
      type: array
      minItems: 2
      maxItems: 2
      description: A [chain, details] tuple.
      items:
        oneOf:
          - $ref: '#/components/schemas/Chain'
          - $ref: '#/components/schemas/WalletBalancesByCoinChainDetails'
    Chain:
      type: string
      enum:
        - Ethereum
        - Polygon
        - Sepolia
      description: >-
        Production-supported mainnets and public testnets exposed by the public
        reference.
    WalletBalancesByCoinChainDetails:
      type: object
      required:
        - balance
        - value_usd
      properties:
        balance:
          type: string
        value_usd:
          type: string
  responses:
    BadRequest:
      description: The request is invalid or cannot be completed in the current state.
      content:
        text/plain:
          schema:
            type: string
    Unauthorized:
      description: >-
        The bearer credential is missing, invalid, or not authorized for this
        user.
      content:
        text/plain:
          schema:
            type: string
    NotFound:
      description: The requested resource does not exist.
      content:
        text/plain:
          schema:
            type: string
    Conflict:
      description: The operation conflicts with the resource's current state.
      content:
        text/plain:
          schema:
            type: string
    RateLimited:
      description: The credential has exceeded its current request allowance.
      content:
        text/plain:
          schema:
            type: string
    ServerError:
      description: The API could not complete the request.
      content:
        text/plain:
          schema:
            type: string
    Unavailable:
      description: A required dependency is temporarily unavailable.
      content:
        text/plain:
          schema:
            type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: Use a UniFi API key generated from the web app and stored server-side.

````

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