How to access the API
How can I consume the API?? I would like to retrieve the data of the account addresses (balance/tokens held/amounts) in the NodeJs app. Can someone point me?
I use web3js with NodeJS. Depending on if you use testnet or mainnet, the RPC endpoint is different.
mainnet: https://bsc-dataseed.binance.org/ testnet: https://data-seed-prebsc-1-s1.binance.org:8545/
Some API methods require WebSockets, so just replace "https" with "wss" in the RPC address and create new WebSocket provider.
For example:
var web3 = new Web3("https://bsc-dataseed.binance.org/");
or
var web3 = new Web3(new Web3.providers.WebsocketProvider("wss://bsc-dataseed.binance.org/"));
After that you can just look up in the API documentation to see how to pass parameters to the web3 object and its functions.