A collection of flask microservices and react frontend to make arbitrage trades
It calculates cross exchange arbitrage possibilities with multiple symbols, currencies and exchanges.
Grouping is done on Symbols and Currencies
Sample (not a representation of internal structure)
{
"BTC": {
"USD": {
"Coinbase": "Kraken",
"Bitfinex": "Kraken"
}
}
}
Clone the repo. create python venv in each microservices
- auth-service
- arbitrage-service
- trade-service
python -m venv venv
In the frontend folder, run yarn install
To run flask microservices, in each folder, run development server using python run.py
To run the frontend app, in frontend folder, run yarn run dev
- Arbitrage Service: http://localhost:5001
- Trade Service: http://localhost:5002
- Auth Service: http://localhost:5003
- Fronetend: http://localhost:5173
Configuration for every flask app is in <folder>/app/__init__.py -> create_app()
flask-service # root folder
├─── run.py # main file
├─── requirements.txt # pip requirements
├─── .env # env config
└─── app # src folder
├─── __init__.py # init file primarily contains flask app factory for main file
├─── models.py # db models and dataclasses
├─── util.py # utility functions for business logic
└─── flask-api # controller folder
├─── __init__.py # init file primarily containing blueprints and routes/events
├─── routes.py # http routes
└─── events.py # SocketIO events
└─── api # external API handling
├─── __init__.py
└─── ApiClient.py # class with static methods for fetching API data
- Update code documentation
- Refresh crypto data regularly
- Fix 2.3s API response from frontend
- Order historical data by timestamp in frontend
- Add Auth to arbitrage-service
- Frontend trade and historical tables should have filters, pagination and column sorting