Logo
New RPC users get 35% off their first monthView the offer
RPC Assistant

BNB Testnet RPC: Endpoint, Chain ID, Faucet & Wallet Setup

Summary

BNB Smart Chain Testnet (BSC Testnet) uses chain ID 97 (0x61) and tBNB as gas. For light testing, you can use the official public endpoint https://bsc-testnet-dataseed.bnbchain.org (and other official dataseed endpoints), but those are rate-limited to 10,000 requests per 5 minutes and may disable eth_getLogs. OnFinality provides a public BNB testnet RPC at https://bnb-testnet.api.onfinality.io/public with EVM-compatible HTTPS and WebSocket support, archive data, and trace/API access for developers who need more consistent test infrastructure. To start, request tBNB from the BNB faucet, add the network to MetaMask with the correct settings, and verify connectivity with eth_chainId or eth_blockNumber. Keep the testnet endpoint separate from mainnet (chain ID 56 / 0x38). If you encounter 429 rate-limit errors or wrong-network rejections, switch to a private endpoint or recheck the chain ID. For contract deployment and CI/CD workflows, refer to the BNB Smart Chain Testnet Developer Guide.

Key Takeaways

  • Use chain ID 97 (0x61) for BNB Smart Chain Testnet; never mainnet 56 (0x38).
  • The OnFinality public testnet endpoint is https://bnb-testnet.api.onfinality.io/public; official public endpoints are rate-limited.
  • Always verify eth_chainId and request tBNB from a faucet before deploying.
  • For CI/CD, contract testing, or historical state, use a private endpoint with archive and trace support.

BNB Testnet RPC Decision Checklist

Before connecting an app or CI/CD pipeline to BNB Smart Chain Testnet, verify the network parameters and provider capabilities. This checklist keeps testnet work isolated from mainnet and avoids wasted debugging time.

CriterionWhat to checkWhy it matters
Chain IDMust be 97 (0x61) in every wallet, config file, and transaction.Using mainnet chain ID 56 (0x38) causes rejections or accidental mainnet sends.
Endpoint typePublic vs. private/dedicated endpoint and whether rate limits match your workload.Public endpoints often throttle at 10K/5min, which can stall CI/CD runs.
Faucet accessCan you reliably receive tBNB for the addresses you test with?Without gas tokens, contract deployment and transactions fail.
Logs and archiveDoes the endpoint support eth_getLogs and historical state queries?Some official public endpoints disable eth_getLogs; archive data is required for old-state analysis.
WebSocket supportIs a wss:// endpoint available for subscriptions?Real-time event monitoring needs a stable WebSocket connection.

Chain ID and Network Parameters

BNB Smart Chain Testnet is an EVM-compatible test network that mirrors BSC mainnet. It uses tBNB for gas and has its own chain ID to separate it from mainnet and other BNB ecosystem networks.

Current Public and OnFinality Testnet Endpoints

For quick experiments, BNB Chain maintains public RPC endpoints. The official documentation lists testnet endpoints such as https://bsc-testnet-dataseed.bnbchain.org and related dataseed addresses. These public endpoints are rate-limited and may restrict certain methods. OnFinality offers a public BNB testnet endpoint with EVM-compatible HTTPS and WebSocket support, archive data, and trace/API access.

CriterionWhat to checkWhy it matters
Official publichttps://bsc-testnet-dataseed.bnbchain.orgFree, rate-limited, may disable eth_getLogs on some endpoints.
OnFinality publichttps://bnb-testnet.api.onfinality.io/publicProvided as part of OnFinality multi-chain RPC; supports HTTPS and WebSocket, archive, trace/API.

Adding BNB Testnet to MetaMask or Wallet

Most EVM wallets accept custom network configurations. Use the values below to add BNB Smart Chain Testnet manually, or use a network aggregator with the chain ID 97.

Requesting tBNB from a Faucet

