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

Overview

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:

  • keyboard
  • rich

Standalone

You'll need to activate your venv or use the global python environment, and pip install:

  • numpy
  • pandas
  • ccxt
  • python-rapidjson
  • keyboard
  • rich

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

Running

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:[email protected]:8081,[bot2]user:[email protected]: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:[email protected]:8081,[bot2]user:[email protected]:8082 -b

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

Using frogtrade9000

There's not much to say. 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:

  • use the number keys to change the top OHCLV chart to whichever open pair your bot is trading, e.g. from the screenshot above, pressing 1 would change the chart to SHIB/USDT. Pressing 0 takes you back to BTC/USDT (or whatever informative pair you've specified in the code).
  • use the letter keys to change the bottom profit chart based on whichever bots you're running, e.g. pressing B will take you to the bot running on 192.168.1.77:8082
  • use the PgUp key to cycle through the OHCLV chart timeframe (supports 1m, 5m, 15m, 1h, 4h)

Known issues

  • The keyboard module needs root/sudo on Linux to gain access to /dev/input*. You can run frogtrade9000 without sudo, but any of the hokey keyboard interactivity will be disabled.
  • The display flickers on some terminals, e.g. git bash. I can't do anything about that.
  • The exception handling is lame. This needs improvement.
  • A JSON config file would help with more granular bot use and general tool settings, e.g. informative pair as default. I'll get round to this soon.

Acknowledgements

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

Owner
Robert Davey
Robert Davey
Kattis shell for getting examples, testing and submitting.

Kattis shell for getting examples, testing and submitting.

Simon Green Kristensen 15 Sep 30, 2022
Simple Python Library to display text with color in Python Terminal

pyTextColor v1.0 Introduction pyTextColor is a simple Python Library to display colorful outputs in Terminal, etc. Note: Your Terminal or any software

Siddhesh Chavan 1 Jan 23, 2022
A CLI for advanced management of your notes with simple commands

PyNoteManager This is a CLI for advanced management of your notes with simple co

3 Dec 30, 2021
A CLI tool that scans through a directory and organizes all loose files into folders by file type.

Organizer CLI Organizer CLI is a python command line tool that goes through a given directory and organizes all un-folder bound files into folders by

Mulaza Jacinto 6 Dec 14, 2022
Turdshovel is an interactive CLI tool that allows users to dump objects from .NET memory dumps

Turdshovel Description Turdshovel is an interactive CLI tool that allows users to dump objects from .NET memory dumps without having to fully understa

Leron Gray 41 Jul 27, 2022
Professor Wordlist is a free open source command line tool written in python

Professor Wordlist is a free open source command line tool written in python, With the aim of generating custom wordlists with a variety of unique parameters and functions providing many possibilitie

オークO A K Z E H オーク 1 Oct 28, 2021
RSS reader client for CLI (Command Line Interface),

rReader is RSS reader client for CLI(Command Line Interface)

Lee JunHaeng 10 Dec 24, 2022
Command line tool to automate transforming the effects of one color profile to another, possibly more standard one.

Finished rendering the frames of that animation, and now the colors look washed out and ugly? This terminal program will solve exactly that.

Eric Xue 1 Jan 26, 2022
ServX | Bash Command as a Service

ServX | Bash Command as a Service Screenshots Instructions for running Run python3 servx.py. COMPATIBILITY TESTED ON ARCHLINUX(x64) & DEBIAN(x64) ONLY

ARPSyndicate 2 Mar 11, 2022
a-shell: A terminal for iOS, with multiple windows

a-shell: A terminal for iOS, with multiple windows

Nicolas Holzschuch 1.7k Jan 02, 2023
A simple CLI tool for tracking Pikud Ha'oref alarms.

Pikud Ha'oref Alarm Tracking A simple CLI tool for tracking Pikud Ha'oref alarms. Polls the unofficial API endpoint every second for incoming alarms.

Yuval Adam 24 Oct 10, 2022
A minimal todo list for your terminal.

todo A minimal todo list for your terminal. Installation Run the following command. pip install git+https://github.com/piero-vic/todo.git Usage todo

Piero Lescano 7 Aug 08, 2022
alternative cli util for update-alternatives

altb altb is a cli utility influenced by update-alternatives of ubuntu. Linked paths are added to $HOME/.local/bin according to XDG Base Directory Spe

Elran Shefer 8 Dec 07, 2022
The easiest way to create beautiful CLI for your programs.

The Yandere is a program written in Python3, allowing you to create your own beautiful CLI tool.

Billy 31 Dec 20, 2022
Terminal with builtin ortholinear keyboard and touch screen as a home automation interface.

OLKB-Terminal Terminal with builtin ortholinear keyboard and touch screen as a home automation interface. Features Step and STLs available for non-com

Jeff Eberl 50 Oct 07, 2022
Tmux Based Dropdown Dashboard For Python

sextans It's a private configuration and an ongoing experiment while I use Archlinux. A simple drop down dashboard based on tmux. It includes followin

秋葉 4 Dec 22, 2021
pwy - A simple weather tool.

A simple weather tool. I made this as a way for me to learn Python, API, and PyPi packaging. Name changed from wwy to pwy.

Clint 105 Dec 31, 2022
Fylm is a wonderful automated command line app for organizing your film media.

Overview Fylm is a wonderful automated command line app for organizing your film media. You can pronounce it Film or File 'em, whichever you like! It

Brandon Shelley 30 Dec 05, 2022
A python program to detect your emotion and suggest a playlist.

mood_music A python program to detect your emotion and suggest a playlist. This program is written in python using opencv,FER() and tensorflow This pr

Aditya_Sai 1 Jan 02, 2022
Analysis of a daily word game "Wordle"

Wordle Analysis of a daily word game "Wordle" https://www.powerlanguage.co.uk/wordle/ Description Worlde is a daily word game in which a player attemp

Bartek 1 Feb 07, 2022