项目作者: Metabot-Tech

项目描述 :
Trading bot for crypto currencies
高级语言: Python
项目地址: git://github.com/Metabot-Tech/artis.git
创建时间: 2017-06-28T19:29:12Z
项目社区:https://github.com/Metabot-Tech/artis

开源协议:MIT License

下载


Artis

Simple trading bot for cryptocurrencies.

We decided to open-source the bot since we are no longer using it. The main strategy used is arbitrage. The supported markets are Liqui and Binance. We always traded between ETH and another coin. Mainly TRX and ADX.

Some of the code is legacy from other strategies or attempts. Start from strategies/balance if you want to analyse the code. I started a refactor in one of the branches, but I have not finished it. The main algorithm is pretty much all unit tested.

We also wanted to add automatic balancing between networks, but never got to it. There is still some code for that all around.

Setup

It is meant to run in docker. The docker-compose.yml file will spawn the service and the database. It will record all the transactions made by the bot and the balance of each coin in each market.

You will need to add a settings.yaml file with the following information:

  1. DYNACONF:
  2. MARKETS: ['LIQUI', 'BINANCE']
  3. SLACK:
  4. TOKEN: '<YOUR TOKEN HERE>'
  5. CHANNEL: '#trading_bot' # Change this for the channel you want
  6. LIQUI:
  7. TIMEOUT: 30000
  8. SERVICE_FEE_HIGH: 0.0025 # Sometimes markets have a different fee when you place an order vs fulfill one
  9. SERVICE_FEE_LOW: 0.0010
  10. COINS: ['ADX', 'TRX'] # Supported coins
  11. API_KEY: <API KEY HERE>
  12. API_SECRET: <API SECRET HERE>
  13. BINANCE:
  14. TIMEOUT: 10000
  15. SERVICE_FEE_HIGH: 0.0010
  16. SERVICE_FEE_LOW: 0.0010
  17. COINS: ['ADX', 'TRX']
  18. API_KEY: <API KEY HERE>
  19. API_SECRET: <API SECRET HERE>
  20. DATABASE_URL: postgresql://{}:{}@localhost/{}
  21. COIN: "TRX" # Selected coin
  22. PRECISION: 0 # How many digits to use after the dot
  23. AMOUNT_TO_TRADE: 0.1 # Trade volume in ETH to trade each time
  24. MINIMUM_AMOUNT_TO_TRADE: 0.015 # Minimum volume in ETH for a trade to occur
  25. PROFIT_FACTOR: 1.0135 # Minimum difference (in %) in prices for a trade to occur
  26. PROFIT_REDUCTION: 0.005 # Reduction of profit if we missed the trade
  27. SERVICE_NUMBER: 1
  28. SLEEP_TIME: 0.05 # Sleep between iterations (avoid too many API requests)