Bitcoin Forum

Economy => Speculation => Topic started by: bitbollo on May 04, 2020, 05:55:05 PM



Title: [GUIDE] How To create a CryptoTracker
Post by: bitbollo on May 04, 2020, 05:55:05 PM
What is the best Cryptotracker?
I tried several tools but personally I decide to realize one by myself with google drive & google sheet.
It's very easy to use and ready to be adapted for personal interest or purpose.

Just stay online and you get easily a real-time update of quotations in “euro/usd/btc/eth” related any cryptocurrencies/token.

Here I would describe a basic version. 1
I am not a programmer and the code of this script is not written by myself.
But the system is working fine and does it duty very well.

SETUP
Open google drive and choose “New” and select “Google Sheet”
https://drive.google.com/drive/my-drive 2
(You can create a new account if you are scared that google want track your coins)

Once sheet is open, click on “instruments” and choose “Script Editor”
DELETE all text that appear and copy past this code below.

Code:
function CC(name, currencyOpt, dataOpt) {

    var currency = currencyOpt || "usd";

    var url = 'https://api.coingecko.com/api/v3/simple/price?ids=' + name + '&vs_currencies=' + currency.toLowerCase() + '&include_24hr_change=true'
    var response = UrlFetchApp.fetch(url);
    var json = response.getContentText();
    var jsonobject = JSON.parse(json);

    if (dataOpt == undefined) {
        var data = currency.toLowerCase()
    } else {
        var data = currencyOpt + "_" + dataOpt
    }

    var datatoreturn = jsonobject[name][data]

    return datatoreturn;
location.reload(dataOpt)
}

Save the function with “cc” name

Go again to your google sheet and create the column (this is just an example and you can personalize according preference or personal usage)
Code:
 Token Name || Token Number || LIVE FIAT	|| BTC || Note || LIVE USD || LIVE BTC 	

First Column - Token Name , this the label of your token, let’s start with “bitcoin”
Second Column - Token Number, we enter numerically how many coins you want to track (like 100 bitcoins ...).
Third Column
Code:
=cc("bitcoin";"usd") 

There are two variables.
-By substituting "bitcoin" = you can choose the token to be tracked.
Go to https://www.coingecko.com/ for the coin you want to trace. Do not enter the ticker.
Here is an example with Litecoin https://www.coingecko.com/it/monete/litecoin

-By substituting "usd" = you can choose which currency to receive the value from.
You can also choose other fiat or crypto currencies! (Eth / btc / usd / eur)

Fourth Column
Code:
=cc("bitcoin";"btc")
You can insert a fixed reference on the value in bitcoin (value of your token [1 unit]  compared to 1 bitcoin)
[as seen in the third column but here we trace the value no longer in usd but in bitcoin]

Fifth column  
Note field is optional but it is useful for keeping some information, E.G address or other useful info.

Multiplying Token Number x LIVE USD
Code:
=B2*C2

or for the BTC column
Code:
=B2*D2

You will get automatically the value of your portfolio expressed in fiat or cryptocurrency!

Please find below a screenshot!
https://i.ibb.co/th42QdY/Schermata-2020-03-16-alle-20-23-47.png (https://ibb.co/FWKYmP8)

And here the link  (https://docs.google.com/spreadsheets/d/1WqmsRwYDNP0DYQb4Y0Mpp0kTPwJvASdiD4QPhqYbICU/edit#gid=0) a copy already online (demo)

These values can be modified or adapted in graphs like a pie chart and it's very useful for seeing the evolution of your portfolio over time.
It can possible create infinite graphs, highlight trends, in short, free space to imagination!
With a script like this you can manage your crypto portfolio and ALWAYS be updated on the market trend 8)

You can directly aggregate these values ​​in a pie chart, useful for seeing the evolution of your portfolio over time.
You can create graphs in which the trend is highlighted, in short, free space to imagination, with such a script you can manage your crypto portfolio and ALWAYS be updated on the market trend.

FAQ

Why did I publish this guide?
[1] I have not found a complete tutorial or guide, just "pieces" detached from each other and not easy to use.

