Blaine Freelance

I’ve just discovered Google Apps Script, and it is awesome

I’ve just discovered Google Apps Script, and it is awesome

I’ve recently stumbled upon Google Apps Script, the Tools > Script Editor option available to certain Google web apps like Sheets. The name “Google Apps Script” is kinda weird and clunky in my opinion, so in this article I’ll refer to it as simply “the script editor”.

One particular way in which I’ve been using the script editor, is to create JavaScript functions that will fetch the current price of cryptocurrencies like Bitcoin, Litecoin, and Ethereum, and then update a spreadsheet with these values. This is tremendously cool. With the script editor you can essentially add much more capability to your spreadsheets. In my case, I’m using it to fetch data from a 3rd party API and keep my spreadsheets up to date with the current price of Bitcoin. Pretty neat.

Once I have the current price of Bitcoin set as a cell in my spreadsheet, I can then proceed to use it in novel ways. For example, multiply it by the amount of Bitcoin that I personally hold, and so on. I can then go on to deduce the exact amount of profit I’ve made, and so on. This basically opens up a lot of possibilities, and I can essentially use this spreadsheet to get more information out of my current crytpo holdings than a service such as Coinbase is able to provide. A service such as Coinbase only provides so much information, it won’t show you your exact profit, your principle, and so on… it’s essentially lacking in terms of information that it will provide to you. However, with Google sheets, and a few lines of JavaScript, I’m able to generate the data that is missing from Coinbase, and get a better idea of how my crypto holdings are doing.


In case you’re curious, here’s the code I’m using: