BNB Smart Chain
Pronto para usar isso em produção?
O plano gratuito cobre projetos pessoais. O pay-as-you-go escala sem cartão de crédito.
BNB Smart Chain
O plano gratuito cobre projetos pessoais. O pay-as-you-go escala sem cartão de crédito.
TheRPC is a managed JSON-RPC gateway sitting in front of geth-equivalent BNB Smart Chain nodes. You skip running and syncing your own validator and point your app at a single authenticated URL instead. Builders shipping PancakeSwap integrations or Venus lending dashboards lean on it for the chain's roughly three-second blocks and low fees, without babysitting any infrastructure. This guide walks you from zero to a verified response. Grab a key, set the endpoint, then run one of the snippets below in curl, JavaScript, or Python. A few minutes, start to finish.
Head to TheRPC.io and create a free account. Once signed in, open the Dashboard and look for the API Keys area, where you can generate a fresh key or copy an existing one. The value is an opaque token string tied to your account and plan. You drop that token straight into the request URL. Every BNB Smart Chain call routes through https://bsc.therpc.io/YOUR_API_KEY, so the key lives in the path rather than a separate config field.
TheRPC serves many networks, each behind its own subdomain. BNB Smart Chain mainnet (chainId 56) answers at the bsc host. To configure your environment, set the endpoint variable to https://bsc.therpc.io/YOUR_API_KEY with your real key swapped in, and keep the bare token handy for any header-based clients. The testnet (chainId 97) is reachable the same way when you want to rehearse before mainnet.
The three snippets below all issue the same eth_blockNumber call so you can confirm BNB Smart Chain connectivity in whichever language you already use. There is a shell version with curl, a Node.js version, and a Python one. Pick the one that fits your stack and run it. For idiomatic clients in other languages, see the Tools & SDKs reference.
Once you move past a single block-number check, raw HTTP gets tedious. Web3 libraries handle ABI encoding, wei conversion, nonce sequencing, and BEP-20 contract calls for you, which matters when you interact with PancakeSwap routers or Venus markets. Wiring web3.js or web3.py to the BNB Smart Chain endpoint takes one line, as shown below. For the full set of language-specific setups, consult the Tools & SDKs documentation.
For the complete catalog of supported BNB Smart Chain calls, open the All Methods page. Each entry there carries a plain-language description, the exact request and response shapes, runnable code examples, and the practical use cases it fits. The catalog covers everything from eth_call against a BEP-20 token to the heavier debug_ and trace_ namespaces.
Every chain TheRPC supports has a distinct endpoint keyed by its subdomain, so switching networks is just a matter of swapping the host. For BNB Smart Chain mainnet the URL is https://bsc.therpc.io/YOUR_API_KEY; the same key works against the chainId 97 testnet host when you need a staging target.