


So lets dive straight into the first bullet point, Portfolio distribution.

The device isn’t meant for day trading, but simply as a way of keeping track of how my portfolio is doing, which is why 24 hours is “good enough” to track changes.

We have a lot of information to display, and very little room to do so. update_currencies () balances defaultdict(float, Tracker = CryptoTracker () balances, positions = tracker. If called later with the same arguments, the cached value is returned Caches a function's return value each time it is called. % matplotlib inline import matplotlib import PIL import json import time import locale import krakenex import pandas as pd import requests import collections import functools from PIL import Image from PIL import ImageDraw from PIL import ImageFont from io import BytesIO from pprint import pprint from pykrakenapi import KrakenAPI from collections import defaultdict class memoized ( object ): '''Decorator. I opted to use Kraken for exchange rates, as they have a reasonable API, as well as support for many Crypto Currencies. These conviniently also make out the top-3 on Doesn’t require Proof of Work since all coins are premined. Up and coming currency, which aims to replace currency exchange between banks. largest currency, which also implements smart contracts Bitcoin fork that attempts to fix some of the flaws of Bitcoin. I chose the following currencies for this example : We need two things, the balance of a wallet, and the exchange rates for the given currency.
Cryptocurrency ticker on raspberry pi how to#
Now that we are sure the hardware is working, it is time to dig into how to extract the wanted information. Import inkyphat from PIL import ImageFont text = "Hello World" font = ImageFont. Setting up the Raspberry Pi for headless operation requires two files to be present on the SD Card.įirst, create a file named wpa_nf, with this content I went with the Raspbian Stretch Lite image, as i won’t need desktop services for this project. Sadly the case doesn’t fit completely, so i’m still in the process of designing a new one. Of course no project is complete without a 3D printed case for it, so i went ahead and printed an “official” Adafruit Raspberry Pi Zero case. TL DR The source for the finished program is available on Github Gathering the parts needed When i stumbled over a tutorial about setting up a savings tracker, i decided it was time to pick up the idea again. I briefly scanned the available parts, but could’nt find any suitable displays - i have little desire for a backlit LCD/LED display shining 24/7 - so i made a note in my “Things to do later” list, and forgot all about it. Somewhere along the road i started checking my portfolio more frequently, and the idea for a “passive” tracker popped up. I’m not actively speculating, and only “moving around” my initial gains. I’ve since diversified my portfolio, and currently hold 6-10 different coins. I then forgot all about it for a couple of years, and only remembered when i was replacing my phone, and the wallet app popped up. Some years ago i got into the world of Crypto Currencies by accident when the company i work for was investigating the Blockchain technology for our own use, and since i knew nothing about Crypto Currencies or Blockchains at the time, i went ahead and bought around $100 worth of Bitcoins.
