项目作者: rdenadai

项目描述 :
This is a simple but useful bot to be used in bitfinex exchange to buy/sell any cryptocurrency you want...
高级语言: Python
项目地址: git://github.com/rdenadai/bitfinexbot.git
创建时间: 2018-01-04T18:03:46Z
项目社区:https://github.com/rdenadai/bitfinexbot

开源协议:MIT License

下载


BitfinexBot

Python bot for the Bitfinex exchange.

Install

Install rethinkdb

  1. $ echo "deb http://download.rethinkdb.com/apt xenial main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list
  2. $ wget -qO- https://download.rethinkdb.com/apt/pubkey.gpg | sudo apt-key add -
  3. $ sudo apt-get update
  4. $ sudo apt-get install rethinkdb

Install redis

  1. $ sudo apt-get install redis-server

Install bot

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.

  1. $ sudo apt install sox libsox-fmt-all
  2. $ pip install -r requirements.txt

Compiling the Min, Min+ and Max calculus

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.

  1. $ python setup.py build_ext --inplace

Keys

Create file keys.txt in the main directory with the following syntax:

  1. public key
  2. private key
  3. [insert newline here]

Config file

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…

Run

To run the system you need to execute the following commands:

  1. $ rethinkdb --bind all --http-port 8181
  2. $ celery -A classes.tasks worker --loglevel=info
  3. $ python run_btfxwss.py
  4. $ 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.

Log file…

It generates a log.txt in the origin folder… you can check that our for some messages.

Rethinkdb

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.

DISCLAIMER!

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!!!