Skip to main content

Freqtrade TUI

Project description

Welcome to FTUI

Freqtrade Textual User Interface (FTUI) is a text-based interface for the Freqtrade bot.

FTUI is developed using the awesome Textual and Rich frameworks.

FTUI is in an alpha state so there will be bugs and missing features

image

Getting Started

FTUI is designed to mimic the FreqUI interface as much as possible, but the main difference is that FTUI does not currenty support controlling a running bot. Rather FTUI acts as a lightweight passive monitoring system for running Freqtrade bots.

Installation

Currently, FTUI is only supported on Linux systems. We hope to provide a Docker container in future.

The easiest way to install FTUI is via pip: pip install ftui

Linux

FTUI can be installed into an existing venv (e.g. a existing freqtrade venv) or in a new directory, e.g. ~/ftui, and venv as follows:

$ mkdir ~/ftui
$ cd ftui
$ python3 -m venv .venv
$ source .venv/bin/activate
$ pip3 install -r requirements.txt
$ pip3 install -e .

Once installed, a config.yaml needs to be provided to FTUI, so create it in your new ftui/ directory and edit it with a cli text editor like nano:

$ touch config.yaml
$ nano config.yaml

Configuration

FTUI is configured using a config.yaml file, where a list of running Freqtrade bots needs to be provided. An example has been provided to get you started as below:

---
servers:
    - name        : "botA"
      username    : "you"
      password    : "your_password"
      ip          : 1.2.3.4
      port        : 8080
    - name        : "botB"
      username    : "you"
      password    : "your_password"
      ip          : 1.2.3.4
      port        : 8081

    - name        : "botC"
      username    : "you"
      password    : "your_password"
      ip          : 5.6.7.8
      port        : 8080

colours:
    pair_col: "purple"
    bot_col: "yellow"
    bot_start_col: "white"
    trade_id_col: "white"
    open_rate_col: "white"
    current_rate_col: "white"
    open_date_col: "cyan"
    winrate_col: "cyan"
    open_trade_num_col: "cyan"
    closed_trade_num_col: "purple"
    profit_chart_col: "orange"
    link_col: "yellow"
    candlestick_trade_text_col: "orange"
    candlestick_trade_open_col: "blue"
    candlestick_trade_close_col: "purple"

debug: False
show_fear: True

Add a corresponding servers block into your own config.yaml, making note of the indentation.

You can monitor bots across multiple servers easily in one FTUI interface. FTUI uses the freqtrade-client REST API client, so you do not need to wrestle with any CORS setup as you have to do in FreqUI to access multiple bots.

You can also set custom colours for some of the UI elements as per the example above. The supported list of colour names can be found here. You can leave the colours option out of the configuration and defaults will be used.

In future, the Settings screen will allow configuration of the config.yaml from inside the FTUI interface.

Running FTUI

Once you have saved your config.yaml file, make sure you are in your ftui directory with your venv activated, and run FTUI as below. FTUI will load each bot client, and preload trade data into memory:

$ ftui -y config.yaml

███████╗████████╗██╗   ██╗██╗
██╔════╝╚══██╔══╝██║   ██║██║
█████╗     ██║   ██║   ██║██║
██╔══╝     ██║   ██║   ██║██║
██║        ██║   ╚██████╔╝██║
╚═╝        ╚═╝    ╚═════╝ ╚═╝

Freqtrade Textual User Interface (FTUI)

Run with:

    ftui -y config.yaml

Setting up botA version 2024.1-dev-1b70e9b07 at http://1.2.3.4:8080: SampleStrategy running dry_run 5m
Setting up botB version 2024.1-dev-1b70e9b07 at http://1.2.3.4:8081: SampleStrategy running dry_run 5m
Setting up botC version 2024.1-dev-1b70e9b07 at http://5.6.7.8:8080: SampleStrategy running dry_run 5m

Starting FTUI - preloading all dataframes.......

Screens

Dashboard

The main dashboard shows summary statistics from all bots. You can access the dashboard by clicking the Dashboard button in the bottom left, or hitting the D key.

image

View Bots

The bot view allows selection of a running bot from the dropdown at the top of the screen. Once selected, various information about the bot will be shown in the tabs in the bottom half of the screen. You can access the View Bots screen by clicking the button in the bottom left, or hitting the B key.

Open trades: image

Closed trades: image

Tag summary: image

Performance: image

General bot information: image

Logs: image

Sysinfo: image

Settings

The Settings screen shows the list of configured bots on the left hand side of the screen. Other configuration options are shown on the right. You can access the Settings screen by clicking the button in the bottom left, or hitting the S key.

In future, you will be able to show and hide bots in FTUI by selecting/deselecting them in the bot list, as well as changing other configuration options. Currently this feature is disabled in this alpha release.

Help

This README!

Known Issues

General

  • When the bot is been running and you put your PC to sleep, the async worker will bug out and intermittently crash the UI.
  • The Settings screen save functionality is currently disabled.

urllib pool connection errors

When running a larger number of bots within one FTUI instance, you may see urllib/requests warnings about the pool connections being exhausted:

connection pool is full, discarding connection: 127.0.0.1. Connection pools size: 10

Raising the pool size limits can help avoid these warnings.

There are two command line/yaml config options that can be adjusted:

CLI

ftui -c config.json --pool_connections 20 --pool_maxsize 15

YAML config

pool_connections: 20
pool_maxsize: 15

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ftui-0.1.12.tar.gz (29.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ftui-0.1.12-py3-none-any.whl (34.2 kB view details)

Uploaded Python 3

File details

Details for the file ftui-0.1.12.tar.gz.

File metadata

  • Download URL: ftui-0.1.12.tar.gz
  • Upload date:
  • Size: 29.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for ftui-0.1.12.tar.gz
Algorithm Hash digest
SHA256 550ff75a2ee79b924c9181c9c63919767fd4c09e4477b4f58f1fccbf3aa52f17
MD5 d1be8f730ec38a70f43998a8e5fd7190
BLAKE2b-256 15f7c296b6153d8329e72839efa46f13ceb7df250d6cb39c80d099579d65c999

See more details on using hashes here.

Provenance

The following attestation bundles were made for ftui-0.1.12.tar.gz:

Publisher: ci.yml on freqtrade/ftui

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ftui-0.1.12-py3-none-any.whl.

File metadata

  • Download URL: ftui-0.1.12-py3-none-any.whl
  • Upload date:
  • Size: 34.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for ftui-0.1.12-py3-none-any.whl
Algorithm Hash digest
SHA256 8b17096af35d6aa549d548dd2f3cd828724855c59bbba54335bc409633580ac4
MD5 89d2d9a6f557fecc19fa72a5e9c77044
BLAKE2b-256 4c932c79660afb5ef3fec5444d347a7e951beea8aeb55b807a0ec0cd6c1d5faf

See more details on using hashes here.

Provenance

The following attestation bundles were made for ftui-0.1.12-py3-none-any.whl:

Publisher: ci.yml on freqtrade/ftui

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page