Get_token_balances does't return the volume in the portfolio's BNB

what’s up

When using the get_token_balances function to capture the balances, I only get the volume information in USDT, but I have 1 BNB in ​​the portfolio.

I’m running the test on the testnet network, using the python library.

When transferring the balance in BNB to another address, it returns an empty list.

How can I get my BNB balance volume within bsc testnet?

Wallet:
1 BNB
10 USDT

Code:

Return:
[{‘balance’: ‘10000000000000000000’,
‘decimals’: ‘18’,
‘logo’: None,
‘name’: ‘USDT Token’,
‘symbol’: ‘USDT’,
‘thumbnail’: None,
‘token_address’: ‘0x337610d27c682e347c9cd60bd4b3b107c9d34ddd’}]

Hey @reis

get_token_balances returns info about ERC20 tokens in the wallet.

For getting info of native crypto (in your case: BSC) you also need to use get_native_balance

Hope this will help you :man_mechanic:

2 Likes

Thanks!!

It worked :slight_smile: !!

1 Like