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

Viewed 6584

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.

2 Answers

I would suggest using a proper service instead of scraping web pages.

The parsing is just gonna fail eventually and force you to rewrite

=IMPORTDATA("https://cryptoprices.cc/SNX/")*GOOGLEFINANCE("CURRENCY:USDGBP")

This request will give you all the price of SNX coin in GBP (using Google Sheets native function to convert USD to GBP)

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

Related