tBNB is required for gas on the testnet. Use the official BNB Chain faucet or a trusted alternative. Most faucets require a wallet address and may have daily cooldowns or social verification.

  • Official BNB Chain Faucet: https://www.bnbchain.org/en/testnet-faucet (0.3 tBNB per request with cooldown)
  • Alternative faucets like Chainlink or QuickNode may provide additional tBNB; check current availability.
  • If you need larger amounts for CI/CD, consider requesting from multiple faucets or contacting BNB Chain support.

Verify the Endpoint with curl and eth_chainId

After configuring the network, confirm that your endpoint returns the expected chain ID and current block number. Use standard JSON-RPC calls.

  • Call eth_chainId to verify 0x61: curl -X POST https://bnb-testnet.api.onfinality.io/public -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}'
  • Call eth_blockNumber to check sync status: curl -X POST https://bnb-testnet.api.onfinality.io/public -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
  • If the response chain ID is 0x38, you are connected to mainnet; correct the RPC URL.

Public Endpoint Limitations and Troubleshooting

Official public endpoints are convenient but come with constraints. Understand these before relying on them for automated testing.

  • Rate limits: Official BNB Chain public endpoints are limited to 10,000 requests per 5 minutes. Exceeding this may return HTTP 429.
  • eth_getLogs: Some official public endpoints disable eth_getLogs to reduce load. Use a provider that supports it or switch to WebSocket subscriptions.
  • Wrong network: If a transaction is rejected with a chain ID mismatch, verify that your wallet/dApp uses 97 (0x61), not 56 (0x38).
  • 429 Too Many Requests: Reduce request frequency, implement backoff, or move to a private endpoint with higher limits.
CriterionWhat to checkWhy it matters
SymptomHTTP 429 Too Many RequestsRate limit exceeded; backoff or upgrade endpoint.
Symptometh_getLogs returns error or emptyMethod disabled on some official public endpoints; use provider with log support.
SymptomTransaction rejected with invalid chain IDWallet or app configured for mainnet (56); update to 97.

When to Use a Dedicated or Private Testnet RPC

For continuous integration, load testing, or dApps that need historical state or trace calls, a shared public endpoint may be insufficient. OnFinality offers dedicated testnet RPC access with higher limits, archive data, and WebSocket support. Use placeholders for private endpoints and keep credentials out of code repositories.

  • Create a private endpoint under /networks/bnb-testnet and use an API key placeholder like YOUR_API_KEY.
  • Do not hardcode private endpoints or API keys in client-side code.
  • For contract deployment and CI/CD automation, a private endpoint reduces flakiness from public rate limits.

Developer Guide for Contracts and CI/CD

Once the endpoint is working, move from connection testing to contract workflows. The BNB Smart Chain Testnet Developer Guide covers deployment, testing, and CI/CD integration in more detail.

Frequently Asked Questions

What is the BNB testnet chain ID?

The BNB Smart Chain Testnet chain ID is 97 (0x61 in hexadecimal). Mainnet uses 56 (0x38).

How do I get tBNB for testing?

Use the official BNB Chain faucet at https://www.bnbchain.org/en/testnet-faucet, or trusted third-party faucets. Most have daily limits and may require social verification.

Can I use the same RPC endpoint for mainnet and testnet?

No. Mainnet and testnet require different endpoints and chain IDs. Using the wrong endpoint will fail or connect to the wrong network.

Does OnFinality support WebSocket and archive data for BNB testnet?

Yes, according to OnFinality's network configuration, the service provides EVM-compatible HTTPS and WebSocket RPC, archive support, and trace/API access for BNB Smart Chain. See /networks/bnb-testnet.

Why am I getting 429 Too Many Requests?

You may have exceeded the rate limit of a public endpoint. Implement backoff, reduce request frequency, or switch to a private endpoint with higher limits.

RPC Knowledge Base

Related RPC details

Never Worry about Infrastructure Again

OnFinality takes away the heavy lifting of DevOps so you can build smarter and faster.

Get Started