BNB Smart Chain

BNB Smart Chain

eth_sendRawTransaction

BNB Smart Chain is chain ID 56, and every transaction on it spends BNB for gas. eth_sendRawTransaction is the call that actually puts one on the wire. Sign a transaction client-side, serialize it, then send the resulting RLP-encoded blob to https://bsc.therpc.io/YOUR_API_KEY. The method broadcasts that fully signed transaction to the network and returns its 32-byte hash. That hash is your handle for tracking the transaction while PoSA validators pick it up and seal it into a block within a few seconds. One caveat: the hash confirms acceptance into the mempool, not on-chain success.

Use cases

  • Push a BNB transfer onto chain 56 after signing it offline in a cold wallet or hardware signer.
  • Deploy a BEP-20 contract by leaving to empty and packing the compiled bytecode into the data field of the signed transaction.
  • Trigger a contract write, say a BEP-20 transfer or a PancakeSwap router swap, by broadcasting the signed call.

Parameters

#NameTypeRequiredDescription
1signedTransactionstringYesThe serialized signed transaction. Build and sign it client-side with a library (e.g. ethers, viem, web3.js); never send a private key to the node.

Response

TypeDescription
string32-byte transaction hash (0x-prefixed). The transaction is now in the mempool but not yet confirmed.

Example request

curl https://bsc.therpc.io/YOUR_API_KEY \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_sendRawTransaction",
"params": ["0x..."],
"id": 1
}'

Try it live in the BNB Smart Chain playground.

Errors & troubleshooting

CodeMessageCause
-32000nonce too lowThe nonce in the signed transaction is lower than the sender's current on-chain nonce.
-32000insufficient funds for gas * price + valueThe sender does not have enough native-token balance to cover gas cost and the transferred value.
-32000replacement transaction underpricedTried to replace a pending transaction (same nonce) but the new fee is not high enough (typically requires ≥10% bump).

Common pitfalls

  • The returned hash only proves the node took the transaction into its mempool, not that it is confirmed; poll eth_getTransactionReceipt to watch for inclusion in a block.
  • A successful broadcast does not guarantee on-chain success. A receipt carrying status: "0x0" means the transaction was mined but reverted, and your BNB gas was still burned.
  • Pull a fresh nonce with eth_getTransactionCount right before signing; a stale nonce collides with another pending transaction and gets rejected.

Supported networks

  • Mainnet — Chain ID: 56
  • Testnet — Chain ID: 97

See also

Parameters

0x-prefixed hex string of the RLP-encoded signed transaction

curl https://bsc.therpc.io/YOUR_API_KEY \
-X POST \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"eth_sendRawTransaction","params":[""]}'

Ready to call this in production?

Free tier covers personal projects. Pay-as-you-go scales without a card.