TriportRPC

BNB Smart Chain (BSC) chain ID, RPC URL and network config

Last updated:

BSC network identifiers

BNB Smart Chain mainnet identifiers
IdentifierValueSource
Chain ID56 (0x38)
eth_chainId returns the hex form.
BNB Chain docs: JSON-RPC endpoint
Network ID56
Returned by net_version (checked on bsc-dataseed.bnbchain.org, 23.09.2026).
ethereum.org JSON-RPC API (net_version)
CAIP-2 IDeip155:56
The chain identifier multichain wallets and WalletConnect use.
CAIP-2 eip155 namespace
Currency symbolBNBTriport chain registry

The chain ID is signed into every transaction (EIP-155); the network ID is what net_version reports. They are separate values that happen to match on most chains — see chain ID vs network ID and the chain ID glossary entry.

BSC RPC URLs

BNB Smart Chain mainnet RPC endpoints
Triport RPC URL (header auth)https://triport.io/rpc/bsc
Triport RPC URL (keyed)https://triport.io/r/<API_KEY>/bsc
Required scopebsc:rpc
Public RPC by BNB Chainhttps://bsc-dataseed.bnbchain.org
Rate-limited public endpoint: BNB Chain's docs state 10K requests per 5 minutes. BNB Chain docs: JSON-RPC endpoint

Public-endpoint limits are as each operator publishes them, checked 23 September 2026.

Plans and per-category rate limits: pricing. Network overview: BNB Smart Chain RPC; method reference: BNB Smart Chain documentation.

Add BSC to MetaMask, viem, Hardhat or Foundry

wallet_addEthereumChain (EIP-3085) requires only chainId, as a hex string — 0x38, not 56. The MetaMask block below also fills chainName, nativeCurrency (name, symbol, decimals) and rpcUrls, which a wallet uses to display and reach the network. A wallet cannot send the x-token header, so rpcUrls holds the keyed URL with your API key in the path — paste your key below; the placeholder URL answers 401 until you do.

MetaMask

{
  "method": "wallet_addEthereumChain",
  "params": [{
    "chainId": "0x38",
    "chainName": "BNB Smart Chain",
    "nativeCurrency": { "name": "BNB", "symbol": "BNB", "decimals": 18 },
    "rpcUrls": ["https://triport.io/r/<API_KEY>/bsc"]
  }]
}

viem

import { createPublicClient, defineChain, http } from "viem";

export const bsc = defineChain({
  id: 56,
  name: "BNB Smart Chain",
  nativeCurrency: { name: "BNB", symbol: "BNB", decimals: 18 },
  rpcUrls: { default: { http: ["https://triport.io/r/<API_KEY>/bsc"] } },
});

export const client = createPublicClient({ chain: bsc, transport: http() });

ethers v6

import { JsonRpcProvider, Network } from "ethers";

const network = Network.from({ name: "bsc", chainId: 56 });
export const provider = new JsonRpcProvider("https://triport.io/r/<API_KEY>/bsc", network, { staticNetwork: network });

Hardhat

// hardhat.config.ts
export default {
  networks: {
    bsc: { url: "https://triport.io/r/<API_KEY>/bsc", chainId: 56 },
  },
};

Foundry

# foundry.toml
[rpc_endpoints]
bsc = "https://triport.io/r/<API_KEY>/bsc"

wagmi

import { createConfig, http } from "wagmi";
import { bsc } from "./bsc-chain";

export const config = createConfig({
  chains: [bsc],
  transports: { [bsc.id]: http("https://triport.io/r/<API_KEY>/bsc") },
});

curl (header auth)

curl https://triport.io/rpc/bsc \
  -H "x-token: <API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"eth_chainId","params":[]}'

Keys in URLs vs headers

A keyed URL is the same credential as a header, in a less private place: it lands in shell history, CI logs and screenshots. Use it only where a header is impossible (wallets, hardhat.config, foundry.toml), send x-token from server code, and rotate a key that leaked.

Verify you are on BSC mainnet

Call eth_chainId first. It must return 0x38 — a client whose configured chain ID disagrees with the reply refuses to connect, which explains most failures when adding a network by hand.

curl https://triport.io/rpc/bsc \
  -H "x-token: <API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"eth_chainId","params":[]}'

Sources: the chain's own documentation and the CAIP-2 namespace specs cited in the tables above; EVM chain IDs come from Triport's chain registry and match them.

FAQ

What is the BSC chain ID?
56 in decimal, 0x38 in hex — eth_chainId returns the hex form. The CAIP-2 ID is eip155:56.
What is the BSC network ID?
net_version returns 56, the same number as the chain ID. Sign with the chain ID from eth_chainId: under EIP-155 the chain ID is part of the transaction signature, the network ID is not.
What is the BSC RPC URL?
On Triport: https://triport.io/rpc/bsc with your API key in the x-token header, or https://triport.io/r/<API_KEY>/bsc where a header is impossible (wallets, config files). BNB Chain also runs a public endpoint, https://bsc-dataseed.bnbchain.org; it is rate-limited, and the limits its operator publishes are cited in the RPC URL table.
How do I add BSC to MetaMask?
Call wallet_addEthereumChain (EIP-3085) with chainId "0x38" — a hex string, not the decimal 56 — chainName "BNB Smart Chain", nativeCurrency BNB with 18 decimals, and your keyed RPC URL in rpcUrls. The MetaMask block on this page is the exact request.
Is my API key sent to Triport when I use this page?
No. Snippets are generated in your browser: the key is never submitted, never stored and never written into the page URL, which is why this page has no shareable link.