Trying to import wallet balances from bscscan into Google Sheets

352 Views Asked by At

I am trying to pull the balances of my various tokens into a Google Sheet so I can live track as prices move.

I will use an old wallet as an example.

The list of token holdings is https://bscscan.com/tokenholdings?a=0x44B9D154c86975E1FBF66Ae30eE265F58e7d958A

There is only one token in the wallet, so in order to pull the balance I'm using

importXML("https://bscscan.com/tokenholdings?a=0x44B9D154c86975E1FBF66Ae30eE265F58e7d958A","//*[@id='tb1']/tr/td[4]")

But i get a response "#N/A" with an error "Imported content is empty".

Am I using this function wrong?

1

There are 1 best solutions below

0
On

that is actually an expcted outcome. JS elements are not possible to scrape into google sheets. you can always test it by disabling JS for given site:

enter image description here