CryptoWatch

Track your favorite crypto coin price and your wallet balance.

image

Install

Create .env:

ADMIN_USER=admin  
ADMIN_PASSWORD=admin

Configure your wallet assets and prices to watch

vi cryptowatch/config.json

Clone this repository on your Docker host, cd into test directory and run compose up:

git clone https://github.com/rafaelzimmermann/cryptowatch.git
cd cryptowatch
docker-compose up -d

Open on your browser: http://localhost:3000/

To check the available symbols:

curl https://api.binance.com/api/v3/exchangeInfo | jq ".symbols[].symbol"

Prerequisites:

  • Docker Engine >= 1.13
  • Docker Compose >= 1.11

Containers:

  • Prometheus (metrics database) http://

    :9090

  • Prometheus-Pushgateway (push acceptor for ephemeral and batch jobs) http://

    :9091

  • Grafana (visualize metrics) http://

    :3000

  • cryptowatch (containers that collect prices)

Setup Grafana

Navigate to http://

:3000
and login with user admin password admin. You can change the credentials in the compose file or by supplying the ADMIN_USER and ADMIN_PASSWORD environment variables via .env file on compose up. The config file can be added directly in grafana part like this

grafana:
  image: grafana/grafana:5.2.4
  env_file:
    - config

and the config file format should have this content

GF_SECURITY_ADMIN_USER=admin
GF_SECURITY_ADMIN_PASSWORD=changeme
GF_USERS_ALLOW_SIGN_UP=false

If you want to change the password, you have to remove this entry, otherwise the change will not take effect

- grafana_data:/var/lib/grafana

Grafana is preconfigured with dashboards and Prometheus as the default data source:

Changing currency to Dollar

Update the file cryptowath/config.json and set dollar as currency:

{
  "wallet": {
    "ADA": 1000.0,
    "SOL": 100,
    "ETH": 5,
    "BTC": 1
  },
  "watchPrices": [
    "ADA",
    "BTC",
    "SOL",
    "BNB",
    "DOGE",
    "MBOX"
  ],
  "currency": "USDT"
}

Replace the currency on grafana/provisioning/dashboards/crypto.json. Use your favorite editor and replace all occurrences of the string “currencyEUR” by “currencyUSD”.

       "yaxes": [
         {
-          "format": "currencyEUR",
+          "format": "currencyUSD",
           "label": null,
           "logBase": 1,

Powered by:

Did you like it? Consider paying me a coffee

BTC Cardano
image image

Based on: Docker-Compose-Prometheus-and-Grafana

GitHub

https://github.com/rafaelzimmermann/cryptowatch