A simple but nice looking python based crypto portfolio app built by me

in #cryptocurrency7 years ago (edited)

I've talked about my python based crypto portfolio app in my last few posts. However, I have improved it even further, and now it is in such a form that I actually use it for myself. You can find the code at https://github.com/HamidMushtaq/steemtools/tree/master/coinsworth_html. As you can see, the code is quite simple with only 175 lines of Python code, but it displays information in a quite neat manner, as you can see from the screenshot below. Note that the name of the coins here are basically hyperlinks, which if clicked, take to you to that coin's page on the coinmarket website.

Why did I build this app?

Well, you maybe wondering why did I have to build this app, when there are plethora of apps available already for this purpose. Well, firstly, I never intended to build this app. Actually, I just wanted to learn how to query data from coinmarketcap website, as I have an ultimate aim of building a sophisticated trading bot. However, while trying to learn that, I thought that this kind of app would be a good learning exercise. Secondly, I prefer using my own app for this purpose, because I can customize it according to my own needs. Lastly, I think, this app would be useful for others too, as they can also easily tweak its code to their own liking, since its a very small code written in an easy to learn language like Python.

How to use this app?

You only need to have Python installed on your computer. On Windows for example, after installing Python, you can just click on the file coinsworth_html.py to run it. On linux, where Python is already installed, you can run it by just typing python coinsworth_html.py inside a terminal. You will first have to fill information in the input file coins.txt of course. In that file, you just tell the amount of each coin that you have and the reference currency you want to show prices in. When for example, you say cardano:bittrex = 500.5, you are telling the app that you have 500.5 Cardanos on bittrex. The program would create a separate table for each exchange, as I showed you in the screenshot. Moreover, at the top of the given example coins.txt file, you would notice the line currency=eur, which means that prices would be displayed in euros.

Is the output saved anywhere?

Yes, the generated html file is stored in the html folder and has the date and time in its name. In this way, you can store the history of the worth of your coins for different times.


If you use this app, I would be interested in knowing your experience. Moreover, I would also like to make improvements based on your suggestions. So feel free to give suggestions.

Sort:  

Looks Lit

Thanks mate :)

It’s great. Keep doing your job, you deserve a lot of upvotes and follows. I really like helpfull people like you.

Thanks mate :)

This post has received a 6.90 % upvote from @sleeplesswhale thanks to: @hmushtaq.

You got a 0.87% upvote from @upmewhale courtesy of @hmushtaq!

Sneaky Ninja Attack! You have been defended with a 1.15% vote... I was summoned by @hmushtaq! I have done their bidding and now I will vanish...Whoosh

This post has received a 3.57 % upvote, thanks to: @hmushtaq.

Coin Marketplace

STEEM 0.16
TRX 0.17
JST 0.029
BTC 69505.86
ETH 2493.71
USDT 1.00
SBD 2.54