Git Product home page Git Product logo

trading-bot's Introduction

Cryptocurrencies Trading Bot - Freqtrade Manager

This automated Trading Bot is based on the amazing Freqtrade one. It allows you to manage many Freqtrade fully Dockerized instances with ease. Each generated instance is accompagnated by its Freqtrade UI, automatically plugged to.

Features

  • Fast & easy deploy 🚀
  • 1-line installation
  • Unlimited instances configurations from 1 only YAML file
  • API endpoint and Freqtrade UI ports auto-generation and management
  • Many more is coming!

Integrated Behaviours

Requirements

Installation

Look how it's easy to install! 🤩

asciicast

Your turn! Install it! 🙌

Just 1 line to install your Trading Bot:

curl -sSL https://raw.githubusercontent.com/Ph3nol/Trading-Bot/master/install | sh

You now can access bot command.

Now, init a configuration, based on demo one:

mkdir ~/trading-bot-config && cd ~/trading-bot-config
git clone https://github.com/Ph3nol/Trading-Bot-Config .

Congrats! 👏 You can now configure your manager.yaml file and run your first bot status command! 🚀🔥

Crontab entry

A crontab entry is to add, in order to run periodic tasks needed by your instances and their behaviours. To obtain this line and add it to your crontabs (crontab -e), just run this command:

bot cron --crontab

Some screenshots

Usage

Just use ./bot from your Freqtrade Manager directory.

Commands

From your config directory:

bot
bot status
bot trade
bot stop
bot reset

bot backtest --days 10
bot backtest <instance> --days=<daysCount> --no-download --plotting <randompairsCount>

bot cron # To manually execute the cron
bot cron --crontab # To show crontab line to add

For more options informations, add --help to the base commands.

Update

To update the Bot and its Docker images, just re-run install command:

curl -sSL https://raw.githubusercontent.com/Ph3nol/Trading-Bot/master/install | sh

Thanks

Thanks

You want to support this project? You are using this project and you want to contribute? Feeling generous?

  • BTC -> 1MksZdEXqFwqNhEiPT5sLhgWijuCH42r9c
  • ETH/USDT/... (or other ERC20 loving crypto) -> 0x3167ddc7a6b47a0af1ce5270e067a70b997fd313
  • Register to Binance following this sponsored link

Development

Development

Execute as a PHP project

mkdir ~/trading-bot-dev
cd ~/trading-bot-dev && git clone https://github.com/Ph3nol/trading-bot.git .
ln -s $PWD/bot /usr/local/bin/trading-bot-dev

You can now go to your config directory, and use trading-bot-dev command instead of the production bot one.

Build reference Docker images

docker pull freqtradeorg/freqtrade:stable && \
    docker build --file ./docker/freqtrade/Dockerfile --tag ph3nol/freqtrade:latest --no-cache .
docker build --file ./docker/freqtrade-ui/Dockerfile --tag ph3nol/freqtrade-ui:latest --no-cache .

trading-bot's People

Contributors

ph3nol avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

trading-bot's Issues

Como actualizar configuraciones

Hola,

Quiero actualizar configuraciones en una instancia que cree para BUSD.

Lo que quiero actualizar es el usuario y contraseña para el UI - API pero al ejecutar esto en instancias de pruebas me sale un mensaje que toda la data previamente guardada se va a perder. Y no quiero que esto pase ya que llevo ejecutando el bot un par de días.

Gracias.

Error after restarting the machine

In Filesystem.php line 59:

Failed to copy "/app/scripts/ui-instance-entrypoint.sh" to "/tmp/manager/scripts/ui-instance-entrypoint.sh" because target file could not be opened for writing.

status []

Cannot find command

Hi Cédric, I installed the bot but when I try to get the status I get "Command 'bot' not found, did you mean:" instead. Any idea of what I did wrong?
Done
bot

Multiple server support

Manager is able to handle unlimited instances but a server is limited to a handful of bots because of exchange rate limits. Thus it is common that multiple servers are used to achieve multiple IP addresses.

Bots in multiple servers are one level harder to maintain as they are scattered so this manager would be x2 more helpful in that case.

My question is, do you plan to support multiple servers?

[Feature Request] Use docker image freqtradeorg/freqtrade

Is it possible to use the freqtradeorg/freqtrade:stable:stable or freqtradeorg/freqtrade:stable:develop in stead of your docker image? Right now your docker image is out of date and it would be nice to have this configurable (for each instance).

Thanks!

Auth failure with Binance

First of all I want to say good job for the manager, it looks great.

