Recurring card billing is here. Subscribe once and you're covered every month

Get started
Spectrum Nodes

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

Featured image for: BNB Smart Chain Chain ID and RPC Endpoint: How to Connect to BSC
Share

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.

SettingBSC mainnetBSC testnet
Chain ID (decimal)5697
Chain ID (hex, as eth_chainId returns it)0x380x61
Currency symbolBNBtBNB
Native decimals1818
Public HTTPS RPC (BNB Chain)https://bsc-dataseed.bnbchain.orghttps://bsc-testnet-dataseed.bnbchain.org
Second BNB Chain endpointhttps://bsc-dataseed-public.bnbchain.orghttps://bsc-testnet.bnbchain.org
Public rate limit10,000 requests per 5 minutes10,000 requests per 5 minutes
eth_getLogs on public endpointsDisabledRefused in our test
Public WebSocketNone listedNone listed
Block explorerhttps://bscscan.comhttps://testnet.bscscan.com
Block time0.45 seconds0.45 seconds
FinalityAbout 0.65 secondsNot stated
FaucetNonehttps://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.

  1. 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.
  2. Open Nodes, click Create Endpoint, and pick BSC, then Mainnet or Testnet.
  3. 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.
  4. Copy the HTTPS and WebSocket URLs for the region closest to your servers.
  5. Save them as BSC_RPC_URL and BSC_WSS_URL in 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.

  1. In the MetaMask extension, open the menu at the top right and select "Networks".
  2. Scroll to "Additional networks" and click "Add" next to BNB Chain.
  3. 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:

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_getLogs is 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_traceBlockByNumber returned "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 getBSC mainnetBSC testnet
HTTPS and WebSocket URLs per regionYesYes
Debug and trace methodsYesYes
Archive dataYesYes
On the Free planYesYes
Reth client optionYes, with tracing, not on the Free planYes, 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 NodesAlchemy
Median, Finland server82 ms707 ms
p95 (slowest 5%), Finland server237 ms2,182 ms
Median, Canada server186 ms295 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 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 removedSpectrumAlchemyAnkr
eth_blockNumber364
eth_getBlockByNumber (latest)5768
eth_call (latest)4714
eth_getBalance (latest)576

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 the US and Europe, 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.

Start Now: https://dashboard.spectrumnodes.com/auth/signup