On-chain RPC · JSON-RPC, Archive, WebSocket
BNB Smart Chain (BSC) RPC
BNB Smart Chain JSON-RPC: EVM reads, contract calls, archive history, logs and WebSocket RPC.
| property | value |
|---|---|
| HTTP JSON-RPC | POST https://openapihub.dev/rpc/bsc |
| WebSocket RPC | wss://openapihub.dev/ws/rpc/bsc |
| Canonical / Alias | bsc / bsc |
| Chain ID | 56 |
| Family / Transport | evm / json-rpc |
| Archive routing | Yes (historical reads route to archive nodes first) |
| JSON-RPC batch | Read-only arrays of 1..20 calls on HTTP POST (max 2 eth_getLogs; empty/>20 refused -32600; write methods refused as a whole -32015) |
| Free key limits | 80 requests per second per key, bursts up to 160, 60 requests in flight. |
First request
curl -sS -X POST "https://openapihub.dev/rpc/bsc" \
-H "X-Hub-Key: $API_HUB_KEY" -H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}'
Balance & archive read example
Pass a hex block number instead of latest for historical archive queries:
curl -sS -X POST "https://openapihub.dev/rpc/bsc" \
-H "X-Hub-Key: $API_HUB_KEY" -H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":2,"method":"eth_getBalance","params":["0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045","latest"]}'
WebSocket RPC
Subscribe to live events on wss://openapihub.dev/ws/rpc/bsc (read-only allowlisted subscriptions only):
wscat -H "X-Hub-Key: $API_HUB_KEY" -c "wss://openapihub.dev/ws/rpc/bsc" \
-x '{"jsonrpc":"2.0","id":1,"method":"eth_subscribe","params":["newHeads"]}'
Allowlisted read methods (31)
eth_blockNumber, eth_call, eth_chainId, eth_estimateGas, eth_feeHistory, eth_gasPrice, eth_getBalance, eth_getBlockByHash, eth_getBlockByNumber, eth_getBlockReceipts, eth_getBlockTransactionCountByHash, eth_getBlockTransactionCountByNumber, eth_getCode, eth_getLogs, eth_getStorageAt, eth_getTransactionByBlockHashAndIndex, eth_getTransactionByBlockNumberAndIndex, eth_getTransactionByHash, eth_getTransactionCount, eth_getTransactionReceipt, eth_getUncleByBlockHashAndIndex, eth_getUncleByBlockNumberAndIndex, eth_getUncleCountByBlockHashAndIndex, eth_getUncleCountByBlockNumberAndIndex, eth_maxPriorityFeePerGas, eth_syncing, net_listening, net_peerCount, net_version, web3_clientVersion, web3_sha3
FAQ
What is the BNB Smart Chain (BSC) RPC endpoint URL?
Send JSON-RPC 2.0 POST requests to https://openapihub.dev/rpc/bsc with your key in the X-Hub-Key header.
What are the rate limits for BNB Smart Chain (BSC) RPC?
Every free key includes 80 requests per second sustained, bursts up to 160, and 60 concurrent in-flight requests.
Does BNB Smart Chain (BSC) support archive reads or WebSocket RPC?
BNB Smart Chain (BSC) supports historical archive routing and live WebSocket RPC at wss://openapihub.dev/ws/rpc/bsc.
More networks: Ethereum · Base · Arbitrum One · Optimism · Polygon PoS · Avalanche C-Chain · Solana · HyperEVM (Hyperliquid) · Linea · zkSync Era · TON · Bitcoin · Sui · Celestia (Cosmos SDK) · Aptos · TRON · Scroll · NEAR · Gnosis Chain · All 153 chains