Search code examples
web-scrapinggoogle-sheetsxpathimportgoogle-finance

Trying to get Cryptocurrencies Price Data in Google Sheets with no common coins such us SNX


I have a google sheet in which I am some Cryptocurrencies Price Data that I get using googleFinance or yahoo. However, I found it difficult to do this with some coins such as Synthetix Network Token.

I have been reading other questions in Stackoverflow and applying the suggestions but none seem to work with this particular cryptocurrency.

If there is someone who has done this before, could you tell me what approach are you using?

Update:

I have tried this:


=GOOGLEFINANCE("SNXGBP")

And also this

=INDEX(IMPORTXML("https://finance.yahoo.com/quote/SNX-GBP/","//div[@data-reactid='32']"), 2, 1)

Both work with the majority of cryptocurrencies.


Solution

  • try:

    =IMPORTXML("https://coinmarketcap.com/currencies/synthetix-network-token/", 
     "//div[@class='priceValue___11gHJ']")
    

    enter image description here


    or:

    =SUBSTITUTE(IMPORTXML("https://coinmarketcap.com/currencies/synthetix-network-token/", 
     "//div[@class='priceValue___11gHJ']"), "$", )*GOOGLEFINANCE("CURRENCY:USDGBP")
    

    enter image description here