DashFair is a simple interface, built using Python's Flask and Javascript's React, to view the market ladder of a selection in Betfair.
Note that you need to have a Betfair account and a Betfair API key with the streaming service enabled.
Clone the repository.
git clone https://github.com/FilippoBovo/dashfair.git
cd dashfair
Create a Python virtual environment, here using Virtualenvwrapper, and Python 3.7, and Install the Python requirements.
mkvirtualenv --python=python3.7 dashfair
pip install -r backend/requirements.txt
Install the Node.js packages.
cd frontend
npm install
cd ..
Set the environment variables to log in to Betfair using the API key.
export BETFAIR_USERNAME=...
export BETFAIR_PASSWORD=...
export BETFAIR_APP_KEY=...
export BETFAIR_CERT_FILE=...
export BETFAIR_CERT_KEY_FILE=...
Fill the dots using your credentials. For the last two environmental variables, you have to give the path to the respective files stored in your local machine.
To start DashFair, launch the Flask backend application.
cd backend
python backend.py
Then, open a new terminal, go to the repository folder and start the React frontend.
cd frontend
npm start