Runs on python3 (Developed and tested on python Version 3.8.2).
Note: All commands are run from /GeminiCodeChallenge
Script that when given a deviation price percent change returns all pairs with
greater percent price change over last 24 hours via Gemini api.
https://docs.gemini.com/rest-api/#price-feed
Install required python libraries
pip install -r requirements.txt
a) Run the script with a 0.10% price change.
Will print pairs with price changes greater than 0.10%.
python api_alerts.py -d .10
Note: If percent provided is too large and there are no price changes greater than or equal to it then there will not be any output.
b) Do a dry run of the script
python api_alerts.py -d .15 --dry_run True
c) View more info about the script
python3 api_alerts.py --help
python -m unittest
(Alternatively can use pytest and run that way for fancier testing)
python -m pytest
Code syntax testing:
pylint *
- Add volume deviation monitoring.
- Add price standard deviation monitoring.
- More error handling for things like invalid arguments being submitted.
- Integration with slack, pagerduty for live alerts to relevant teams.
- Containerize with docker, k8s for easy deployment and avoiding running locally.
- Add to CI/CD pipeline in jenkins/travis/circle/other tool for continuous deployment of this application.
- Add linting, and unittests to CI/CD pipeline.
- Convert output to JSON format and store in AWS S3, then analyze trends with AWS Athena.
- Address not fixed linting issues