---
updatedAt: 2025-02-19T23:29:20.000Z
agentTools:
  projectIndex: https://api-docs.ankr.com/llms.txt
---

# ankr_getAccountBalanceHistorical

Retrieves the historical balance of the specified account.

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Ankr Advanced API",
    "version": ""
  },
  "servers": [
    {
      "url": "https://rpc.ankr.com/multichain/79258ce7f7ee046decc3b5292a24eb4bf7c910d7e39b691384c7ce0cfb839a01"
    }
  ],
  "tags": [
    {
      "name": "Early Access"
    }
  ],
  "paths": {
    "/?ankr_getAccountBalanceHistorical": {
      "post": {
        "tags": [
          "Early Access"
        ],
        "summary": "ankr_getAccountBalanceHistorical",
        "description": "Retrieves the historical balance of the specified account.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "id",
                  "jsonrpc",
                  "method",
                  "params"
                ],
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  },
                  "jsonrpc": {
                    "enum": [
                      "2.0"
                    ],
                    "type": "string"
                  },
                  "method": {
                    "enum": [
                      "ankr_getAccountBalanceHistorical"
                    ],
                    "type": "string"
                  },
                  "params": {
                    "required": [
                      "walletAddress"
                    ],
                    "type": "object",
                    "properties": {
                      "blockHeight": {
                        "minimum": 0,
                        "type": "integer",
                        "description": "Height of the block to get balance from. Latest block if 0."
                      },
                      "blockchain": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Name of the blockchain or list of blockchain names. Single: eth. Multiple: [arbitrum, avalanche, base, bsc, eth, fantom, flare, gnosis, linea, optimism, polygon, polygon_zkevm, rollux, scroll, syscoin, avalanche_fuji, eth_goerli, optimism_testnet, polygon_mumbai]. All chains: empty value."
                      },
                      "nativeFirst": {
                        "type": "boolean",
                        "description": "Sorting order. Native network token first (true) or not (false)."
                      },
                      "onlyWhitelisted": {
                        "type": "boolean",
                        "description": "Filtering. Only show tokens listed on CoinGekko (true) or all the tokens (false). Default — true."
                      },
                      "pageSize": {
                        "type": "integer",
                        "description": "Number of entries per page. int32. Max value — all, default value — all."
                      },
                      "pageToken": {
                        "type": "string",
                        "description": "Current page token for pagination."
                      },
                      "syncCheck": {
                        "type": "boolean",
                        "description": "If false, the data is returned regardless of indexer health, if true, the data is returned only when the indexer health check is positive."
                      },
                      "walletAddress": {
                        "type": "string",
                        "description": "Address to get the balance of."
                      }
                    },
                    "description": "Click on PARAM OBJECT and edit body params before clicking Try it! And set request id!"
                  }
                }
              },
              "examples": {
                "Multi Chain": {
                  "value": {
                    "id": 1,
                    "jsonrpc": "2.0",
                    "method": "ankr_getAccountBalanceHistorical",
                    "params": {
                      "blockHeight": 3020000,
                      "walletAddress": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "id",
                    "jsonrpc",
                    "result"
                  ],
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "jsonrpc": {
                      "enum": [
                        "2.0"
                      ],
                      "type": "string"
                    },
                    "result": {
                      "required": [
                        "totalBalanceUsd",
                        "totalCount",
                        "assets"
                      ],
                      "type": "object",
                      "properties": {
                        "assets": {
                          "type": "array",
                          "items": {
                            "required": [
                              "blockchain",
                              "tokenName",
                              "tokenSymbol",
                              "tokenDecimals",
                              "tokenType",
                              "holderAddress",
                              "balance",
                              "balanceRawInteger",
                              "balanceUsd",
                              "tokenPrice",
                              "thumbnail"
                            ],
                            "type": "object",
                            "properties": {
                              "balance": {
                                "type": "string",
                                "description": "Total balance of the token holder address."
                              },
                              "balanceRawInteger": {
                                "type": "string",
                                "description": "Raw balance: value*10^decimals.."
                              },
                              "balanceUsd": {
                                "type": "string",
                                "description": "Total value at the token holder address calculated by Ankr. US Dollars."
                              },
                              "blockchain": {
                                "enum": [
                                  "arbitrum",
                                  "avalanche",
                                  "avalanche_fuji",
                                  "base",
                                  "bsc",
                                  "eth",
                                  "eth_goerli",
                                  "fantom",
                                  "flare",
                                  "gnosis",
                                  "linea",
                                  "optimism",
                                  "optimism_testnet",
                                  "polygon",
                                  "polygon_mumbai",
                                  "polygon_zkevm",
                                  "rollux",
                                  "scroll",
                                  "syscoin"
                                ],
                                "type": "string",
                                "description": "Name of the blockchain."
                              },
                              "contractAddress": {
                                "type": "string",
                                "description": "Address of the token contract."
                              },
                              "holderAddress": {
                                "description": "Address of the token holder."
                              },
                              "thumbnail": {
                                "type": "string",
                                "description": "URL to the thumbnail (logo or symbol) of the token."
                              },
                              "tokenDecimals": {
                                "type": "integer",
                                "description": "Number of decimals the tokens supports."
                              },
                              "tokenName": {
                                "type": "string",
                                "description": "Name of the token."
                              },
                              "tokenPrice": {
                                "type": "string",
                                "description": "Current price of the tokens. calculated by Ankr. US Dollars."
                              },
                              "tokenSymbol": {
                                "type": "string",
                                "description": "Symbol of the token."
                              },
                              "tokenType": {
                                "type": "string",
                                "description": "Type of the token. E.g., ERC20."
                              }
                            }
                          },
                          "description": "Assets at the address.",
                          "nullable": true
                        },
                        "blockHeight": {
                          "minimum": 0,
                          "type": "integer",
                          "description": "Height of the block the balance was obtained from."
                        },
                        "nextPageToken": {
                          "type": "string",
                          "description": "Next page token for pagination."
                        },
                        "syncStatus": {
                          "type": "object",
                          "properties": {
                            "lag": {
                              "type": "string",
                              "description": "Timestamp difference between the latest block on the blockchain and on the indexer."
                            },
                            "status": {
                              "type": "string",
                              "description": "Sync status of the indexer: synced or outOfSync."
                            },
                            "timestamp": {
                              "minimum": 0,
                              "type": "integer",
                              "description": "Timestamp of latest block the indexer is at."
                            }
                          },
                          "description": "Information on the status of the queried indexer.",
                          "nullable": true
                        },
                        "totalBalanceUsd": {
                          "type": "string",
                          "description": "Total value of assets at the address calculated by Ankr. US Dollars."
                        },
                        "totalCount": {
                          "type": "integer",
                          "description": "Total number of all assets (ERC20) at the address."
                        }
                      },
                      "description": "Result of the query."
                    }
                  }
                },
                "examples": {
                  "Multi Chain": {
                    "value": {
                      "id": 1,
                      "jsonrpc": "2.0",
                      "result": {
                        "assets": [
                          {
                            "balance": "100.07440396041197651",
                            "balanceRawInteger": "100074403960411976510",
                            "balanceUsd": "0",
                            "blockchain": "eth",
                            "holderAddress": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
                            "thumbnail": "https://assets.ankr.com/charts/icon-only/eth.svg",
                            "tokenDecimals": 18,
                            "tokenName": "Ethereum",
                            "tokenPrice": "0",
                            "tokenSymbol": "ETH",
                            "tokenType": "NATIVE"
                          },
                          {
                            "balance": "0.500433803676984837",
                            "balanceRawInteger": "500433803676984837",
                            "balanceUsd": "0",
                            "blockchain": "optimism",
                            "holderAddress": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
                            "thumbnail": "https://assets.ankr.com/charts/icon-only/optimism.svg",
                            "tokenDecimals": 18,
                            "tokenName": "Optimism",
                            "tokenPrice": "0",
                            "tokenSymbol": "ETH",
                            "tokenType": "NATIVE"
                          }
                        ],
                        "blockHeight": 3020000,
                        "totalBalanceUsd": "0"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-readme": {
          "code-samples": [
            {
              "code": "import { AnkrProvider } from '@ankr.com/ankr.js';\n\nconst provider = new AnkrProvider();\nconst balances = async () => {\n  return await provider.getAccountBalance({\n    blockchain: 'eth',\n    walletAddress: '0xfa9019df60d3c710d7d583b2d69e18d412257617',\n  });\n};balances().then((reply) => {\n  console.log(reply)\n})",
              "install": "npm install @ankr.com/ankr.js",
              "language": "node",
              "name": "Request via Ankr.js SDK"
            }
          ]
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```