|
8 | 8 |
|
9 | 9 | ## Overview
|
10 | 10 |
|
11 |
| -(work in progress) |
| 11 | +**cryptowelder** is a cryptocurrency trade monitoring application to visualize the trading activities, positions, profits and losses in time series graph. |
| 12 | + |
| 13 | +1. Extract market data and account information from public APIs and private APIs. |
| 14 | +2. Transform the extracted data set into its generic data model. |
| 15 | +3. Store the transformed data into its time-series database. |
| 16 | +4. Visualize the time-series data with various graphs and charts. |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | +### Multi-Currency, Multi-Exchange |
| 21 | +Collect and store data from multiple exchanges for multiple products and multiple currencies. |
| 22 | +Collected data sets are displayed in a single unified view. |
| 23 | + |
| 24 | +### Realtime Visualization & Notification |
| 25 | +Time-series data displayed graphs/charts, and are continuously updated in real-time as they are collected. |
| 26 | +Displayed time-windows are configurable on the fly, such as today, last 24h, this week, last N days, and arbitrary time-points from T1 to T2. |
| 27 | +Configure custom alerts and notifications. (cf: "Email and/or Slack me if indicator X is Y") |
| 28 | + |
| 29 | +### Web UI |
| 30 | +Monitor trading activities from desktops and/or mobile with a standard web browser. |
| 31 | +Drag & drop graphs and components to create custom dashboards. |
| 32 | + |
| 33 | +### Home Currency Conversion |
| 34 | +Convert multiple currencies in a single home-currency unit (cf: 1.2 CoinA + 2.3 CoinB + 3.4 CoinC -> 2345.6 JPY). |
| 35 | +Which currency to evaluate to, and how to apply the conversions are dynamically configurable. |
| 36 | + |
| 37 | +### Trade Statistics |
| 38 | +Display trading activities such as daily/monthly trading p/l, N-days trading volume per accounts/products. |
| 39 | +Track trading activity statistics such as comparing last N-days trading volume as of today versus that of yesterday. |
| 40 | + |
| 41 | + |
| 42 | +## Mechanics |
| 43 | +The application consists of the following components: |
| 44 | +* Set of [Python](https://www.python.org/) scripts for scraping data via public/private APIs. |
| 45 | +* RDBMS ([PostgreSQL](https://www.postgresql.org/)) for storing the time-series data. |
| 46 | +* [Grafana](https://grafana.com/) for visualization and alerting of the time-series data. |
| 47 | + |
| 48 | + |
| 49 | +## Getting Started |
| 50 | + |
| 51 | +### Prerequisites |
| 52 | +* A REHL-equivalent linux machine with command line interface and direct internet access. Cloud-hosted VM is preferred with at least 2GB memory. |
| 53 | +* Python 3.4.x or later with pip. `pyenv` + `pyenv-virtualenv` are recommended. |
| 54 | +* PostgreSQL 10.x or later installation, or privileges to install if not already installed. |
| 55 | +* Grafana 5.x or later installation. (Root privilege is not needed for Grafana installation.) |
| 56 | +* Exchange access tokens for private API access. |
| 57 | +* Basic knowledge of Linux for configuration and installation. |
| 58 | +* Basic knowledge of Python and SQL for customization. |
| 59 | + |
| 60 | +### Steps |
| 61 | +1. Install and configure PostgreSQL instance. |
| 62 | + 1. Create database `crytowelder`. |
| 63 | + 2. Execute the DDL and DML scripts. |
| 64 | + 3. Create database user `grafana` and grant read-only access. |
| 65 | +2. Configure and build the Python scripts. |
| 66 | + 1. Install pip requirements. |
| 67 | + 2. Prepare local configuration file with access tokens and scraping policies. |
| 68 | + 3. Launch the script to start collecting and storing data into the database. |
| 69 | +3. Install and configure Grafana instance. |
| 70 | + 1. Configure users and security policies. |
| 71 | + 2. Import the dashboard template included. |
| 72 | + 3. Access Grafana's web ui with a web browser. |
0 commit comments