For AI agents: an LLM-friendly Markdown version of every page is available by appending .md to its URL or by sending an Accept: text/markdown request header. The full documentation index is at https://www.ankr.com/docs/llms.txt
Skip to main content

BNB Smart Chain


BNB Smart Chain API is available on Web3 API platform.

BNB Smart Chain is an innovative solution to bring programmability and interoperability to Beacon Chain. BNB Smart Chain relies on a system of 50 validators with Proof of Staked Authority (PoSA) consensus that can support short block time and lower fees. The most bonded validator candidates of staking will become validators and produce blocks. The double-sign detection and other slashing logic guarantee security, stability, and chain finality.

The BNB Smart Chain also supports EVM-compatible smart contracts and protocols. Cross-chain transfer and other communication are possible due to native support of interoperability.

The BNB Smart Chain highlights:

  • EVM-Compatible
  • Proof-of-Staked Authority
  • Cross-Chain Transfer
  • Block time ~3 seconds

In order for your Web3 application to interact with BNB Smart Chain — either by reading blockchain data or sending transactions to the network — it must connect to a BNB Smart Chain node. Developers interact with the blockchain using the methods provided by the API.

The API interaction follows the JSON-RPC which is a stateless, light-weight remote procedure call (RPC) protocol. It defines several data structures and the rules around their processing. It is transport agnostic in that the concepts can be used within the same process, over sockets, over HTTP, or in many various message passing environments. It uses JSON (RFC 4627) as data format.


Methods supported


Trace and debug methods (archive nodes; Premium and Enterprise plans; priced the same as standard calls):

  • trace_filter — retrieve traces that match filter criteria.
  • trace_transaction — retrieves the traces created during the execution of a given transaction.
  • trace_replayTransaction — replays a transaction and returns the traces produced by its execution along with the state changes.
  • trace_replayBlockTransactions — replays all the transactions in a given block and returns the traces produced by their execution along with the state changes.
  • trace_block — retrieves a detailed trace of all the transactions in a specific block.
  • debug_traceBlockByHash — traces the execution of all transactions within a block specified by hash.
  • debug_traceBlockByNumber — traces the execution of all transactions within a block specified by number.
  • debug_traceBlock — traces the execution of all transactions within a block.

Trace and debug methods

The trace_* and debug_* families are served on the BNB Smart Chain archive node and are available on the Premium and Enterprise plans. They are priced the same as standard calls.

Each API key has a block-range cap for these methods. A request whose block range exceeds the cap returns error -32602 (invalid params); narrow the block range or contact support to raise the cap for your key. See Per-chain & method quirks for the current limits.


Methods

web3, net, eth

eth, trace, debug