Importing alternative cryptocurrency prices and non-US stock prices into Google Sheets

Photo by Myriam Jessier on Unsplash

Contents

Builtin GoogleFinance() function

=GoogleFinance(“currency:BTCUSD”) to get Bitcoin price in US Dollars.=GoogleFinance(“USDMYR”) to convert US Dollars into Malaysian Ringgit.=GoogleFinance(“NYSE:DIS”) to get Disney stock price etc.

Alternative Cryptocurrencies

=IMPORTXML(“https://coinmarketcap.com/currencies/bitcoin/", “//div[@class=’priceValue___11gHJ’]”)
For Ethereum (ETH)
=IMPORTXML(“https://coinmarketcap.com/currencies/ethereum/", “//div[@class=’priceValue___11gHJ’]”)
For ZCash
=IMPORTXML(“https://coinmarketcap.com/currencies/zcash/", “//div[@class=’priceValue___11gHJ’]”)

Malaysian Stock Prices

=ImportXml(“https://www.malaysiastock.biz/Corporate-Infomation.aspx?securityCode=5079", “//*[@id=’MainContent_lbQuoteLast’]”)
For TENAGA 
=ImportXml(“https://www.malaysiastock.biz/Corporate-Infomation.aspx?securityCode=5347", “//*[@id=’MainContent_lbQuoteLast’]”)
For CARLSBG
=ImportXml(“https://www.malaysiastock.biz/Corporate-Infomation.aspx?securityCode=2836", “//*[@id=’MainContent_lbQuoteLast’]”)

Indian Stock Prices

=IMPORTXML("https://www.moneycontrol.com/india/stockpricequote/banks-public-sector/statebankindia/SBI", "//div[@class='inprice1 nsecp']")
For J.K.Cement Ltd.
=IMPORTXML("https://www.moneycontrol.com/india/stockpricequote/cement-major/jkcement/JKC03", "//div[@class='inprice1 nsecp']")
For Reliance
=IMPORTXML("https://www.moneycontrol.com/india/stockpricequote/refineries/relianceindustries/RI", "//div[@class='inprice1 nsecp']")

Use ImportXML() for any data

=IMPORTXML("A", "B")//*[@id='C']//div[@class='D']

Android Developer