A Flask app to show cryptocurrency trading data.
- Clone the repository
- Create and active a virtualenv:
$ python3.8 -m venv env
$ source env/bin/activate
- Install dependencies:
$ pip install -r requirements.txt
$ pip install prometheus-client
- Run the Flask application:
$ flask run
- Open another new terminal and run Prometheus:
// Get the metrics from '/chart-data' endpoint
$ python metric_exporter.py http://127.0.0.1:5000/chart-data
- Confirmation:
Access to http://127.0.0.1:5000/
and you can find the page which every 10 seconds print the result of Q4 and the absolute delta from the previous value for each symbol.:
Access to http://127.0.0.1:8080/metrics
and get metrics like: