7

I'm working on BSCSCAN API. My goal is to get full balance for a given address as you can see on this page:

https://bscscan.com/tokenholdings?a=0x1c82bdb6a93f50a564155ddbcb9cf1b1a244d169

I checked the documentation on BscScan Website, and it seems I just could get:

-BNB BALANCE (not the full token balance) for a given address

-BALANCE of an address by giving the contract address of a single token While I want to get the full balance for a given address. What is the right endpoints I should use? Thank you in advice.

giacomomaraglino
  • 177
  • 2
  • 14

3 Answers3

1

This API returns the token Balance of and address

https://api.bscscan.com/api?module=account&action=tokenbalance&contractaddress=YOURCONTRACTADDRESS&address=YOURADDRESS&tag=latest&apikey=YOURAPIKEY
Akm LvL
  • 11
  • 1
0

This API returns the Value of BNB and not the Value of Tokens in BNB

https://api.bscscan.com/api?module=account&action=balance&address=0x0Bb3A1517624Ff45186Df879E9292f67750F8EB0&apikey=YOURAPIKEYBSCSCAN
Henry Ecker
  • 34,399
  • 18
  • 41
  • 57
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jan 22 '22 at 19:50
  • This is not what the OP is looking for – Magno C Apr 11 '22 at 22:32
0

Here is an API route where you just specify the walletAddress, and not the contract address: (It requires a paid bscScan plan.) https://docs.bscscan.com/api-endpoints/tokens#get-address-bep20-token-holding

BitFunny
  • 196
  • 1
  • 10