Optimistic BNB Smart Chain(opBNB)
opBNB is a high-performance, EVM-compatible Layer 2 scaling solution for BNB Smart Chain (BSC), built on the OP Stack — the open-source rollup framework developed by the team behind Optimism. Launched in August 2023 by the BNB Chain core team, opBNB uses optimistic rollup technology to inherit BSC's security while offering sub-second block times, 4,000+ TPS throughput, and median transaction fees below $0.005. The network is fully compatible with the Ethereum JSON-RPC specification, allowing developers to port any EVM-based dApp with minimal changes.
Key Features
- OP Stack Architecture: Built on the same battle-tested optimistic rollup framework as Optimism and Base, ensuring tooling compatibility and a familiar developer experience
- Sub-Second Block Times: ~1 second L2 block production for near-instant transaction confirmations, ideal for gaming, micropayments, and high-frequency dApps
- High Throughput: 4,000+ TPS capacity with 100 MB block size — among the highest-throughput EVM chains in production
- Ultra-Low Fees: Median fees below $0.005 per transaction, with BNB Greenfield integration on the roadmap to reduce costs by an additional 5–10×
- Native Token (BNB): Gas paid in BNB (18 decimals), bridged 1:1 from BSC — no separate gas token to manage
- Full EVM Compatibility: Standard Ethereum JSON-RPC method set; deploy Solidity, Vyper, or any EVM bytecode without modification
- BSC Settlement: Settles transaction data to BNB Smart Chain as L1, inheriting BSC's validator security model
- DeFi & Gaming Focus: Optimized for high-frequency, low-value transactions — already home to 90+ dApps spanning DeFi, on-chain gaming, and SocialFi
- Optimistic Rollup Security: Fraud-proof window with 7-day challenge period; users retain L1-level security guarantees
- Ecosystem Tooling: First-class support for Hardhat, Foundry, Truffle, ethers.js, viem, and web3.py through the standard OP Stack toolchain
TECHNICAL DISCLAIMER: AUTHORITATIVE JSON-RPC SPECIFICATION
GetBlock’s opBNB API reference documentation is provided exclusively for informational purposes and to optimize the developer experience. The canonical and normative specification for the Ethereum JSON-RPC API is maintained by the Ethereum community and published at ethereum.org/en/developers/docs/apis/json-rpc/. For opBNB-specific protocol details, consensus parameters, and ecosystem tooling, consult the official documentation at docs.bnbchain.org/bnb-opbnb/.
Network Information
| Property | Value |
|---|---|
| Network Name | opBNB Mainnet |
| Chain ID | 204 |
| Native Currency | BNB |
| Decimals | 18 |
| Block Time | ~1 second |
| Consensus | Optimistic Rollup on OP Stack |
| Settlement Layer | BNB Smart Chain (BSC, Chain ID 56) |
| Smart Contract VM | EVM (Ethereum Virtual Machine) |
| EVM Compatible | Yes (fully compatible) |
| Address Format | Ethereum-style (0x…, 20 bytes) |
| Block Explorer | opbnbscan.com |
Base URL
bashhttps://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/All opBNB JSON-RPC methods are called by sending a POST request to the base URL with a standard JSON-RPC 2.0 body. There is no separate /jsonRPC path or REST GET form — the access token in the URL path handles authentication.
Supported Networks
| Network | JSON-RPC | WSS | Frankfurt, Germany | New York, USA | Singapore, Singapore |
|---|---|---|---|---|---|
| Mainnet | ✅ | ✅ | ✅ | ✅ | ✅ |
| Testnet | ✅ | ✅ | ✅ | ✅ | ✅ |
Quickstart
In this section, you will learn how to make your first call with either:
- Axios (JavaScript / Node.js)
- Python (Requests library)
Before you begin, you must have already installed npm or yarn on your local machine (for the Axios example) or Python and pip (for the Python example).
Setup project
Create and initialize a new project:
bash
mkdir opbnb-api-quickstart cd opbnb-api-quickstart npm init --yesInstall Axios
bash
npm install axiosCreate file
Create a new file named
index.js. This is where you will make your first call.Set ES module type
Set the ES module
"type": "module"in yourpackage.json.Add code
Add the following code to
index.js:index.js
javascript
import axios from 'axios'; const data = JSON.stringify({ "jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": "getblock.io" }); const config = { method: 'post', url: 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/', headers: { 'Content-Type': 'application/json' }, data: data }; axios(config) .then(response => console.log(JSON.stringify(response.data, null, 2))) .catch(error => console.log(error));Replace
<ACCESS-TOKEN>with your actual access token from GetBlock.Run the script
bash
node index.jsExpected output (example):
json
{ "jsonrpc": "2.0", "id": "getblock.io", "result": "0x893e5fa" }The
resultfield is the latest block number in hexadecimal. Convert it to decimal to read the block height.
Setup the project directory
bash
mkdir opbnb-api-quickstart cd opbnb-api-quickstartCreate and activate a virtual environment
bash
python -m venv venv source venv/bin/activate # On Windows, use venv\Scripts\activateInstall requests
bash
pip install requestsCreate script
Create a file called
main.pywith the following content:main.py
python
import requests import json url = "https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/" payload = json.dumps({ "jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": "getblock.io" }) headers = { 'Content-Type': 'application/json' } response = requests.post(url, headers=headers, data=payload) print(response.text)Replace
<ACCESS-TOKEN>with your actual access token from GetBlock.Run the script
bash
python main.py
Available API Methods
opBNB exposes the full standard Ethereum JSON-RPC method set. All methods are POST-only and called against the base URL above.
Block & Chain Information
| Method | Description |
|---|---|
| eth_blockNumber | Returns the current latest block number |
| eth_chainId | Returns the chain ID (0xcc = 204 for opBNB mainnet) |
| eth_getBlockByNumber | Returns block information by block number |
| eth_getBlockByHash | Returns block information by block hash |
| eth_getBlockTransactionCountByNumber | Returns the number of transactions in a block by block number |
| eth_getBlockTransactionCountByHash | Returns the number of transactions in a block by block hash |
| eth_getBlockReceipts | Returns all transaction receipts for a given block |
| eth_syncing | Returns sync status or false if node is fully synced |
Account & State
| Method | Description |
|---|---|
| eth_getBalance | Returns the BNB balance of an account (in wei) |
| eth_getCode | Returns the contract bytecode at a given address |
| eth_getStorageAt | Returns the value at a specific storage slot |
| eth_getProof | Returns the Merkle proof for an account and optional storage keys |
| eth_getTransactionCount | Returns the transaction count (nonce) for an account |
Transactions
| Method | Description |
|---|---|
| eth_sendRawTransaction | Broadcasts a signed transaction |
| eth_getTransactionByHash | Returns a transaction by its hash |
| eth_getTransactionByBlockHashAndIndex | Returns a transaction by block hash and index |
| eth_getTransactionByBlockNumberAndIndex | Returns a transaction by block number and index |
| eth_getTransactionReceipt | Returns the receipt for a transaction by hash |
| eth_call | Executes a read-only call against contract state |
| eth_estimateGas | Estimates gas required for a transaction |
Gas & Fee Market
| Method | Description |
|---|---|
| eth_gasPrice | Returns the current gas price |
| eth_maxPriorityFeePerGas | Returns the suggested max priority fee per gas (EIP-1559) |
| eth_feeHistory | Returns historical base fees and priority fees |
Logs & Filters
| Method | Description |
|---|---|
| eth_getLogs | Returns logs matching a given filter |
| eth_newFilter | Creates a new log filter |
| eth_newBlockFilter | Creates a filter that fires on new blocks |
| eth_newPendingTransactionFilter | Creates a filter that fires on new pending transactions |
| eth_getFilterChanges | Polls a filter for new events since the last poll |
| eth_getFilterLogs | Returns all logs matching a filter |
| eth_uninstallFilter | Uninstalls a filter |
WebSocket Subscriptions
| Method | Description |
|---|---|
| eth_subscribe | Subscribes to events (newHeads, logs, newPendingTransactions) |
| eth_unsubscribe | Cancels an existing subscription |
Network & Client Info
| Method | Description |
|---|---|
| net_version | Returns the network ID (204 for opBNB mainnet) |
| net_listening | Returns true if the client is actively listening for connections |
| net_peerCount | Returns the number of peers connected to the node |
| web3_clientVersion | Returns the client software version |
| web3_sha3 | Returns the Keccak-256 hash of the given data |
Support
For technical support and questions:
- Support Email: support@getblock.io