RPC method

eth_chainId on BNB Smart Chain

Supported on SwiftNodes

Everything below was measured on 2026-10-13 by calling eth_chainId on BNB Smart Chain through the same endpoint customers use, and is re-measured weekly.

What eth_chainId does

Returns the chain ID (EIP-155) as a hex string. Wallets and libraries check it before signing, and the signature commits to it, so a transaction signed for one chain cannot be replayed on another.

BNB Smart Chain chain ID, as measured

net_version returns the same number as decimal text. Older tools read net_version; use eth_chainId, which is the value signatures commit to.

We sent BNB Smart Chain a legacy transaction signed without a chain ID (pre-EIP-155). Its nodes refused it: "only replay-protected (EIP-155) transactions allowed over RPC". Sign with chain ID 56; every mainstream library does this by default.

eth_chainId0x38 (56)
net_version56

Example request

curl -s https://rpc.swiftnodes.io/rpc/bsc?key=YOUR_API_KEY \
  -X POST -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"eth_chainId","params":[]}'
// Check you are on BNB Smart Chain before signing
import { createPublicClient, http } from "viem";

const client = createPublicClient({
  transport: http("https://rpc.swiftnodes.io/rpc/bsc?key=YOUR_API_KEY"),
});

const id = await client.getChainId(); // 56
if (id !== 56) throw new Error(`wrong chain: ${id}`);

// Add BNB Smart Chain to a browser wallet
await window.ethereum.request({
  method: "wallet_addEthereumChain",
  params: [{
    chainId: "0x38",
    chainName: "BNB Smart Chain",
    nativeCurrency: { name: "BNB", symbol: "BNB", decimals: 18 },
    rpcUrls: ["https://rpc.swiftnodes.io/rpc/bsc?key=YOUR_API_KEY"],
  }],
});

Other methods on BNB Smart Chain

eth_chainId on other chains

Frequently asked questions

Does BNB Smart Chain support eth_chainId?

Yes. eth_chainId answered on the SwiftNodes BNB Smart Chain endpoint when our weekly probe called it through the customer path (2026-10-13).

What is the BNB Smart Chain chain ID?

56 in decimal, 0x38 in hex, as returned by eth_chainId on 2026-10-13.

How do I add BNB Smart Chain to MetaMask?

Call wallet_addEthereumChain with chainId 0x38, the native currency BNB with 18 decimals, and your RPC URL; the example on this page has the full object.

BNB Smart Chain endpoints, live block height and WebSocket status are on the BNB Smart Chain RPC page.

One key covers every chain we serve, and SwiftNodes has a free tier.