Wednesday, September 12, 2018

How to keep track of your cryptocurrencies coins using google drive spreadsheets

Looking for a way to  keep track of my cryptocurrencies coins/assets using google drive spreadsheets, I found a couple of articles detailing how to do this. Unfortunately I haven't bookmarked the links to those articles, but you can have a look at some similar posts on reddit, linked above.


I managed to get a google drive spreadsheet working using some formulas, but after some time they stopped working properly.

Initially I used this formula:
=IMPORTXML(B13,"//span[@class='text-large2']")

In B13 I had http://coinmarketcap.com/currencies/ethereum/

The underlying formulas basically go to the URL and search for the span with class text-large2 and so get the value in $ of the particular crypto-currency. But coinmarketcap.com changed the HTML template and corresponding classes to something else and that's why the formulas stopped working.

Having a look at the source code of any given crypto-currency page on coinmarketcap.com, specifically at the classes corresponding to the market value, the new classes for the span are:
h2 text-semi-bold details-panel-item--price__value

So just replacing that old class with the new classe in the initial formula, got the spreadsheet working again properly.

Hope this helps!

No comments:

Post a Comment