{"id":156,"date":"2026-08-18T02:05:01","date_gmt":"2026-08-18T02:05:01","guid":{"rendered":"https:\/\/avax.to\/avxto\/?p=156"},"modified":"2026-08-18T02:05:01","modified_gmt":"2026-08-18T02:05:01","slug":"bnb-etherscan","status":"publish","type":"post","link":"https:\/\/avax.to\/avxto\/bnb-etherscan\/","title":{"rendered":"How to configure BNB chain on AVXTO Wallet"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">AVXTO Wallet requires an Etherscan API key in order to enable BNB chain access. This is because AVXTO is a thin wallet, not a full node, so we need to load block and transaction data from an indexing service. Etherscan is one of the largest providers of indexing APIs for several chains. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this article we&#8217;ll create an Etherscan API key and configure it in AVXTO Wallet.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Etherscan is the most widely used block explorer for the Ethereum network, offering a REST API that lets developers, wallets, and applications query blockchain data programmatically \u2014 balances, transaction history, token transfers, gas prices, contract source code, and more. To use this API, you need an API key. This guide walks through why you need one, how to create it, how to configure it securely, and how to use it to power wallet-style functionality.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">1. Why You Need an Etherscan API Key<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Etherscan&#8217;s API is free to use for most endpoints, but it still requires authentication via an API key for several reasons:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Rate limiting<\/strong>: Keys let Etherscan enforce fair usage limits (typically 5 calls\/second and 100,000 calls\/day on the free tier) instead of blocking access entirely.<\/li>\n\n\n\n<li><strong>Abuse prevention<\/strong>: Keys tie usage to an identifiable account, discouraging scraping and denial-of-service behavior.<\/li>\n\n\n\n<li><strong>Analytics and support<\/strong>: Etherscan can track usage patterns per key, which helps with debugging and support requests.<\/li>\n\n\n\n<li><strong>Access to premium features<\/strong>: Some advanced endpoints (higher throughput, additional data) are unlocked through paid tiers tied to your key.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Without a valid key, most API requests will fail or return an error indicating a missing or invalid API key.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">2. Creating an Etherscan Account and API Key<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Register an Account<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Go to <a href=\"https:\/\/etherscan.io\/register\">https:\/\/etherscan.io\/register<\/a>.<\/li>\n\n\n\n<li>Enter a username, email address, and password.<\/li>\n\n\n\n<li>Verify your email address via the confirmation link Etherscan sends you.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Log In and Navigate to the API Keys Page<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Log in at <a href=\"https:\/\/etherscan.io\/login\">https:\/\/etherscan.io\/login<\/a>.<\/li>\n\n\n\n<li>Click your username in the top-right corner, then select <strong>&#8220;API Keys&#8221;<\/strong> from the dropdown menu (or go directly to <a href=\"https:\/\/etherscan.io\/myapikey\">https:\/\/etherscan.io\/myapikey<\/a>).<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Generate a New API Key<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Click <strong>&#8220;+ Add&#8221;<\/strong>.<\/li>\n\n\n\n<li>Give the key an identifiable label (e.g., <code>my-wallet-app-prod<\/code>, <code>portfolio-tracker-dev<\/code>). Use descriptive names if you plan to create multiple keys for different apps or environments.<\/li>\n\n\n\n<li>Click <strong>&#8220;Create New API Key&#8221;<\/strong>.<\/li>\n\n\n\n<li>Your key will appear in the table as a long alphanumeric string. Copy it and store it somewhere safe \u2014 you will not need to re-generate it unless it&#8217;s compromised, but you should avoid pasting it into public places.<\/li>\n<\/ol>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\"><strong>Tip:<\/strong> Create separate keys for development and production environments. This makes it easy to revoke or rotate one without affecting the other.<\/p>\n<\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">3. Understanding Etherscan&#8217;s API Structure<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Etherscan&#8217;s V2 API unifies access across 50+ supported chains (Ethereum mainnet, testnets, and many EVM-compatible chains like BNB Chain, Polygon, Arbitrum, etc.) through a single endpoint and a single API key, differentiated by a <code>chainid<\/code> parameter.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Base endpoint:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>https:&#47;&#47;api.etherscan.io\/v2\/api\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">A typical request looks like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>https:&#47;&#47;api.etherscan.io\/v2\/api\n   ?chainid=1\n   &amp;module=account\n   &amp;action=balance\n   &amp;address=0xYourWalletAddressHere\n   &amp;tag=latest\n   &amp;apikey=YourApiKeyToken\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Key parameters:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>chainid<\/code> \u2014 numeric chain ID (1 = Ethereum mainnet, 56 = BNB Chain, 137 = Polygon, etc.)<\/li>\n\n\n\n<li><code>module<\/code> \u2014 API category (<code>account<\/code>, <code>contract<\/code>, <code>transaction<\/code>, <code>stats<\/code>, <code>gastracker<\/code>, etc.)<\/li>\n\n\n\n<li><code>action<\/code> \u2014 the specific method within that module (<code>balance<\/code>, <code>txlist<\/code>, <code>tokentx<\/code>, etc.)<\/li>\n\n\n\n<li><code>apikey<\/code> \u2014 your personal API key<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">4. Configuring the API Key for Wallet Use<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If you&#8217;re building or configuring a wallet application (or a script to track a wallet) that queries Etherscan, here&#8217;s how to wire the key in safely.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Store the Key as an Environment Variable<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Never hardcode your API key directly into source code, especially if that code will be committed to a public repository. Instead, use an environment variable.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>On macOS\/Linux:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>export ETHERSCAN_API_KEY=\"YourApiKeyToken\"\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>On Windows (PowerShell):<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>setx ETHERSCAN_API_KEY \"YourApiKeyToken\"\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Using a <code>.env<\/code> file (common for Node.js\/Python projects):<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ETHERSCAN_API_KEY=YourApiKeyToken\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then add <code>.env<\/code> to your <code>.gitignore<\/code> file so it&#8217;s never committed to version control.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Load the Key in Your Application<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Node.js example (using <code>dotenv<\/code> and <code>axios<\/code>):<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>require('dotenv').config();\nconst axios = require('axios');\n\nconst API_KEY = process.env.ETHERSCAN_API_KEY;\nconst walletAddress = '0xYourWalletAddressHere';\n\nasync function getWalletBalance() {\n  const url = `https:\/\/api.etherscan.io\/v2\/api?chainid=1&amp;module=account&amp;action=balance&amp;address=${walletAddress}&amp;tag=latest&amp;apikey=${API_KEY}`;\n  const response = await axios.get(url);\n  const balanceInWei = response.data.result;\n  const balanceInEth = balanceInWei \/ 1e18;\n  console.log(`Balance: ${balanceInEth} ETH`);\n}\n\ngetWalletBalance();\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Python example (using <code>python-dotenv<\/code> and <code>requests<\/code>):<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import os\nimport requests\nfrom dotenv import load_dotenv\n\nload_dotenv()\n\nAPI_KEY = os.getenv(\"ETHERSCAN_API_KEY\")\nwallet_address = \"0xYourWalletAddressHere\"\n\nurl = \"https:\/\/api.etherscan.io\/v2\/api\"\nparams = {\n    \"chainid\": 1,\n    \"module\": \"account\",\n    \"action\": \"balance\",\n    \"address\": wallet_address,\n    \"tag\": \"latest\",\n    \"apikey\": API_KEY,\n}\n\nresponse = requests.get(url, params=params)\ndata = response.json()\nbalance_eth = int(data&#91;\"result\"]) \/ 1e18\nprint(f\"Balance: {balance_eth} ETH\")\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Test the Configuration<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Run your script or application and confirm you get a valid JSON response with <code>\"status\": \"1\"<\/code> and a result field populated with data. A <code>\"status\": \"0\"<\/code> response usually means an invalid key, malformed request, or rate limit issue \u2014 check the <code>\"message\"<\/code> field for details.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">5. Common Wallet-Related API Calls<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Once your key is configured, here are some of the most useful endpoints for wallet functionality:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Purpose<\/th><th>Module\/Action<\/th><th>Example Use<\/th><\/tr><\/thead><tbody><tr><td>Get ETH balance<\/td><td><code>account<\/code> \/ <code>balance<\/code><\/td><td>Show wallet&#8217;s native token balance<\/td><\/tr><tr><td>Get balances for multiple addresses<\/td><td><code>account<\/code> \/ <code>balancemulti<\/code><\/td><td>Portfolio dashboards<\/td><\/tr><tr><td>Get normal transaction history<\/td><td><code>account<\/code> \/ <code>txlist<\/code><\/td><td>Transaction history view<\/td><\/tr><tr><td>Get internal transactions<\/td><td><code>account<\/code> \/ <code>txlistinternal<\/code><\/td><td>Contract-triggered transfers<\/td><\/tr><tr><td>Get ERC-20 token transfers<\/td><td><code>account<\/code> \/ <code>tokentx<\/code><\/td><td>Token activity feed<\/td><\/tr><tr><td>Get ERC-721\/1155 transfers<\/td><td><code>account<\/code> \/ <code>tokennfttx<\/code> \/ <code>token1155tx<\/code><\/td><td>NFT activity feed<\/td><\/tr><tr><td>Get current gas prices<\/td><td><code>gastracker<\/code> \/ <code>gasoracle<\/code><\/td><td>Gas fee estimator<\/td><\/tr><tr><td>Get contract ABI<\/td><td><code>contract<\/code> \/ <code>getabi<\/code><\/td><td>Interact with smart contracts<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">6. Security Best Practices<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Never expose your key in frontend\/client-side code.<\/strong> If a wallet app runs in the browser, route Etherscan requests through your own backend server so the key stays server-side.<\/li>\n\n\n\n<li><strong>Restrict key usage where possible.<\/strong> Use separate keys per app\/environment so you can revoke one without disrupting others.<\/li>\n\n\n\n<li><strong>Rotate keys periodically<\/strong>, especially if you suspect a leak (e.g., accidentally committed to a public GitHub repo).<\/li>\n\n\n\n<li><strong>Monitor usage<\/strong> via the Etherscan API Keys dashboard to catch unexpected spikes that might indicate misuse.<\/li>\n\n\n\n<li><strong>Respect rate limits.<\/strong> Implement request throttling or caching in your wallet app to avoid hitting the 5 calls\/second cap, especially when polling balances or transaction history repeatedly.<\/li>\n\n\n\n<li><strong>Handle errors gracefully.<\/strong> Build retry logic with backoff for rate-limit errors (<code>status: 0<\/code>, <code>message: \"NOTOK\"<\/code>) rather than hammering the API.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">7. Troubleshooting Common Issues<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Problem<\/th><th>Likely Cause<\/th><th>Fix<\/th><\/tr><\/thead><tbody><tr><td><code>\"Invalid API Key\"<\/code><\/td><td>Key mistyped, expired, or not yet propagated<\/td><td>Double-check the key string; wait a few minutes after creation<\/td><\/tr><tr><td><code>\"Max rate limit reached\"<\/code><\/td><td>Too many requests per second<\/td><td>Add delay\/throttling between calls<\/td><\/tr><tr><td>Empty <code>result<\/code> array<\/td><td>Wrong chain ID or address with no activity<\/td><td>Confirm <code>chainid<\/code> matches the network you intend to query<\/td><\/tr><tr><td><code>403<\/code>\/<code>CORS<\/code> errors in browser<\/td><td>Client-side call exposing key<\/td><td>Proxy the request through a backend<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Configuring your API Key on AVXTO Wallet<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Now it&#8217;s time to add your Etherscan key to AVXTO Wallet so it can load BNB data from Etherscan.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Wait for the banner to warn you that BNB chain could not be loaded. Find the add key link after the message:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"172\" src=\"https:\/\/avax.to\/avxto\/wp-content\/uploads\/2026\/08\/image-6.png\" alt=\"\" class=\"wp-image-158\" srcset=\"https:\/\/avax.to\/avxto\/wp-content\/uploads\/2026\/08\/image-6.png 750w, https:\/\/avax.to\/avxto\/wp-content\/uploads\/2026\/08\/image-6-300x69.png 300w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Enter the key and click Save. You should now be good to go!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Configuring an Etherscan API key is a quick but essential step for any wallet, dashboard, or tool that needs to read on-chain data. The process boils down to three steps: create an account and generate a key, store that key securely as an environment variable rather than hardcoding it, and use it in your API requests with the correct chain ID and endpoint parameters. Following the security practices above \u2014 especially keeping the key server-side and out of version control \u2014 will keep your application and its users safe as you build out wallet functionality on top of Etherscan&#8217;s data.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>AVXTO Wallet requires an Etherscan API key in order to enable BNB chain access. This is because AVXTO is a thin wallet, not a full node, so we need to load block and transaction data from an indexing service. Etherscan is one of the largest providers of indexing APIs for several chains. In this article [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-156","post","type-post","status-publish","format-standard","hentry","category-main"],"_links":{"self":[{"href":"https:\/\/avax.to\/avxto\/wp-json\/wp\/v2\/posts\/156","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/avax.to\/avxto\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/avax.to\/avxto\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/avax.to\/avxto\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/avax.to\/avxto\/wp-json\/wp\/v2\/comments?post=156"}],"version-history":[{"count":2,"href":"https:\/\/avax.to\/avxto\/wp-json\/wp\/v2\/posts\/156\/revisions"}],"predecessor-version":[{"id":159,"href":"https:\/\/avax.to\/avxto\/wp-json\/wp\/v2\/posts\/156\/revisions\/159"}],"wp:attachment":[{"href":"https:\/\/avax.to\/avxto\/wp-json\/wp\/v2\/media?parent=156"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/avax.to\/avxto\/wp-json\/wp\/v2\/categories?post=156"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/avax.to\/avxto\/wp-json\/wp\/v2\/tags?post=156"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}