froggleston / freqtrade-frogtrade9000

A command-line freqtrade REST API client
MIT License
125 stars 28 forks source link

This project is no longer under active development.

Please move over to the new formal successor to frogtrade9000, FTUI

frogtrade9000 - a command-line Rich client for the freqtrade REST API

I found FreqUI too cumbersome and slow on my Raspberry Pi 400 when running multiple instances of freqtrade bots. So I came up with a python Rich client:

It has very basic interactivity via the keyboard module which has cross-platform issues. I might consider porting this all to prompt-toolkit in the future, but not now.

image

Requirements

If you don't have freqtrade, get it here, and you'll satisfy most of the requirements. If not you'll need to pip install the following requirements.

Existing Freqtrade install

If you're intending to copy the scripts into an existing freqtrade folder, you'll need to activate your venv (e.g. source ./path/to/freqtrade/env/bin/activate) and pip install:

Standalone

You'll need to activate your venv or use the global python environment, and pip install -r requirements.txt or manually install the following:

Installation

Existing venv Freqtrade install

Once cloned, copy the script files into your freqtrade/scripts folder. That's it!

Existing dockerised Freqtrade install

You need to add a COPY command into your freqtrade dockerfile to copy the scripts into the container and rebuild. Full instructions coming soon!

Standalone

You'll need the rest_client.py file from the core freqtrade repo and place it in the same folder that you put these files. Grab it from here: https://github.com/freqtrade/freqtrade/blob/stable/scripts/rest_client.py or

wget https://raw.githubusercontent.com/freqtrade/freqtrade/stable/scripts/rest_client.py

Running

The easiest way to configure frogtrade9000 is with a YAML file. You can use a YAML file (see example_frogtrade_config.yaml) that contains the options you wish to run frogtrade9000 with, including multiple servers:

./scripts/frogtrade9000.py -y frogtrade_config.yaml

Running frogtrade9000 with no options will make it look for your config.json file and read in the api_server stanza from there, picking up the server IP, port, username and password:

./scripts/frogtrade9000.py

To specify a config use -c:

./scripts/frogtrade9000.py -c my-other.config.json

The nice thing about frogtrade9000 is that you can monitor multiple bots and strategies. If you run multiple bots with different IPs/ports use the -s flag to manually specify your own botname, the IP and ports and any username/password info of the freqtrade API servers separated by commas:

./scripts/frogtrade9000.py -s [bot1]user:pass@192.168.1.69:8081,[bot2]user:pass@127.0.0.1:8082

For simpler TTYs/terminals that cannot display curved symbols, use the -b option to use square edges so plots render correctly:

./scripts/frogtrade9000.py -s [bot1]user:pass@192.168.1.69:8081,[bot2]user:pass@127.0.0.1:8082 -b

Other options include:

*Note that your password has to be RFC compliant. You can use alphanumeric characters and `- . _ ~ % ! $ & ' ( ) + , ; =`**

Using frogtrade9000

There's not much to say. The view updates every 5 seconds.

It uses the Rich library to provide a console view, so there isn't really any decent interactivity as part of that library. However, if the keyboard is working (see below) then you can:

Known issues

Acknowledgements

The very cool ASCII charts are from https://github.com/kroitor/asciichart under the MIT licence