How to get binance smart chain token balances?

I have tokens on bsc chain, and i am using ethers.js provider.

provider = new ethers.providers.JsonRpcProvider(‘https://bsc-dataseed.binance.org/’);

balances aren’t showing up, but they show up for ethereum.

Try using below and see if it works:
bscProvider = new ethers.providers.JsonRpcProvider(‘https://bsc-dataseed.binance.org/’, { name: ‘bsc’, chainId: 56 })

1 Like

Tokenview BSC APIs can easily get the balance of the BSC address.

How to get the balance? For example:

It will return:

{
“code”: 1,
“msg”: “成功”,
“data”: “0.0014226745”
}

Hello BNB Smart Chain

1 Like