Install Mosquito
This revision is from 2024/03/14 19:56. You can Restore it.
git clone https://github.com/miti0/mosquito.git
cd mosquito
pip install -r requirements.txt
Uses mongodb...
sudo apt-get install gnupg curl
To import the MongoDB public GPG key, run the following command:
curl -fsSL https://www.mongodb.org/static/pgp/server-7.0.asc | sudo gpg -o /usr/share/keyrings/mongodb-server-7.0.gpg --dearmor
Create the /etc/apt/sources.list.d/mongodb-org-7.0.list file for Ubuntu 22.04 (Jammy):
echo "deb [[arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg]] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list
Issue the following command to reload the local package database:
sudo apt-get update
Install the MongoDB packages
sudo apt-get install -y mongodb-org
sudo systemctl start mongod
mongosh
show dbs
exit
In the mosquito directory there is a sample ini, API keys from either Bitrex or Polo are required. Open the sample file and place the API keys in the sample.ini
python mosquito.py --help
Next you must back fill and store the back fill to mongodb
python backfill.py --days 5 --pairs USDT_BTC
or
python backfill.py --days 3 --all
or
python backfill.py --days 1 --pairs BTC_*
Backtesting mode
python3 mosquito.py --backtest --plot
Simulation mode
python mosquito.py --paper