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

# Get customer balance

> Get the aggregated estimated balance across all customer wallets/assets.



## OpenAPI

````yaml /api-reference/openapi.yaml get /customers/{id}/balance
openapi: 3.0.3
info:
  title: Polygon OMS Public API
  version: v26.05.28-0001
  description: >-
    Unified API for moving money between crypto and fiat. Three ways to move
    money: Transactions (instant, wallet or card funded, including Cash-In for
    in-person cash deposits), Deposit Addresses (reusable crypto deposit
    configurations), and Virtual Accounts (dedicated bank accounts that
    auto-convert fiat to crypto). Standard transactions follow a two-step flow:
    create a Quote (pricing), then create a Transaction (execution). Cash-in
    codes generate a one-time deposit code for in-person cash deposits at retail
    locations.
  contact:
    name: Polygon OMS
    url: https://oms.polygon.technology
servers:
  - url: https://sandbox-api.polygon.technology/v0.13
    description: Sandbox
  - url: https://api.polygon.technology/v0.13
    description: Production
security:
  - BearerAuth: []
tags:
  - name: Auth
    description: Authentication via FrontEgg
  - name: Customers
    description: Customer management and KYC
  - name: Customer
  - name: Wallet
  - name: Quote
  - name: Transaction
  - name: CashIns
  - name: CashLocation
  - name: Sandbox
  - name: VirtualAccount
  - name: Counterparty
  - name: ExternalAccount
  - name: Reference
  - name: DepositAddress
paths:
  /customers/{id}/balance:
    get:
      tags:
        - Customer
      summary: Get customer balance
      description: Get the aggregated estimated balance across all customer wallets/assets.
      operationId: getCustomerBalance
      parameters:
        - name: id
          in: path
          required: true
          description: Customer ID (`cst_` prefix).
          schema:
            type: string
        - name: estimatedBalanceCurrencyCode
          in: query
          required: false
          description: ISO 4217 currency for the estimated value. Defaults to USD.
          schema:
            type: string
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerBalanceAggregate'
        '400':
          description: The server could not understand the request due to invalid syntax.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidCustomerIdErrorBody'
        '401':
          description: Access is unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorBody'
        '404':
          description: The server cannot find the requested resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerNotFoundErrorBody'
        '422':
          description: Client error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProviderUserAccountNotFoundErrorBody'
        '502':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProviderErrorBody'
        '503':
          description: Service unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProviderUnreachableErrorBody'
