0

I want to check the total assets value in dollars of a wallet.

For example, I just want to check how much asset (Ethers, erc20 tokens) does a wallet hold in form of dollars? e.g: 2000$ worth of assets given the wallet address (xyz)

I want to do it via web3

Any lead?

1 Answer 1

0

You could get price estimations from Chainlink Feeds this is how some decentralised protocols get the value of assets. If you want something simpler for js you could just call a DEX like 0x, this is an example with the ETH-DAI pair:

https://api.0x.org/swap/v1/price?sellToken=ETH&buyToken=DAI&sellAmount=1000000000000000000

you could just replace the symbols with the address of the tokens.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.