BNB Smart Chain Chain ID and RPC Endpoint: How to Connect to BSC

By Daniel Chayra, Spectrum Nodes · Updated November 4, 2026 · Chain values checked November 3, 2026
Short answer: BNB Smart Chain (BSC) mainnet uses chain ID 56, which eth_chainId returns as 0x38. Gas is paid in BNB, BNB Chain's public RPC endpoint is https://bsc-dataseed.bnbchain.org, and the block explorer is https://bscscan.com. BSC testnet uses chain ID 97 at https://bsc-testnet-dataseed.bnbchain.org, with tBNB for gas. BNB Chain caps its public endpoints at 10,000 requests per 5 minutes and disables eth_getLogs on them, so production apps need a dedicated endpoint. Spectrum Nodes serves BSC mainnet and testnet with tracing and archive data, both on our Free plan. In our September to October 2026 test, Spectrum's Boosted Nodes returned BSC block traces in a median of 82 ms against 707 ms on Alchemy.
| Setting | BSC mainnet | BSC testnet |
|---|---|---|
| Chain ID (decimal) | 56 | 97 |
Chain ID (hex, as eth_chainId returns it) | 0x38 | 0x61 |
| Currency symbol | BNB | tBNB |
| Native decimals | 18 | 18 |
| Public HTTPS RPC (BNB Chain) | https://bsc-dataseed.bnbchain.org | https://bsc-testnet-dataseed.bnbchain.org |
| Second BNB Chain endpoint | https://bsc-dataseed-public.bnbchain.org | https://bsc-testnet.bnbchain.org |
| Public rate limit | 10,000 requests per 5 minutes | 10,000 requests per 5 minutes |
eth_getLogs on public endpoints | Disabled | Refused in our test |
| Public WebSocket | None listed | None listed |
| Block explorer | https://bscscan.com | https://testnet.bscscan.com |
| Block time | 0.45 seconds | 0.45 seconds |
| Finality | About 0.65 seconds | Not stated |
| Faucet | None | https://www.bnbchain.org/en/testnet-faucet |
Values from BNB Chain's JSON-RPC endpoint, wallet configuration, and faucet docs, checked November 3, 2026, with finality from BNB Chain's blog of June 16, 2026. We confirmed both chain IDs by calling eth_chainId on the public endpoints the same day, and timed blocks from their timestamps: 0.45 seconds apart on mainnet and testnet, averaged over the last 20,000 blocks.
BSC has made a block every 0.45 seconds since the Fermi hard fork on January 14, 2026, about 8,000 blocks an hour. MetaMask, viem, ethers.js, and other EVM tools connect with the values above. Two things catch people out on BSC: stablecoin decimals and the limits on the public endpoints.
Spectrum Nodes publishes this guide. The speed figures further down come from our own tests, with the method and dates next to each table.
Is BNB Chain the Same as BSC?
BNB Chain is the name of the ecosystem. BNB Smart Chain (BSC) is its EVM layer 1, chain ID 56. opBNB is a separate layer 2 with chain ID 204 (testnet 5611), so check the chain ID before you send funds. MetaMask lists BSC under the name "BNB Chain". Spectrum Nodes serves RPC on both BSC and opBNB.
Why Do USDT and USDC Show 18 Decimals on BSC?
The USDT and USDC contracts on BSC use 18 decimals, where both tokens use 6 on Ethereum and USDC uses 6 on Base. Code that hardcodes 6 shows BSC balances a trillion times too large. On November 3, 2026, decimals() returned 18 on both contracts:
- USDT:
0x55d398326f99059fF775485246999027B3197955 - USDC:
0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d
Read decimals() from each token contract and cache it per chain. Never copy the value from another chain, and convert before you compare a BSC amount with the same token elsewhere.
How Do You Get a Spectrum BSC RPC Endpoint?
Create a free Spectrum account, add a BSC endpoint in the dashboard, and copy its URL.
- Sign up at https://dashboard.spectrumnodes.com/auth/signup. BSC mainnet and testnet are on our Free plan: 10M credits a month at 25 requests per second.
- Open Nodes, click Create Endpoint, and pick BSC, then Mainnet or Testnet.
- Choose the node type. Pruned serves current and recent state. Archive serves balances and contract state at any past block, which month end reports, audits, and backfills need.
- Copy the HTTPS and WebSocket URLs for the region closest to your servers.
- Save them as
BSC_RPC_URLandBSC_WSS_URLin your environment.
Keep the URL private. The dashboard lets you limit each endpoint to your servers' IP addresses, and to your own domains through CORS for browser apps.
How Do You Add BSC to MetaMask?
MetaMask lists BSC as a supported network under the name "BNB Chain", so you add it with one click and then swap in your own RPC URL.
- In the MetaMask extension, open the menu at the top right and select "Networks".
- Scroll to "Additional networks" and click "Add" next to BNB Chain.
- To use your Spectrum URL, click the three dots next to BNB Chain, choose "Edit", open the "Default RPC URL" dropdown, click "Add RPC URL", paste your URL, and save.
MetaMask's help center notes that a custom RPC URL on BNB Smart Chain turns off Smart Transactions, including MEV protection, until you switch back to the default URL.
In any other wallet, or for the testnet, add a custom network with these fields:
- Network name: BNB Smart Chain (or BSC Testnet)
- RPC URL: your Spectrum URL, or https://bsc-dataseed.bnbchain.org (https://bsc-testnet-dataseed.bnbchain.org)
- Chain ID: 56 (97)
- Currency symbol: BNB (tBNB)
- Block explorer URL: https://bscscan.com (https://testnet.bscscan.com)
For test BNB, use BNB Chain's faucet at https://www.bnbchain.org/en/testnet-faucet. Its Discord and Telegram bot also hand out up to 0.3 tBNB a day.
How Do You Test a BSC RPC Endpoint With curl?
Send eth_chainId and eth_blockNumber. A healthy BSC mainnet endpoint returns 0x38 for the chain ID and a block number that rises about twice a second.
curl -s https://bsc-dataseed.bnbchain.org \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","id":1,"method":"eth_chainId","params":[]}' # {"jsonrpc":"2.0","id":1,"result":"0x38"} curl -s "$BSC_RPC_URL" \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}' # {"jsonrpc":"2.0","id":1,"result":"0x..."} latest block, in hex curl -s "$BSC_RPC_URL" \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","id":1,"method":"eth_getBlockByNumber","params":["finalized",false]}' # the newest finalized block
0x38 is 56 in hex, and the testnet answers 0x61. Run eth_blockNumber twice, 5 seconds apart, and the number should rise by about 11. If it stays the same, the endpoint has stopped following the chain. The finalized tag returns the newest block BSC's validators have finalized, which trails the head by about 0.65 seconds, BNB Chain's finality time. Credit deposits from that block rather than from latest.
How Do You Connect to BSC With viem or ethers.js?
viem ships BSC as a built in chain (bsc, and bscTestnet for the testnet), so you only pass your URL. Always pass it, because http() with no argument sends your requests to the default public URL in viem's chain definition, run by a third party. This snippet uses viem 2. It reads a wallet's BNB and USDT balances, takes USDT's decimals from the contract, and fetches the finalized block.
import { createPublicClient, erc20Abi, formatUnits, http } from 'viem' import { bsc } from 'viem/chains' // bscTestnet for the testnet const client = createPublicClient({ chain: bsc, transport: http(process.env.BSC_RPC_URL), // without a URL, viem calls a third party public endpoint }) const usdt = '0x55d398326f99059fF775485246999027B3197955' // USDT on BSC, 18 decimals const wallet = process.env.WALLET_ADDRESS as `0x${string}` const [bnb, usd, decimals, finalized] = await Promise.all([ client.getBalance({ address: wallet }), // 18 decimals client.readContract({ address: usdt, abi: erc20Abi, functionName: 'balanceOf', args: [wallet] }), client.readContract({ address: usdt, abi: erc20Abi, functionName: 'decimals' }), client.getBlock({ blockTag: 'finalized' }), ]) console.log(formatUnits(bnb, 18), formatUnits(usd, decimals), finalized.number)
On ethers.js 6, pin the provider to BSC so it doesn't keep sending eth_chainId to check the chain, and open a WebSocket for new blocks:
import { JsonRpcProvider, WebSocketProvider } from 'ethers' const provider = new JsonRpcProvider(process.env.BSC_RPC_URL, 56, { staticNetwork: true }) const ws = new WebSocketProvider(process.env.BSC_WSS_URL!, 56) ws.on('block', (n) => console.log('new BSC block', n))
Is the Public BSC RPC Enough for Production?
For a wallet, a testnet build, or a quick script, yes. For an app with users, no. BNB Chain's docs send anything that needs event logs to third party providers.
- Rate limit: 10,000 requests per 5 minutes on mainnet and testnet, per BNB Chain's docs. That averages about 33 requests a second.
- Event logs:
eth_getLogsis disabled on BNB Chain's public mainnet endpoints. Logs are how a wallet shows incoming tokens and how a DEX shows swaps. Our single block request on November 3, 2026 came back "limit exceeded" on mainnet and testnet. - Traces:
debug_traceBlockByNumberreturned "the resource debug_traceBlockByNumber is not available" in our test the same day. - History: A balance read at block 1,000,000 returned "missing trie node" on bsc-dataseed.bnbchain.org, so past state needs an archive endpoint.
- WebSocket: BNB Chain's docs recommend WebSockets for pulling logs but list no public WebSocket endpoint.
- Accountability: A vendor review asks for a SOC 2 report and a support contact. A public endpoint gives you neither.
What Does Spectrum Nodes Offer on BSC?
We serve RPC on BSC mainnet and testnet with tracing and archive data, plus Spectrum's Boosted Nodes and unified APIs on BSC, all from one account.
| What you get | BSC mainnet | BSC testnet |
|---|---|---|
| HTTPS and WebSocket URLs per region | Yes | Yes |
| Debug and trace methods | Yes | Yes |
| Archive data | Yes | Yes |
| On the Free plan | Yes | Yes |
| Reth client option | Yes, with tracing and archive data, every plan | Yes, with tracing and archive data |
From our supported chains page, checked November 3, 2026.
We have run two separate speed tests on BSC. They measure different things, so never compare a figure from one with a figure from the other.
BSC Block Traces: Spectrum's Boosted Nodes vs Alchemy
Spectrum's Boosted Nodes returned BSC block traces in a median of 82 ms against 707 ms on Alchemy, 8.6× faster. In the slowest 5% of requests, they took 237 ms against 2,182 ms.
BSC block traces (debug_traceBlockByNumber) | Spectrum's Boosted Nodes | Alchemy |
|---|---|---|
| Median, Finland server | 82 ms | 707 ms |
| p95 (slowest 5%), Finland server | 237 ms | 2,182 ms |
| Median, Canada server | 186 ms | 295 ms |
Spectrum's RPC monitor sent the same call to Spectrum's Boosted Nodes and Alchemy at the same instant, every cycle, from September 29 to October 14, 2026. That came to about 50,000 requests per chain and call type from a server in Finland, with a second server in Canada. Latency runs from sending the request to the last byte of the response. Spectrum's Boosted Nodes answered first on 99% of same instant requests. Alchemy was the only other provider in this test.
At BSC's pace, that gap decides whether an indexer keeps up. One worker tracing blocks in order at 707 ms clears about 5,100 blocks an hour while BSC adds 8,000. At 82 ms, it clears about 43,900.
Spectrum's Boosted Nodes are our caching and routing layer in front of our own nodes, live on BSC and not priced separately.
BSC Chain Head Calls: Spectrum vs Alchemy vs Ankr
On October 23, 2026, Spectrum's Boosted Nodes answered all four chain head calls we timed on BSC faster than Alchemy and Ankr. These are the calls behind DEX quotes and wallet screens.
| BSC call, median ms, network distance removed | Spectrum | Alchemy | Ankr |
|---|---|---|---|
eth_blockNumber | 3 | 6 | 4 |
eth_getBlockByNumber (latest) | 5 | 7 | 68 |
eth_call (latest) | 4 | 7 | 14 |
eth_getBalance (latest) | 5 | 7 | 6 |
Every provider got identical requests, one at a time and in a fresh random order, over kept alive HTTPS connections. Each provider's network round trip, measured as the time to open a TCP connection to it, was subtracted from every request, so each figure is the time the provider itself took to answer. Each figure is the median of 20 to 30 requests. Infura was not in the BSC test, and we have not tested QuickNode or Chainstack. Full results for four providers are in Spectrum vs Alchemy vs Infura vs Ankr.
Platform and Price
- Unified APIs: balances, token metadata, allowances, portfolios, NFTs, contract reads, gas, and blocks on BSC.
- Security: SOC 2 Type II attested, and we have never had a breach.
- Hardware: our own servers in Tier III data centers in Malta, the Netherlands, and Canada, plus a bare metal deployment in Singapore.
- Scale: over a billion requests a day across the platform at 99.99% uptime.
- Price: Free gives 10M credits a month at 25 requests per second. Standard calls cost 50 credits and debug traces 100, so Free covers about 200,000 standard calls a month. Starter is $1.99 a month for 14M credits at 50 requests per second, and plans run up to Enterprise at $500 for 4.2B credits at 350 requests per second. Pay by card or top up in USDC (pricing, checked November 3, 2026).
To compare providers on BSC, see our ranking of the top BSC RPC providers for 2027.
FAQ
What is the chain ID for BSC?
BNB Smart Chain mainnet uses chain ID 56, which eth_chainId returns as 0x38. BSC testnet uses chain ID 97, or 0x61 in hex.
What is the BSC RPC URL?
BNB Chain's public mainnet endpoint is https://bsc-dataseed.bnbchain.org. It allows 10,000 requests per 5 minutes and has eth_getLogs disabled, so use a provider endpoint such as Spectrum Nodes for production.
What is the BSC testnet RPC URL? BNB Chain's public testnet endpoint is https://bsc-testnet-dataseed.bnbchain.org, with chain ID 97, tBNB as gas, and blocks on https://testnet.bscscan.com. Spectrum Nodes also serves BSC testnet with tracing and archive data on the Free plan.
How do I add BNB Smart Chain to MetaMask? Open the menu, select "Networks", scroll to "Additional networks", and click "Add" next to BNB Chain. Manual entry: chain ID 56, symbol BNB, RPC https://bsc-dataseed.bnbchain.org or your provider's URL, explorer https://bscscan.com.
What is BSC's block time? BSC has made a block every 0.45 seconds since the Fermi hard fork on January 14, 2026, and finalizes blocks in about 0.65 seconds, per BNB Chain.
Why is eth_getLogs not working on BSC?
BNB Chain disables eth_getLogs on its public mainnet endpoints, and in our test they answered "limit exceeded". Use a provider endpoint that serves logs on BSC, such as Spectrum Nodes.
Is there a free RPC for BSC? Yes. BNB Chain's public endpoints are free within their rate limit, and Spectrum Nodes' Free plan covers BSC mainnet and testnet with 10M credits a month at 25 requests per second.
Does Spectrum Nodes support BSC? Yes. Spectrum Nodes serves BSC mainnet and testnet with tracing and archive data, plus Spectrum's Boosted Nodes and unified APIs on BSC.
References
All checked November 3, 2026.
- BNB Chain docs, JSON-RPC endpoint: https://docs.bnbchain.org/bnb-smart-chain/developers/json_rpc/json-rpc-endpoint/
- BNB Chain docs, Wallet configuration: https://docs.bnbchain.org/bnb-smart-chain/developers/wallet-configuration/
- BNB Chain docs, Faucet: https://docs.bnbchain.org/bnb-smart-chain/developers/faucet/
- BNB Chain docs, Fermi upgrade: https://docs.bnbchain.org/announce/fermi-bsc/
- BNB Chain docs, opBNB network information: https://docs.bnbchain.org/bnb-opbnb/get-started/network-info/
- BNB Chain blog, sub second finality (June 16, 2026): https://www.bnbchain.org/en/blog/how-bsc-achieved-sub-second-finality-a-70x-leap-from-45s-to-0-65s
- MetaMask help center, How to add a network: https://support.metamask.io/configure/networks/how-to-add-a-custom-network-rpc/
- viem chains: https://viem.sh/docs/chains/introduction
- Spectrum Nodes supported chains: https://spectrumnodes.com/networks
- Spectrum Nodes pricing: https://spectrumnodes.com/pricing
- Spectrum Nodes docs, Create your first endpoint: https://spectrumnodes.gitbook.io/docs/user-guides/create-your-first-endpoint
- Spectrum Nodes docs, Credit usage: https://spectrumnodes.gitbook.io/docs/user-guides/spectrum-credit-usage
