GithubHelp home page GithubHelp logo

mehmetkurtoglu / freqtrademultibot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dutchcryptodad/freqtrademultibot

0.0 0.0 0.0 24 KB

Repository belonging to the Freqtrade multibot Youtube video

Python 100.00%

freqtrademultibot's Introduction

FreqtradeMultibot

Repository belonging to the Freqtrade multibot Youtube video

Create two service files in /etc/systemd/system for bot A and B

These configurations assume that freqtrade is installed in /opt/freqtrade

Bot A

nano freq_bot_a.service

Add the following lines

[Unit]
Description=Freqtrade bot A

[Service]
WorkingDirectory=/opt/freqtrade
ExecStart=/opt/freqtrade/.env/bin/freqtrade trade --config /opt/freqtrade/user_data/config_a.json
Restart=always
RestartSec=10
Type=notify
NotifyAccess=all
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=freqtrade_a
User=root
Group=root
Environment=NODE_ENV=production

[Install]
WantedBy=multi-user.target

Bot B

Copy this file to a second file named freq_bot_b.service:

cp freq_bot_a.service freq_bot_b.service

Change all the 'a' options in this file to 'b'.

Create two config files in your Freqtrade user_data directory for bot A and B

Bot A

freqtrade new-config -c /opt/freqtrade/user_data/config_a.json

Change this file to your preferences, but change/add the following lines below:

    "api_server": {
        "enabled": true,
        "listen_ip_address": "127.0.0.1",
        "listen_port": 8080,
        "verbosity": "error",
        "enable_openapi": false,
        "jwt_secret_key": "SomeSecretKey",
        "CORS_origins": ["http://localhost:8080"],
        "username": "dcd",
        "password": "dcd"
    },
    "bot_name": "Freqtrade bot A",
    "user_data_dir": "/opt/freqtrade/user_data/",
    "strategy_path": "/opt/freqtrade/user_data/",
    "strategy": "SampleStrategy",
    "db_url": "sqlite:////opt/freqtrade/user_data/tradesv3_a.sqlite",
    "logfile": "syslog:/dev/log",
    "initial_state": "running",
    "forcebuy_enable": false,
    "internals": {
            "process_throttle_secs": 5,
            "heartbeat_interval": 60,
            "sd_notify": true
    }
}

Make sure you specify the correct strategy for bot a and the tradesv3 database name!

Other config options like trading pairs, Volume/Static PairsList, buy/sell settings are configured to your own preferences.

Bot B

Copy this config file to file b:

cp config_a.json config_b.json

Change/add the following lines:

    "api_server": {
        "enabled": true,
        "listen_ip_address": "127.0.0.1",
        "listen_port": 8081,
        "verbosity": "error",
        "enable_openapi": false,
        "jwt_secret_key": "SomeSecretKey",
        "CORS_origins": ["http://localhost:8080"],
        "username": "dcd",
        "password": "dcd"
    },
    "bot_name": "Freqtrade bot B",
    "user_data_dir": "/opt/freqtrade/user_data/",
    "strategy_path": "/opt/freqtrade/user_data/",
    "strategy": "SmaRsiStrategy",
    "db_url": "sqlite:////opt/freqtrade/user_data/tradesv3_b.sqlite",
    "logfile": "syslog:/dev/log",
    "initial_state": "running",
    "forcebuy_enable": false,
    "internals": {
            "process_throttle_secs": 5,
            "heartbeat_interval": 60,
            "sd_notify": true
    }

Start the bots as a service

Copy these files into the following directory:

/etc/systemd/system

Start the service:

sudo systemctl start freq_bot_a.service sudo systemctl start freq_bot_b.service

Check the service status:

Stop the service:

sudo systemctl stop freq_bot_a.service sudo systemctl stop freq_bot_b.service

Enable the service at system startup (start at boot):

sudo systemctl enable freq_bot_a.service sudo systemctl enable freq_bot_b.service

Disable the service at system startup (no start at boot):

sudo systemctl disable freq_bot_a.service sudo systemctl disable freq_bot_b.service

After each service config change

sudo systemctl daemon-reload

Show activity

sudo tail -f /var/log/syslog

See the bots in action with FreqUI

Open a browser and go to: http://localhost:8080

If your bot is on your local host. Otherwise enter the IP address of the server into the url.

freqtrademultibot's People

Contributors

dutchcryptodad avatar

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.