A simple UI to track crypto holdings, with live prices and return data
- Make sure
nodeandyarnare installed - Run
yarnin the project directory
- Get an API Key from CoinMarketCap
- Export the API Key as an environment variable:
export CMC_API_KEY="XXXXX" - Create a
data.ymlfile containing your static portfolio data (see below) - Run
yarn build && yarn startoryarn dev
---
- token: BTC # For display only
api: 1 # CoinMarketCap ID
# See https://coinmarketcap.com/api/documentation/v1/#section/Best-Practices
holding: 5 # The amount you hold
buy: 10000 # The price at which you bought this holding
- token: ETH
api: 1027
holding: 0.5782
buy: 527.82- Create a production build with
yarn build - Build the image with
docker build -t crypto-tracker . - You can use
docker run -d --name crypto --restart unless-stopped -p 8080:3000 crypto-trackerto start the container (runs on localhost, port 8080) - Restart (if stopped) with
docker restart crypto - Stop and remove the container with
docker stop crypto && docker rm crypto
The convenience script, ./update.sh is provided for this purpose, which will rebuild the image then restart the container with this latest image.