Optimistic BNB Smart Chain(opBNB)
opBNB API Reference for efficient interaction with opBNB nodes, enabling scalable, low-cost transactions and fast finality through Layer 2 solutions on the BSC blockchain.
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
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
Base URL
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
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).
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
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
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
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
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
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
eth_subscribe
Subscribes to events (newHeads, logs, newPendingTransactions)
eth_unsubscribe
Cancels an existing subscription
Network & Client Info
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
See Also
Last updated
Was this helpful?