Cryptowelder is a cryptocurrency trade monitoring application, for visualizing time series data of market prices, account balances, positions, volumes, profits and losses (P/L).
Collect and display graphs/tables of various time series data.
- Market Prices
- Account Deposits and Collaterals
- Margin Positions and Unrealized P/L
- Daily/Monthly trading P/L
- Last N-days Traded Volumes
Monitor trading activities from desktop and/or mobile through a standard web browser.
Displayed data are continuously updated in real-time as they are being collected. Time-frames of the displayed data can be specified on the fly, such as intra-day, last 24h, this week, last N days, or arbitrary time-points in the past from T1 to T2.
Visual components, such as graphs and tables, can be added with drag & drop from the web ui. Each components are assigned grids, allowing customized layouts and dashboards.
Custom alerts/notifications can be configured for each the visual components in the dashboards. (cf: "Slack me if this indicator X touches the threshold value Y.")
Collect and store data from multiple exchanges, for multiple products and multiple currencies. All data sets can be displayed in an unified view, allowing cross-exchange and cross-product comparison and analysis.
Amounts denoted in various currency units (cf: JPY, USD, BTC, ETH, ...) are converted into a single home-currency unit (cf: JPY), with dynamically configurable evaluation policy of which currency to convert into, and which conversion rates to apply.
Direct access to the collected time series data with plain SQL (cf: JDBC, ODBC), without any special deserialization requirements.
Prometheus Client is built-in for quick access to the latest data sets in plain text over HTTP.
Grafana's HTTP API can also be used to interact with dashboards and alerts.
The application consists of the following components welded together:
- Set of Python scripts for scraping time-series data via public/private APIs.
- Relational database (PostgreSQL) for storing the time-series data.
- Grafana for visualization and alerting of the time-series data.
- Linux machine with command line interface and direct internet access. Recommendation:
- Python 3.x or later with pip.
pyenv
+pyenv-virtualenv
are recommended. - PostgreSQL 10.x or later.
- Grafana 5.x or later installation.
- Access tokens from each of the exchanges for private API access.
- Basic knowledge/experience of Linux to install the applications.
- Basic knowledge/experience of Python and SQL to configure/customize the application.
- Install and configure PostgreSQL database instance.
- Configure and launch the Python scripts.
- Install pip requirements. (
pip install -r requirements.txt
) - Prepare local configuration file (
~/.cryptowelder
), containing access tokens and scraping policies for each venues. - Launch the script (
sh cryptowelder.sh
) to start collecting and storing data into the database.
- Install pip requirements. (
- Install and configure Grafana instance.
- Configure Grafana users and security policies. (localhost:3000)
- Setup up the datasource as
cryptowelder
. (Usegrafana
login.) - Import the preconfigured dashboard template.
Typically, multiple layers of security policies are preconfigured by default, which blocks access to Grafana from public internet.
A quick workaround is to use SSH-tunneling.
ssh -L 3000:localhost:3000 cryptowelder@my-virtual-machine
In order to allow direct access from public internet without SSH-tunneling, below are some of the setups recommended for secure access.
- Disable root login and password login over SSH, and enforce public-key authentication.
- Configure firewall to accept inbound connections to Grafana's listen port, and bind Grafana's listen address from
localhost
to0.0.0.0
(or to a specific network interface.) - Purchase a custom domain (cf: Google Domain), obtain SSL certificate (cf: Let’s Encrypt), and switch Grafana's access protocol from
HTTP
toHTTPS
.
Note that this list is not comprehensive. Contact your system administrator if you are not familiar with server securities in general.
Use at your own risk, following the LICENSE. Author has no plan to provide specific support for individual setups nor inquiries.