So I installed the bot on a fresh Digitalocean Docker Droplet. I set up two strategies and dryrun went nicely. I decided to go live with them but when I put in API key and secret, I get binance {"code":-2014,"msg":"API-key format invalid." message from Binance.

It is unclear to me why Binance woud specifically report apikey FORMAT when only key/secret would be wrong

Traceback (most recent call last):
  File "/freqtrade/freqtrade/commands/trade_commands.py", line 18, in start_trading
    worker = Worker(args)
  File "/freqtrade/freqtrade/worker.py", line 35, in __init__
    self._init(False)
  File "/freqtrade/freqtrade/worker.py", line 52, in _init
    self.freqtrade = FreqtradeBot(self._config)
  File "/freqtrade/freqtrade/freqtradebot.py", line 75, in __init__
    self.wallets = Wallets(self.config, self.exchange)
  File "/freqtrade/freqtrade/wallets.py", line 35, in __init__
    self.update()
  File "/freqtrade/freqtrade/wallets.py", line 117, in update
    self._update_live()
  File "/freqtrade/freqtrade/wallets.py", line 91, in _update_live
    balances = self._exchange.get_balances()
  File "/freqtrade/freqtrade/exchange/common.py", line 148, in wrapper
    return wrapper(*args, **kwargs)
  File "/freqtrade/freqtrade/exchange/common.py", line 148, in wrapper
    return wrapper(*args, **kwargs)
  File "/freqtrade/freqtrade/exchange/common.py", line 148, in wrapper
    return wrapper(*args, **kwargs)
  [Previous line repeated 1 more time]
  File "/freqtrade/freqtrade/exchange/common.py", line 151, in wrapper
    raise ex
  File "/freqtrade/freqtrade/exchange/common.py", line 136, in wrapper
    return f(*args, **kwargs)
  File "/freqtrade/freqtrade/exchange/exchange.py", line 689, in get_balances
    raise TemporaryError(
freqtrade.exceptions.TemporaryError: Could not get balance due to AuthenticationError. Message: binance {"code":-2014,"msg":"API-key format invalid."}

translation of yaml to json is buggy

I noticed when specifying stoploss in the yaml when you do the following for one instance:

minimal_roi: '0': 0.015

it gets translated into json to this:

"minimal_roi": [ 0.015 ],
which should be
"minimal_roi": { "0": 0.015 },

So in general, probably this is not recognized as a numeric but rather a boolean value

Split logs when instance.log file is full

When the instance.log file fills up (in my case, when it reaches 89980 lines), it becomes unwriteable and the docker logs show the errors similar to this:

2021-05-31 18:09:28,339 - AgeFilter - INFO - Validated 49 pairs.
--- Logging error ---
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/logging/handlers.py", line 74, in emit
    self.doRollover()
  File "/usr/local/lib/python3.9/logging/handlers.py", line 177, in doRollover
    self.rotate(self.baseFilename, dfn)
  File "/usr/local/lib/python3.9/logging/handlers.py", line 115, in rotate
    os.rename(source, dest)
OSError: [Errno 16] Device or resource busy: '/freqtrade/freqtrade.log' -> '/freqtrade/freqtrade.log.1'
Call stack:
  File "/home/ftuser/.local/bin/freqtrade", line 33, in <module>
    sys.exit(load_entry_point('freqtrade', 'console_scripts', 'freqtrade')())
  File "/freqtrade/freqtrade/main.py", line 37, in main
    return_code = args['func'](args)
  File "/freqtrade/freqtrade/commands/trade_commands.py", line 19, in start_trading
    worker.run()
  File "/freqtrade/freqtrade/worker.py", line 74, in run
    state = self._worker(old_state=state)
  File "/freqtrade/freqtrade/worker.py", line 111, in _worker
    self._throttle(func=self._process_running, throttle_secs=self._throttle_secs)
  File "/freqtrade/freqtrade/worker.py", line 132, in _throttle
    result = func(*args, **kwargs)
  File "/freqtrade/freqtrade/worker.py", line 145, in _process_running
    self.freqtrade.process()
  File "/freqtrade/freqtrade/freqtradebot.py", line 164, in process
    self.active_pair_whitelist = self._refresh_active_whitelist(trades)
  File "/freqtrade/freqtrade/freqtradebot.py", line 223, in _refresh_active_whitelist
    self.pairlists.refresh_pairlist()
  File "/freqtrade/freqtrade/plugins/pairlistmanager.py", line 87, in refresh_pairlist
    pairlist = pairlist_handler.filter_pairlist(pairlist, tickers)
  File "/freqtrade/freqtrade/plugins/pairlist/AgeFilter.py", line 74, in filter_pairlist
    logger.info(f"Validated {len(pairlist)} pairs.")
Message: 'Validated 49 pairs.'
Arguments: ()

The standard freqtrade method of handling logs is to split up the file once it fills up, but the instance.log mechanism implemented here does not do the same. Please consider adding this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.