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

# Get Wallet Balance Historical

> Get an EVM wallet’s balances at a past moment

> [!WARNING]
>
> This endpoint is only available for OpenApi users with paid subscription.

> [!NOTE]
>
> **200** credits per request

> [accordion] Multipliers
>
> \[!NOTE] In **Query** field **"connectionId"**: credits are multiplied by the number of values.\[!NOTE] If the value of **"connectionId"** in **Query** is **"all"**, multiplier is **2000** credits.\[!NOTE] In **Query** field **"blockchain"**: credits are multiplied by the number of values.\[!NOTE] If the value of **"blockchain"** in **Query** is **"all"**, multiplier is **2000** credits.\[!WARNING] Multipliers can be applied multiple times.\[!NOTE] [**Detailed multipliers explanation**](https://coinstats.app/api-docs/multipliers)

***

> [accordion] Details
>
> * Token and native balances as they were at the given timestamp, on one EVM chain, a list of chains, or every EVM chain
> * Each chain is read at its last block at or before the timestamp; the block and its time are returned per chain
> * USD and BTC prices at that moment (hourly resolution for the last 7 days, daily before), each balance’s USD value, and totals per chain and overall

> [accordion] Required
>
> * address: Wallet address to query
> * timestamp: the moment, as a Unix timestamp (seconds or milliseconds) or an ISO 8601 date such as 2025-01-01 (00:00 UTC that day) or date-time such as 2025-01-01T12:00:00Z

> [accordion] Optional
>
> * One of connectionId or blockchain (if both provided, connectionId is used):
>   * Single value (e.g., "ethereum")
>   * Comma-separated values ("ethereum,base-wallet")
>   * "all" — every EVM chain (top-tier chains always included; others that take longer than 12 seconds are left out)
> * Omit both and an EVM address is queried on every EVM chain, like "all".

> [accordion] Multi-chain requests
>
> * With a list or "all", a chain without a result does not fail the request: it is left out of chains, as on /wallet/balance (for example when it did not exist yet at that moment, its node keeps no history that old, or it did not answer in time).
> * A single-chain request returns an error instead: 400 for an unsupported chain or a timestamp before the chain existed, 422 when the chain’s node keeps no history that old.

> [accordion] Notes
>
> * Only EVM chains are supported. Tokens are the ones CoinStats tracks today on each chain.
> * Costs 5x a /wallet/balance call per chain; "all" (or an EVM address on its own) costs 10 chains, and a list never costs more than "all".
> * Available on paid plans (Starter, Standard and Business); the free plan gets 403.
> * Paying per call with x402: one chain per request (a single connectionId or blockchain); several chains or "all" need an API key.


## OpenAPI

````yaml /api-docs/api-reference/openapi.json get /v1/wallet/balance/historical
openapi: 3.0.0
info:
  title: CoinStats Public API
  description: >-
    CoinStats Public API — programmatic access to market data, news, NFTs,
    wallets, exchange connections, and user portfolios. Authenticate every
    request with the `X-API-KEY` header (or an OAuth Bearer token in the
    `Authorization` header). Generate keys at https://openapi.coinstats.app.
  version: '1.0'
  contact: {}
servers:
  - url: https://api.coinstats.app
security: []
tags:
  - name: CoinStats
    description: ''
  - name: Market Data
    description: >-
      The Market Data section of the API provides endpoints to access a wide
      range of market-related information, including cryptocurrency coins,
      ticker data, and fiat currency rates. This category offers comprehensive
      data to help users monitor and analyze the cryptocurrency market, track
      prices, and gain insights into market trends
  - name: RWA
    description: >-
      Tokenized real-world assets: overview, stocks, commodities, ETFs, tokens,
      trading markets, and aggregate or per-asset history.
  - name: News
    description: >-
      The News section of the API allows you to access news articles and updates
      related to cryptocurrencies and the blockchain industry. It provides
      valuable information from various sources to keep you informed about the
      latest developments
  - name: NFTs
    description: >-
      The NFT section of the API provides endpoints to interact with
      Non-Fungible Tokens (NFTs), which are unique digital assets stored on a
      blockchain. These endpoints allow you to retrieve information about NFTs,
      including collections, assets, trending NFTs, and specific assets
      associated with wallet addresses.
  - name: Wallet NFTs
    description: >-
      NFTs held by a wallet: tokens, collections, value, activity and token
      gating
  - name: Wallet Ordinals
    description: Bitcoin ordinals inscriptions, runes and BRC-20 tokens held by an address
  - name: Wallet Data
    description: >-
      The Wallet section of the API provides a comprehensive set of endpoints to
      manage and interact with wallets. It enables users to retrieve wallet
      balances, monitor syncing status, fetch transaction data, and synchronize
      wallet information with the blockchain. By integrating these endpoints
      into your application, you can offer robust wallet functionality to your
      users.
  - name: Exchange Connection
    description: >-
      The Exchange Connection section of the API provides a comprehensive set of
      endpoints to manage and interact with exchanges. It enables users to
      retrieve exchange balances, monitor syncing status, fetch transaction
      data. By integrating these endpoints into your application, you can offer
      robust exchange portfolio tracking functionality to your users.
  - name: User Portfolio
    description: >-
      The Portfolio section of the API provides a comprehensive set of endpoints
      to manage and interact with Share Portfolios. It enables users to retrieve
      current Portfolio Coins and Transactions.
  - name: Usage
    description: The Usage section provides account-level API usage data.
  - name: Status
    description: The Status section provides API availability checks.
  - name: Prediction · Markets
    description: >-
      Polymarket, Kalshi and Polymarket US markets: list/trend/detail, live
      prices and order book, OHLC candles, and price history. `view` picks the
      venues a list shows (`intl` default, `us`, `all`). Prices are
      probabilities in 0..1, money is USD, dates are ISO 8601.
  - name: Prediction · Events
    description: >-
      Polymarket, Kalshi and Polymarket US events — groups of related markets
      (e.g. one market per candidate). List, trend, and fetch an event with its
      child markets.
  - name: Prediction · Traders
    description: >-
      Trader leaderboard plus deep per-trader analytics: profile, open
      positions, trade history, daily PnL, category stats, aggregate trade
      stats, and composite score.
  - name: Prediction · Analytics
    description: >-
      Platform-wide analytics: overview stats, venue volume and market share,
      smart-money and whale traders, trending-by-smart-money markets, and
      composite market signals.
  - name: Prediction · Search
    description: Full-text search across prediction-market events, markets, and traders.
paths:
  /v1/wallet/balance/historical:
    get:
      tags:
        - Wallet Data
      summary: Get an EVM wallet’s balances at a past moment
      operationId: get-wallet-balance-historical
      parameters:
        - name: address
          required: true
          in: query
          description: The EVM wallet address (or ENS name) to query
          schema:
            example: '0x742d35Cc6634C0532925a3b844Bc454e4438f44e'
            type: string
        - name: connectionId
          required: false
          in: query
          description: >-
            The identifier of connection from
            [/wallet/blockchains](/openapi/get-blockchains) call response. One
            value, a comma-separated list, or "all" for every EVM chain. If both
            connectionId and blockchain are provided, connectionId is used; if
            neither is, an EVM address is queried on every EVM chain (billed
            like "all"). Under "all", top-tier chains (ethereum,
            binacesmartchain, base-wallet, polygon-wallet, arbitrum-wallet,
            optimism-wallet, avalanche-wallet, hyperevm-wallet, monad-wallet,
            plasma-wallet) are always included; other chains that take longer
            than 12 seconds are left out, as is any chain without a result.
          schema:
            type: string
            example: ethereum
        - name: blockchain
          required: false
          in: query
          description: >-
            The blockchain network identifier from
            [/wallet/blockchains](/openapi/get-blockchains) call response. One
            value, a comma-separated list, or "all" for every EVM chain. If both
            connectionId and blockchain are provided, connectionId is used; if
            neither is, an EVM address is queried on every EVM chain (billed
            like "all"). Under "all", top-tier chains (ethereum,
            binacesmartchain, base-wallet, polygon-wallet, arbitrum-wallet,
            optimism-wallet, avalanche-wallet, hyperevm-wallet, monad-wallet,
            plasma-wallet) are always included; other chains that take longer
            than 12 seconds are left out, as is any chain without a result.
          schema:
            type: string
            example: ethereum
        - name: timestamp
          required: true
          in: query
          description: >-
            The moment to get balances for: a Unix timestamp in seconds
            (milliseconds are accepted too), or an ISO 8601 date such as
            2025-01-01 (00:00 UTC that day) or date-time such as
            2025-01-01T12:00:00Z (UTC when no offset is given). Balances are
            read at the last block at or before it.
          schema:
            example: '2025-01-01'
            type: string
      responses:
        '200':
          description: Get wallet balance at a past moment
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WalletBalanceHistoricalResponseDto'
        '400':
          description: Bad Request
          content:
            application/json:
              example:
                statusCode: 400
                message: Bad Request
                requestId: 11111111-2222-3333-4444-555555555555
                path: <requested-endpoint>
        '401':
          description: Unauthorized
          content:
            application/json:
              example:
                statusCode: 401
                message: Unauthorized
                requestId: 11111111-2222-3333-4444-555555555555
                path: <requested-endpoint>
        '403':
          description: Forbidden
          content:
            application/json:
              example:
                statusCode: 403
                message: Forbidden
                requestId: 11111111-2222-3333-4444-555555555555
                path: <requested-endpoint>
        '404':
          description: Not Found
          content:
            application/json:
              example:
                statusCode: 404
                message: Not Found
                requestId: 11111111-2222-3333-4444-555555555555
                path: <requested-endpoint>
        '409':
          description: Conflict (for some endpoints)
          content:
            application/json:
              example:
                statusCode: 409
                message: Transactions not synced
                requestId: 11111111-2222-3333-4444-555555555555
                path: <requested-endpoint>
        '429':
          description: Too Many Requests
          content:
            application/json:
              example:
                statusCode: 429
                message: Rate limit exceeded
                requestId: 11111111-2222-3333-4444-555555555555
                path: <requested-endpoint>
        '503':
          description: Service Unavailable
          content:
            application/json:
              example:
                statusCode: 503
                message: Service Unavailable. Please Contact Support
      security:
        - X-API-KEY: []
      x-codeSamples:
        - lang: curl
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.coinstats.app/v1/wallet/balance/historical?address=0x742d35Cc6634C0532925a3b844Bc454e4438f44e&timestamp=2025-01-01&blockchain=ethereum' \
              --header 'X-API-KEY: <api-key>'
        - lang: python
          label: Python
          source: >-
            import requests


            url =
            "https://api.coinstats.app/v1/wallet/balance/historical?address=0x742d35Cc6634C0532925a3b844Bc454e4438f44e&timestamp=2025-01-01&blockchain=ethereum"


            headers = {"X-API-KEY": "<api-key>"}


            response = requests.request("GET", url, headers=headers)


            print(response.json())
        - lang: javascript
          label: JavaScript
          source: >-
            const options = {method: 'GET', headers: {'X-API-KEY':
            '<api-key>'}};


            fetch('https://api.coinstats.app/v1/wallet/balance/historical?address=0x742d35Cc6634C0532925a3b844Bc454e4438f44e&timestamp=2025-01-01&blockchain=ethereum',
            options)
              .then((response) => response.json())
              .then((response) => console.log(response))
              .catch((err) => console.error(err));
        - lang: php
          label: PHP
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.coinstats.app/v1/wallet/balance/historical?address=0x742d35Cc6634C0532925a3b844Bc454e4438f44e&timestamp=2025-01-01&blockchain=ethereum",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "X-API-KEY: <api-key>"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\turl := \"https://api.coinstats.app/v1/wallet/balance/historical?address=0x742d35Cc6634C0532925a3b844Bc454e4438f44e&timestamp=2025-01-01&blockchain=ethereum\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"X-API-KEY\", \"<api-key>\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(string(body))\n}"
        - lang: java
          label: Java
          source: >-
            HttpResponse<String> response =
            Unirest.get("https://api.coinstats.app/v1/wallet/balance/historical?address=0x742d35Cc6634C0532925a3b844Bc454e4438f44e&timestamp=2025-01-01&blockchain=ethereum")
              .header("X-API-KEY", "<api-key>")
              .asString();
components:
  schemas:
    WalletBalanceHistoricalResponseDto:
      type: object
      properties:
        address:
          type: string
          description: The wallet address that was queried (ENS names resolved)
          example: '0x742d35Cc6634C0532925a3b844Bc454e4438f44e'
        timestamp:
          type: number
          description: The requested moment, as a unix timestamp in seconds
          example: 1735689600
        totalValue:
          type: number
          description: >-
            Total USD value across all chains of the balances that have a price
            at that moment
          example: 125430.12
        chains:
          description: >-
            One entry per chain with a balance read at that moment, highest
            value first. A single-chain request has one entry. With several
            chains, a chain without a result (it did not exist yet, its node
            keeps no history that old, or it did not answer in time) is left
            out, as on /wallet/balance.
          type: array
          items:
            $ref: '#/components/schemas/WalletBalanceHistoricalChainDto'
      required:
        - address
        - timestamp
        - totalValue
        - chains
    WalletBalanceHistoricalChainDto:
      type: object
      properties:
        connectionId:
          type: string
          description: The blockchain network identifier
          example: ethereum
        blockchain:
          type: string
          description: The blockchain network name
          example: ethereum
        block:
          type: number
          description: >-
            The block the balances were read at: the last block at or before the
            requested moment
          example: 21525890
        blockTimestamp:
          type: number
          description: Unix timestamp (seconds) of that block
          example: 1735689599
        totalValue:
          type: number
          description: >-
            Total USD value of this chain's balances that have a price at that
            moment
          example: 98000.5
        balances:
          description: Non-zero balances at that moment, highest value first
          example:
            - coinId: ethereum
              amount: 1.5
              name: Ethereum
              symbol: ETH
              imgUrl: https://static.coinstats.app/coins/1650455629727.png
              chain: ethereum
              price: 3353.62
              priceBtc: 0.0358
              value: 5030.43
          type: array
          items:
            $ref: '#/components/schemas/WalletBalanceHistoricalCoinDto'
      required:
        - connectionId
        - block
        - blockTimestamp
        - totalValue
        - balances
    WalletBalanceHistoricalCoinDto:
      type: object
      properties:
        coinId:
          type: string
          description: Unique identifier for the cryptocurrency
          example: ethereum
        amount:
          type: number
          description: Balance of this cryptocurrency at that moment
          example: 1.5
        name:
          type: string
          description: Full name of the cryptocurrency
          example: Ethereum
        symbol:
          type: string
          description: Trading symbol of the cryptocurrency
          example: ETH
        imgUrl:
          type: string
          description: URL of the cryptocurrency logo image
          example: https://static.coinstats.app/coins/1650455629727.png
        chain:
          type: string
          description: The blockchain network where this token exists
          example: ethereum
        decimals:
          type: number
          description: Number of decimal places for token precision
          example: 18
        contractAddress:
          type: string
          description: Smart contract address for tokens (e.g. ERC20)
          example: '0xdac17f958d2ee523a2206206994597c13d831ec7'
        price:
          type: number
          description: USD price at that time, or null when unknown
          example: 3353.62
          nullable: true
        priceBtc:
          type: number
          description: BTC price at that time, or null when unknown
          example: 0.0358
          nullable: true
        value:
          type: number
          description: amount × price in USD, or null when the price is unknown
          example: 5030.43
          nullable: true
      required:
        - coinId
        - amount
        - price
        - priceBtc
        - value
  securitySchemes:
    X-API-KEY:
      type: apiKey
      in: header
      name: X-API-KEY
      description: >-
        API key required to access the endpoints. Generate one from your
        dashboard at https://openapi.coinstats.app and pass it in the
        `X-API-KEY` request header. Never expose your key in client-side code.

````

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