components:
  schemas:
    CustomerBalanceAggregate:
      type: object
      required:
        - data
      properties:
        data:
          type: object
          properties:
            customerId:
              allOf:
                - $ref: '#/components/schemas/typeId'
              description: Public OMS customer ID, format `cst_<typeID>`.
            estimatedBalanceValue:
              allOf:
                - $ref: '#/components/schemas/fixedDecimalString'
              description: >-
                Estimated total balance value across all customer
                wallets/assets, in
                        the currency requested via the `estimatedBalanceCurrencyCode` query
                        param. Defaults to USD when the query param is omitted. Decimal
                        string.
            estimatedBalanceCurrencyCode:
              type: string
              description: Currency code used for `estimatedBalanceValue`.
            updatedAt:
              type: string
              format: date-time
              description: >-
                Most recent provider balance timestamp included in the
                aggregate.
                        Omitted when no provider balance timestamps were available to
                        aggregate.
            totalBalance:
              allOf:
                - $ref: '#/components/schemas/CustomerTotalBalance'
              description: |-
                USD balance rollup (fiat / crypto / total) for OMSX to compose
                        `Customer.totalBalance` (v0.11-8, #2362). Mirrors the OMS
                        `Customer.totalBalance` shape 1:1. Omitted as a whole when the Coinme
                        provider read (or the fiat mirror read) fails — a partial/half total is
                        never returned. `estimatedBalanceValue` above is retained unchanged for
                        back-compat.
          required:
            - customerId
            - estimatedBalanceValue
            - estimatedBalanceCurrencyCode
      description: >-
        A customer's estimated total balance, aggregated across all of their
        wallets and assets.
    InvalidCustomerIdErrorBody:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          enum:
            - invalid customer id
          description: Human-readable error identifier.
    UnauthorizedErrorBody:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          enum:
            - unauthorized
          description: Human-readable error identifier.
    CustomerNotFoundErrorBody:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          enum:
            - customer not found
          description: Human-readable error identifier.
    ProviderUserAccountNotFoundErrorBody:
      type: object
      required:
        - error
        - code
      properties:
        error:
          type: string
          enum:
            - provider account not provisioned for this customer
          description: Human-readable error identifier.
        code:
          type: string
          enum:
            - providerUserAccountNotFound
          description: Machine-readable code.
    ProviderErrorBody:
      type: object
      required:
        - error
        - code
      properties:
        error:
          type: string
          description: Human-readable error identifier.
        code:
          type: string
          enum:
            - providerError
          description: Machine-readable code.
    ProviderUnreachableErrorBody:
      type: object
      required:
        - error
        - code
      properties:
        error:
          type: string
          enum:
            - upstream provider unreachable
          description: Human-readable error identifier.
        code:
          type: string
          enum:
            - providerUnreachable
          description: Machine-readable code.
    typeId:
      type: string
      pattern: >-
        ^[a-z]+_([0-9a-hjkmnp-tv-z]{26}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$
      description: >-
        Public TypeID, e.g. `txn_01h455vb4pex5vsknk084sn02q`; legacy UUID
        suffixes are accepted until non-v7 rows are retired.
      x-go-type: string
    fixedDecimalString:
      type: string
      description: Wire-safe decimal string that preserves trailing zeros on the wire.
      x-go-type-import:
        path: github.com/0xPolygon/bpn-lib/numeric
      x-go-type: numeric.FixedDecimalString
    CustomerTotalBalance:
      type: object
      properties:
        totalUsd:
          allOf:
            - $ref: '#/components/schemas/signedFixedDecimalString'
          description: |-
            `fiatUsd + cryptoUsd`, formatted to 2 decimal places, sign preserved
                  (e.g. `"25.00"`, `"-15.50"`).
        fiatUsd:
          allOf:
            - $ref: '#/components/schemas/signedFixedDecimalString'
          description: |-
            Signed sum of the customer's USD fiat-wallet balances, read from the
                  cached Erebor mirror (`account_balances`, USD 1:1). No Erebor call on the
                  hot path. Formatted to 2 decimal places, sign preserved.
        cryptoUsd:
          allOf:
            - $ref: '#/components/schemas/signedFixedDecimalString'
          description: >-
            Signed sum of Coinme custodial crypto balances valued in USD,
            formatted to
                  2 decimal places. `"0.00"` for a customer with no Coinme account.
      description: >-
        USD balance rollup exposed on the customer-balance read, shaped to match
        the

        OMS `Customer.totalBalance` object so OMSX maps it field-for-field.


        All three values are signed USD decimal strings (a fiat balance may be

        negative after an ACH clawback that overdraws the deposit account, so
        the

        total may be negative too — consumers must render the sign verbatim,
        never

        clamp to zero). Read-only: this object appears only on the balance GET.


        `cryptoUsd` is custodial-only. It sums Coinme's per-asset

        `estimatedBalanceValue` (already USD-denominated; no new
        oracle/pricing).

        Embedded (non-custodial) wallets have no balance source in BPN and are
        not

        valued here. An Erebor-only customer (no Coinme account) gets

        `cryptoUsd = "0"` rather than a 422.
    signedFixedDecimalString:
      type: string
      description: >-
        Wire-safe decimal string for signed financial values that must ship with
        a

        fixed scale (trailing zeros preserved). It combines the two guarantees
        the

        OMS `Customer.totalBalance` fields need at once: the leading minus is
        part of

        the contract — a fiat balance may be negative after an ACH clawback, so

        consumers render the sign as-is and never clamp to zero — and the scale
        is

        preserved on the wire (e.g. `"25.00"`, `"-25.00"`, `"0.00"`), unlike

        `signedDecimalString`/`decimal.Decimal`, whose `.String()` trims
        trailing

        zeros (`"25.00"` → `"25"`). Same underlying `numeric.FixedDecimalString`
        Go

        type as `fixedDecimalString`; the builder is responsible for setting the

        scale (via `StringFixed`).
      x-go-type-import:
        path: github.com/0xPolygon/bpn-lib/numeric
      x-go-type: numeric.FixedDecimalString
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Token from POST /auth/token

````