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

PropertyValue
Network NameopBNB Mainnet
Chain ID204
Native CurrencyBNB
Decimals18
Block Time~1 second
ConsensusOptimistic Rollup on OP Stack
Settlement LayerBNB Smart Chain (BSC, Chain ID 56)
Smart Contract VMEVM (Ethereum Virtual Machine)
EVM CompatibleYes (fully compatible)
Address FormatEthereum-style (0x…, 20 bytes)
Block Exploreropbnbscan.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

NetworkJSON-RPCWSSFrankfurt, GermanyNew York, USASingapore, 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).

  1. Setup project

    Create and initialize a new project:

    bashmkdir opbnb-api-quickstart
    cd opbnb-api-quickstart
    npm init --yes
  2. Install Axios

    bashnpm install axios
  3. Create file

    Create a new file named index.js. This is where you will make your first call.

  4. Set ES module type

    Set the ES module "type": "module" in your package.json.

  5. Add code

    Add the following code to index.js:

    index.js

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

  6. Run the script

    bashnode index.js

    Expected output (example):

    json{
        "jsonrpc": "2.0",
        "id": "getblock.io",
        "result": "0x893e5fa"
    }

    The result field is the latest block number in hexadecimal. Convert it to decimal to read the block height.

  1. Setup the project directory

    bashmkdir opbnb-api-quickstart
    cd opbnb-api-quickstart
  2. Create and activate a virtual environment

    bashpython -m venv venv
    source venv/bin/activate
    
    # On Windows, use venv\Scripts\activate
  3. Install requests

    bashpip install requests
  4. Create script

    Create a file called main.py with the following content:

    main.py

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

  5. Run the script

    bashpython 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

MethodDescription
eth_blockNumberReturns the current latest block number
eth_chainIdReturns the chain ID (0xcc = 204 for opBNB mainnet)
eth_getBlockByNumberReturns block information by block number
eth_getBlockByHashReturns block information by block hash
eth_getBlockTransactionCountByNumberReturns the number of transactions in a block by block number
eth_getBlockTransactionCountByHashReturns the number of transactions in a block by block hash
eth_getBlockReceiptsReturns all transaction receipts for a given block
eth_syncingReturns sync status or false if node is fully synced

Account & State

MethodDescription
eth_getBalanceReturns the BNB balance of an account (in wei)
eth_getCodeReturns the contract bytecode at a given address
eth_getStorageAtReturns the value at a specific storage slot
eth_getProofReturns the Merkle proof for an account and optional storage keys
eth_getTransactionCountReturns the transaction count (nonce) for an account

Transactions

MethodDescription
eth_sendRawTransactionBroadcasts a signed transaction
eth_getTransactionByHashReturns a transaction by its hash
eth_getTransactionByBlockHashAndIndexReturns a transaction by block hash and index
eth_getTransactionByBlockNumberAndIndexReturns a transaction by block number and index
eth_getTransactionReceiptReturns the receipt for a transaction by hash
eth_callExecutes a read-only call against contract state
eth_estimateGasEstimates gas required for a transaction

Gas & Fee Market

MethodDescription
eth_gasPriceReturns the current gas price
eth_maxPriorityFeePerGasReturns the suggested max priority fee per gas (EIP-1559)
eth_feeHistoryReturns historical base fees and priority fees

Logs & Filters

MethodDescription
eth_getLogsReturns logs matching a given filter
eth_newFilterCreates a new log filter
eth_newBlockFilterCreates a filter that fires on new blocks
eth_newPendingTransactionFilterCreates a filter that fires on new pending transactions
eth_getFilterChangesPolls a filter for new events since the last poll
eth_getFilterLogsReturns all logs matching a filter
eth_uninstallFilterUninstalls a filter

WebSocket Subscriptions

MethodDescription
eth_subscribeSubscribes to events (newHeads, logs, newPendingTransactions)
eth_unsubscribeCancels an existing subscription

Network & Client Info

MethodDescription
net_versionReturns the network ID (204 for opBNB mainnet)
net_listeningReturns true if the client is actively listening for connections
net_peerCountReturns the number of peers connected to the node
web3_clientVersionReturns the client software version
web3_sha3Returns the Keccak-256 hash of the given data

Support

For technical support and questions:

See Also