how to get the full token balance of an address BSCSCAN API
Asked Answered
H

3

8

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.

Haematin answered 13/6, 2021 at 8:5 Comment(2)
Only found bscscan.com/tokencheck-toolManor
Need to clarify what you need? I can get the balance of an appropriate token based on my wallet address. If so, we done with your problem.Manor
P
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
Prau answered 19/6, 2022 at 19:32 Comment(0)
E
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
Eladiaelaeoptene answered 22/1, 2022 at 15:55 Comment(2)
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.Faena
This is not what the OP is looking forExclamatory
C
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

Christmas answered 31/7, 2023 at 20:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.