Why did I use COINGECKO?
I can tracks any crypto, shittoken etc. Following the value of some tokens and checking between CMC the market (exchanges) it seems more reliable for that purpose.

Isn't it risky to keep this information on google sheet?
[2] For a hypothetical privacy discussion yes of course.
But if you have an archive where you list all the works of the Louvre, this does not mean that you are the owner of those works of art. : :)
I recommend creating a secondary account in google.

Why use a DIY crypto tracker
It is much easier to use and customizable than an online tools.

This is a translated version from my original topic posted here (https://bitcointalk.org/index.php?topic=5233301.msg54041412#msg54041412)
to moderators= Please feel free to delete or move if it's not the right place to post it or isn't allowed a guide like this





Title: Re: [GUIDE] How To create a CryptoTracker
Post by: Tytanowy Janusz on May 05, 2020, 08:14:45 AM
Great work with guide. I always support DIY tools. When you once do you own working tool that saves your time you will never be the same person :)

Isn't it risky to keep this information on google sheet?
[2] For a hypothetical privacy discussion yes of course.
But if you have an archive where you list all the works of the Louvre, this does not mean that you are the owner of those works of art. : :)
I recommend creating a secondary account in google.

It's 100% safe. What can be risky with this? I think there is nothing that google can do knowing that 1 random guy is collecting price data for few coins.




Title: Re: [GUIDE] How To create a CryptoTracker
Post by: bitbollo on January 12, 2021, 08:06:50 AM
It's 100% safe. What can be risky with this? I think there is nothing that google can do knowing that 1 random guy is collecting price data for few coins.

Hi @Tytanowy Janusz sorry for my late reply.
I have read some "paranoid" people that doesn't want to share their personal information with google or other third part service.
I can understand but with a limit, since only in some rare situation it could be something dangerous (likewise some one try to kidnapping because they have read you have a lot of crypto .... or a government could always track this information and use against the user).
These are extreme situation, nothing that could have a real impact for a simple user.

I have tried to fix a problem regarded this tracker since it seems that API from coingecko are not working with some coins like:
Code:
=cc(“enjin-coin”;“usd”) =cc(“quant”;“usd”) =cc(“synthetix-network-token”;“usd”) =cc(“ren”;“usd”)
Any idea?


Title: Re: [GUIDE] How To create a CryptoTracker
Post by: hatshepsut93 on January 12, 2021, 11:10:15 AM
You may want to look at my project called Coin Watcher (https://github.com/Tiramisu77/CoinWatcher)

It's a very similar idea - pulling data from Coingeko to make a simple crypto tracker that stores everything on client side to guarantee privacy. I added features like price alerts with sound and push notification, selections of prices in all supported currencies, autocomplete for coin names, total sum of the portfolio.


Title: Re: [GUIDE] How To create a CryptoTracker
Post by: bitbollo on January 12, 2021, 12:02:42 PM
You may want to look at my project called Coin Watcher (https://github.com/Tiramisu77/CoinWatcher)

It's a very similar idea - pulling data from Coingeko to make a simple crypto tracker that stores everything on client side to guarantee privacy. I added features like price alerts with sound and push notification, selections of prices in all supported currencies, autocomplete for coin names, total sum of the portfolio.



I have not competence to realize something like your! I was searching something like a crypto tracking in excel / updated on google drive, but your work is definitely another level! very good job.


Title: Re: [GUIDE] How To create a CryptoTracker
Post by: hatshepsut93 on January 12, 2021, 01:12:52 PM
I have not competence to realize something like your! I was searching something like a crypto tracking in excel / updated on google drive, but your work is definitely another level! very good job.

Well, I too didn't have competence when I started working on it, as this was my first web app. In fact I was starting from scratch a few times while I was figuring out how to work with those frontend frameworks, but it all paid off because I obtained massive amounts of experience and knowledge.

I still don't consider this project finished, because I have some ideas for new features, and I don't like the current design, which is very crude.


Title: Re: [GUIDE] How To create a CryptoTracker
Post by: masterzino on January 12, 2021, 05:07:22 PM
Interesting! I didn't know that Google Docs are so powerful, allowing plain API calls/response recording.

I made a similar tracker long time using NodeJS, but this is better.