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

# Balances of one wallet

> What a stake address held at a moment, to check a window client-side: the balance at the window's start plus the legs of every event in it (leave out REWARD_WITHDRAWAL, which only moves ADA from the reward account into the UTxO set) equals the balance at its end, per unit, counting ADA in the reward account. at is an ISO 8601 instant, an ISO date (the end of that day, UTC) or unix seconds; the state is after every block at or before it, default now. Amounts are raw units as integer strings. Requires a cardano-mainnet API key.



## OpenAPI

````yaml https://nexus.gerowallet.io/v3/api-docs get /api/tax/cardano/{stakeAddress}/balances
openapi: 3.1.0
info:
  title: Nexus API
  description: >-
    Multi-chain blockchain data API for Cardano, Bitcoin, Solana, and Midnight.


    ## Blockchains & Networks

    Endpoints are grouped by **blockchain**. Pick the target **network** with
    the

    `network` query parameter. A network is an environment *within* a
    blockchain,

    not a separate endpoint family.


    - **Cardano**: `CARDANO_MAINNET`, `CARDANO_PREPROD`, `CARDANO_PREVIEW`

    - **Bitcoin**: `BITCOIN_MAINNET`, `BITCOIN_TESTNET4`

    - **Solana**: `SOLANA_MAINNET`, `SOLANA_DEVNET`

    - **Ethereum and Base** (EVM): `ETHEREUM_MAINNET`, `ETHEREUM_SEPOLIA`,
    `BASE_MAINNET`,
      `BASE_SEPOLIA`. The EVM routes take the network in the path instead:
      `/api/v1/evm/{ethereum|sepolia|base|base-sepolia}/...`
    - **Midnight**: `MIDNIGHT_MAINNET`, `MIDNIGHT_PREPROD`, `MIDNIGHT_PREVIEW`
      (`MIDNIGHT_STAGENET` was removed on 2026-11-30: Midnight replaced it with Preview)

    These are the values published on each operation's `network` schema, and
    what

    generated clients send. A kebab-case alias (`cardano-mainnet`) is also
    accepted,

    and matching is case-insensitive — see the note on the parameter itself.


    ### Key scope: one chain, one network

    Each API key is scoped to **one chain and one network**, fixed at creation
    time.

    A `CARDANO_MAINNET` key cannot query `CARDANO_PREPROD`, and it cannot query

    Bitcoin or Midnight at all. Create one key per chain and network under the
    same

    account. Sending a `network` value that does not match the key returns

    **400 Network Mismatch**; omit the parameter and the request runs against
    the

    key's own network.


    A Cardano address says which network it belongs to (`addr1` and `stake1` are

    mainnet, `addr_test1` and `stake_test1` are the testnets). The Cardano
    address

    and stake-account lookups answer **400 Network Mismatch** with `errorCode`

    `WRONG_NETWORK` for an address of the other kind, such as `addr_test1...` on
    a

    `CARDANO_MAINNET` key, instead of an empty result.


    What is uniform across chains is the integration surface, not the
    credential:

    one account, one base URL, one auth header, one docs site.


    ## Authentication

    Send your API key in the `X-Api-Key` header. This is the credential for

    programmatic access (create one in the dashboard; keys start with `nxs_`).

    `Authorization: Bearer <token>` is only for JWT **session** tokens issued by

    `/api/auth/login` (browser/mobile apps), not for API keys.


    A request that does not authenticate answers **401** with an `errorCode`:

    `MISSING_API_KEY` (no key was sent), `INVALID_API_KEY` (the key in
    `X-Api-Key`

    is not valid: unknown, revoked or expired),
    `API_KEY_IN_AUTHORIZATION_HEADER`

    (an `nxs_` key sent as a Bearer token), `INVALID_TOKEN` (a session token
    that

    is not valid or has expired) or `MISSING_SESSION_TOKEN` (an account endpoint

    called with no credentials; those take a session token, not an API key).


    ## Errors

    Errors are JSON: `timestamp`, `status`, `error`, `message`, `path` and

    `requestId`, plus `errorCode` where a condition has a stable code. Branch on

    `status` and `errorCode`, not on `message`.


    A path or query parameter that fails validation answers **400** and the

    `message` names it, its rule and the value received:

    `Validation failed: pageSize: Page size must not exceed 100 (received 101)`.

    `validationErrors` lists the same failures one per entry. For a request body

    the `message` is `Validation failed` and the detail is in
    `validationErrors`.


    ## Add-ons

    Capability is gated separately from network scope. Market data, wallet
    analytics,

    transaction building, MCP, and IPFS are paid add-ons; those endpoints return

    **402 Payment Required** on a key whose plan does not carry the matching
    add-on,

    even when the chain and network match.
  contact:
    name: Nexus Team
    url: https://nexus.gerowallet.io/support
    email: nexus@gerowallet.io
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: 1.0.0
servers:
  - url: https://nexus.gerowallet.io
    description: API Server
security:
  - apiKeyAuth: []
  - bearerAuth: []
tags:
  - name: Cardano · Blocks
    description: Cardano Block API
  - name: Cardano · Policy
    description: Cardano Policy API
  - name: IPFS
    description: IPFS Content Resolution API
  - name: Bitcoin · Ordinals
    description: Ordinals + runes metadata (ord indexer)
  - name: Solana · Staking
    description: Solana native staking reads
  - name: EVM · Ethereum and Base
    description: Balances, ERC-20 tokens, history, fees and broadcast for Ethereum and Base
  - name: Solana · Addresses
    description: Solana address balances, tokens and history
  - name: Partner
    description: Aggregator revenue share for partner key holders
  - name: Cardano · Metadata
    description: Label-scoped transaction metadata API
  - name: Cardano · Assets
    description: Token Registry Metadata
  - name: Cardano · Transactions
    description: Cardano Transactions API
  - name: Midnight · Transactions
    description: Midnight-specific transaction endpoints (unshielded UTXOs)
  - name: Bitcoin · Mempool
    description: Bitcoin mempool snapshot
  - name: Midnight · DUST
    description: DUST registration + generation status
  - name: Cardano · Stake Pools
    description: >-
      Cardano stake pool information including registrations, retirements, and
      pool metadata
  - name: Cardano · Network
    description: Cardano Network API - Query static network / genesis parameters
  - name: Cardano · RealFi
    description: >-
      RealFi Earn (USDr / sUSDr) read API. Wallet-keyed reads take a bech32
      address; Nexus derives the key hashes RealFi matches on. Networks without
      a RealFi deployment answer 502 rather than guessing.
  - name: Cardano · Addresses
    description: Cardano Address API
  - name: Bitcoin · Addresses
    description: >-
      Bitcoin address-keyed queries: stats / balance / UTxOs via electrs;
      ordinals via ord
  - name: Bitcoin · Transactions
    description: Bitcoin transaction lookup and submission
  - name: Solana · Chain
    description: Solana chain tip
  - name: Cardano · Governance
    description: >-
      Cardano on-chain governance: DReps, governance actions + votes,
      constitutional committee, constitution
  - name: Cardano · Tax
    description: >-
      On-chain events of Cardano wallets for reporting: transactions, staking
      rewards, fees and deposits, each with its amounts valued in ADA and a
      chosen currency.
  - name: Cardano · DReps
    description: >-
      Cardano delegate representatives (DReps): voting power, status, metadata,
      delegators
  - name: Cardano · Transaction Builder
    description: >-
      Cardano transaction building API. Builds unsigned transactions server-side
      for client-side signing and submission. Network can be specified in the
      request body or as a query parameter. Body takes precedence over query
      parameter.
  - name: Cardano · Assets
    description: Cardano Asset API
  - name: Solana · Transactions
    description: Solana transaction detail and submission
  - name: Midnight · Swaps
    description: Midnight peer-to-peer swaps
  - name: Solana · NFTs
    description: Solana NFT metadata
  - name: Cardano · Accounts
    description: Cardano Account API
  - name: Bitcoin · Fees
    description: Bitcoin fee-rate estimates by confirmation block target
  - name: Solana · Accounts
    description: Solana account state by address
  - name: Bitcoin · Blocks
    description: Bitcoin block lookup
  - name: Cardano · Handles
    description: ADA Handle resolution
  - name: Cardano Market Data
    description: Endpoints from cardano-market-data
  - name: Solana · Fees
    description: Solana fee estimates
  - name: Midnight · Indexer
    description: Transparent proxy to the Midnight GraphQL indexer
  - name: Cardano · Scripts
    description: Cardano script & datum API
  - name: Cardano · Epochs
    description: Cardano Epoch API - Query protocol parameters and epoch information
  - name: Bitcoin · Chain
    description: Bitcoin chain-tip and sync state
  - name: Midnight · Tokens
    description: Midnight token catalog
