项目作者: drodil

项目描述 :
Simple python Bitfinex trading bot
高级语言: Python
项目地址: git://github.com/drodil/bitfinex_bot.git
创建时间: 2020-08-04T10:09:59Z
项目社区:https://github.com/drodil/bitfinex_bot

开源协议:

下载


Bitfinex trading bot

Original idea: https://github.com/DorukKorkmaz/bitfinex-bot

This trading bot is using Bitfinex APIs to do automatic day-trading. It’s main
purpose is to buy low and sell high before the value is going back down.

DISCLAIMER: I will not take any responsibility for any money you might lose
using this bot. Use it at your own risk!

Requirements

TALib is used to calculate technical analysis for the cryptocoins. All
dependencies are included in the setup.py so you can use pip to install the bot.
Additionally Python 3.8 > is required.

  1. wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz
  2. tar -xzf ta-lib-0.4.0-src.tar.gz
  3. cd ta-lib/
  4. sudo ./configure
  5. sudo make
  6. sudo make install
  1. cd bitfinex_bot/
  2. pip3 install .

If you have errors during ta-lib installation, please see
https://github.com/mrjbq7/ta-lib

Additionally I have the bot running in Google Cloud
VM and it’s using the google-cloud-logging to log all buy and sell events. If
you do not want this, please remove the google cloud handler from the code.

Usage

You should insert your Bitfinex API key and secret into
file bitfinex_bot/account_info in the following format:

  1. <API Key>
  2. <API Secret>

Modify the necessary parameters in the bot.py for your liking:

  1. # Traded coin pairs
  2. coin_pairs = ['btcusd', 'ethusd', 'iotusd', 'xrpusd', 'ltcusd',
  3. 'zecusd', 'dshusd', 'eosusd', 'neousd', 'etcusd',
  4. 'xtzusd', 'ampusd' ]
  5. # Maximum spend in USD for single buy
  6. max_spend_in_usd = 175
  7. # Minimum spend in USD for single buy
  8. min_spend_in_usd = 10
  9. # Maximum number of different coins
  10. max_number_of_coins = 7
  11. # Candle intervals to fetch
  12. interval = ["1m", "15m", "30m", "5m"]
  13. # Trade fees in percentage
  14. trade_fee_percentage = 0.002
  15. # Desired profit percentage
  16. profit_multiplier = 1.006
  17. # Multiplier to break even with fees
  18. break_even_multiplier = 1 + (trade_fee_percentage * 2)

If you installed the bot via pip, please install it again after updating the
parameters.

Run the bot.py or ‘bitfinex-bot’ to start the bot.

TODO

  • Add the parameters to configuration file and load it from there on-fly
  • Add command line arguments
  • Use Bitfinex WebSocket API for better performance and API limiting
  • Publish history of trades of my experiences with the bot

Donate

If you like this project, please feel free to toss me a coin for :beer:

  • BTC: 1EoFkrRa5ahABTujm7fcCHc7ChZC9iVvJh
  • ETH: 0xB1beBe881238b961cb6ee686188C461bC110bb81
  • LTC: MCviHR1nKiRrKiKy4VZyucjTGna7JpBRh5
  • Paypal:
    Donate