Skip to content

This project summarizes your crypto portfolio accross exchanges in a single view.

Notifications You must be signed in to change notification settings

tomav/crypto-portfolio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

crypto-portfolio

This project summarizes your crypto portfolio accross exchanges in a single view.

It is based on the following components:

  • influxdb as a data storage and visualizer
  • nodejs for collecting data through exchanges using ccxt library
  • docker for running code and database

Getting started

Configuration

Create a config.json file based on config-sample.json provided in this directory.

influxdb

  • protocol to push data to you database, eg: "https:"
  • hostname of your influxdb server, eg: "influxdb.domain.com"
  • port of your server, eg: 443
  • org is the organization name configured on influxdb (can be set in docker-compose.yml configuration)
  • bucket name where data should be written to (can be set in docker-compose.yml configuration)
  • token used for authentication (can be set in docker-compose.yml configuration)

portfolio_config

  • rate_exchange is the name of the exchange used to get conversion rates (alt-to-btc and fiat-to-default_fiat_currency), which must match ccxt exchanges supported list. Trading paris (for alts and fiat) must exist on this exchange.
  • fiat_currency is the currency code of your portfolio.
  • excluded_symbols is a list of symbol that you want to exclude from your portfolio, can be "credit" tokens like BTXCRD on Bittrex or KFEE on Kraken.

exchanges

  • label is declarative name that will be used to identify an account in influxdb.
  • name is the actual name of the exchange, which must match ccxt exchanges supported list.
  • apiKey and secret are generated by your exchange. Only provide a read-only pair.
  • params allows to pass additional params to exchange. As you can see in the config sample file, it can be used on the deribit example to get ETH instead of BTC.

docker-compose.yml

version: '2'
services:
  influxdb:
    restart: always
    image: influxdb:2.0-alpine
    container_name: influxdb
    environment:
      - "DOCKER_INFLUXDB_INIT_MODE=setup"
      - "DOCKER_INFLUXDB_INIT_USERNAME=<USERNAME>"
      - "DOCKER_INFLUXDB_INIT_PASSWORD=<PASSWORD>"
      - "DOCKER_INFLUXDB_INIT_ORG=<ORG_NAME>"
      - "DOCKER_INFLUXDB_INIT_BUCKET=<BUCKET_NAME>"
      - "DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=<A_SECURED_TOKEN>"
  crypto-portfolio:
    restart: always
    image: tvial/crypto-portfolio
    volumes:
      - nodejs/config.json:/usr/src/app/config.json
    container_name: crypto-portfolio
    depends_on:
      - influxdb

Influxdb dashboard

A default dashboard showing portfolio value in USD is available in influxdb/ folder. Import it in influxdb boards panel and customize it to fit your needs.

Example:

Crypto Portfolio