paths:
  /api/tax/cardano/{stakeAddress}/balances:
    get:
      tags:
        - Cardano · Tax
      summary: Balances of one wallet
      description: >-
        What a stake address held at a moment, to check a window client-side:
        the balance at the window's start plus the legs of every event in it
        (leave out REWARD_WITHDRAWAL, which only moves ADA from the reward
        account into the UTxO set) equals the balance at its end, per unit,
        counting ADA in the reward account. at is an ISO 8601 instant, an ISO
        date (the end of that day, UTC) or unix seconds; the state is after
        every block at or before it, default now. Amounts are raw units as
        integer strings. Requires a cardano-mainnet API key.
      operationId: balances
      parameters:
        - name: stakeAddress
          in: path
          description: Stake address (stake1...)
          required: true
          schema:
            type: string
        - name: at
          in: query
          description: >-
            ISO 8601 instant, ISO date (end of that day, UTC) or unix seconds;
            default now
          required: false
          schema:
            type: string
      responses:
        '200':
          description: The wallet's balances
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaxBalancesResponse'
        '400':
          description: Invalid stake address, network or at
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/TaxBalancesResponse'
        '402':
          description: 'Payment Required: the key''s plan does not carry the taxData add-on'
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/TaxBalancesResponse'
        '403':
          description: Not called with an API key
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/TaxBalancesResponse'
        '429':
          description: >-
            Too many requests in flight for this organization, or the chain
            reads are busy or slow; retry after Retry-After seconds
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/TaxBalancesResponse'
components:
  schemas:
    TaxBalancesResponse:
      type: object
      properties:
        wallet:
          type: string
        at:
          type: string
          format: date-time
        slot:
          type: integer
          format: int64
        utxo:
          type: object
          additionalProperties:
            type: string
          description: >-
            Raw units per unit (lovelace, or policy id + asset name hex), as
            integer strings
        rewardAccount:
          type: string
          description: Reward account balance in lovelace, an integer string
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      description: >-
        ### API key (programmatic access — recommended)

        Send your API key in the `X-Api-Key` header. Keys start with `nxs_` and
        are

        created in the dashboard (or via **POST /api/keys** with a session JWT).


        Each key is scoped to **one chain and one network** (for example

        `CARDANO_MAINNET`), fixed at creation time. It cannot query a different
        network

        on the same chain, and it cannot query a different chain at all. A
        mismatched

        `network` parameter returns **400 Network Mismatch**. Create one key per
        chain

        and network under the same account.


        Without the header a request answers **401** `MISSING_API_KEY`; with a
        key

        that is not valid, **401** `INVALID_API_KEY`.


        This is the credential most integrations should use.
      name: X-Api-Key
      in: header
    bearerAuth:
      type: http
      description: >-
        ### JWT session token (browser / mobile apps)

        A short-lived JWT issued by `/api/auth/login` or `/api/auth/device`,
        sent as

        `Authorization: Bearer <token>`. This is the **session** credential for
        the web

        dashboard and mobile apps, not for server-to-server API access.


        For programmatic API access use an **API key** in the `X-Api-Key` header

        instead — do **not** put an `nxs_` API key in this Bearer field: that
        answers

        **401** with `errorCode` `API_KEY_IN_AUTHORIZATION_HEADER`.
      scheme: bearer
      bearerFormat: JWT

````

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