Python bot for the Bitfinex exchange.
$ echo "deb http://download.rethinkdb.com/apt xenial main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list
$ wget -qO- https://download.rethinkdb.com/apt/pubkey.gpg | sudo apt-key add -
$ sudo apt-get update
$ sudo apt-get install rethinkdb
$ sudo apt-get install redis-server
This bot needs python3.5+ (since it uses asyncio and F strings) to work, so be sure you have the right version, if not download pyenv and follow the bellow steps.
$ sudo apt install sox libsox-fmt-all
$ pip install -r requirements.txt
You need to compile cython code for your platform before run the bot, got to classes/cextutils and run the command bellow. It will recompile python code to C... trying to speed up some calculation.
$ python setup.py build_ext --inplace
Create file keys.txt
in the main directory with the following syntax:
public key
private key
[insert newline here]
Edit the config.json file to add new currencies or change the percentage of profit.
- name: "iot",
- symbol: "iotusd",
- amount: 10,
- min_profit: 0.0055,
- max_profit: 0.0085,
- active: false
DO NOT CHANGE OTHER FIELDS!!
The symbol field you could find those names from bitfinex api, but in practice is the sort name of the coin and usd. btcusd and etc...
To run the system you need to execute the following commands:
$ rethinkdb --bind all --http-port 8181
$ celery -A classes.tasks worker --loglevel=info
$ python run_btfxwss.py
$ python run.py
Keep in mind, the each command must be executed in their own shell window... the one with bot logic is run.py.
It generates a log.txt in the origin folder... you can check that our for some messages.
You can access the great web interface of rethinkdb to see how the database is been used and make changes. Just go to http://localhost:8181 after run the rethinkdb start command mentioned above.
This code, if run is your responsability, i will take no part in it... if money is lost its up to you. I take no responsability for your actions... so please, don't use this... it is solely for my personal use. It is here on github just as a demonstration porpuse... its functional... but its a serious stuff!!!