Logo
新用户订阅 RPC,首月享 6.5 折优惠查看优惠
RPC Assistant

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

摘要

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.

关键要点

  • 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.

标准检查内容为什么重要
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.

标准检查内容为什么重要
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.
标准检查内容为什么重要
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.

常见问题

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 知识库

相关 RPC 内容

网络 RPCpeaq

什么是 peaq RPC,如何连接到 peaq 网络?

# 什么是 peaq RPC,如何连接到 peaq 网络? peaq 是一个基于 Polkadot 的 Layer-1 区块链,专为去中心化物理基础设施网络(DePIN)和机器经济而设计。要与 peaq 交互,开发者和用户需要一个 RPC(远程过程调用)端点。本指南涵盖 peaq RPC 端点、如何...

网络 RPCpeaq

什么是 peaq 网络 RPC?如何连接?

peaq 网络 RPC 是您的应用程序与 peaq 区块链之间的 API 网关,peaq 是一个兼容 EVM 的 Layer-1,专为 DePIN 和机器经济而设计。本参考涵盖链 ID 3338、PEAQ 代币详情、公共端点、JSON-RPC 测试以及生产前需要关注的提供商标准。 公共 peaq R...

网络 RPCAbstract

Abstract RPC 端点:链设置、提供商和开发者工作流

Abstract 是基于 zkSync 的 ZK Stack 构建的以太坊 Layer 2 ZK-rollup,专为消费者加密应用设计。本文涵盖 Abstract RPC 端点、链设置、提供商选择标准以及实用代码示例,帮助您连接并构建在 Abstract 主网和测试网上。...

RPC 提供商选择Solana

有哪些可靠的服务提供用于Solana质押的API访问?

可靠的Solana质押API服务提供编程访问,用于在Solana网络上进行质押、解除质押和管理奖励。顶级选项包括Blockdaemon Staking API、Helius Staking API和Figment Staking API。选择提供商时,评估正常运行时间保证、支持的操作、用于实时更新的...

RPC 提供商选择Ethereum

什么是以太坊RPC节点,如何选择?

以太坊RPC节点是暴露JSON-RPC API的服务器,允许应用程序读取区块链数据并发送交易。选择正确的节点——无论是自托管、共享还是专用——取决于您的吞吐量、可靠性和成本需求。本指南涵盖以太坊RPC节点的工作原理、关键评估标准以及入门实践步骤。...

RPC 提供商选择Sui

Sui gRPC 提供商:公共、托管与专用 RPC 对比

Sui gRPC 提供商为应用提供了通往 Sui 数据的类型化、流式路径,但访问模式差异显著。公共 Foundation gRPC 端点可能适合原型和低流量工具;在依赖它们之前,请评估当前的限制、支持和生产条款。托管 gRPC 提供商运营共享端点,具备文档化的容量、监控和支持,使其成为 dApp、索...

永远不用担心基础设施

OnFinality 消除了 DevOps 的繁重工作,让您能够更聪明、更快地构建。

开始