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
Logic-Sim - A clone of 'Digital Logic Sim' from Sebastian Lague

Logic Simulator This is a clone of 'Digital Logic Sim' from Sebastian Lague. But

Ethan 1 Feb 01, 2022
Tstock - Check stocks from the terminal

tstock - Check stocks from the terminal! 📈 tstock is a tool to easily generate stock charts from the command line. Just type tstock aapl to get a 3 m

Gabe Banks 502 Dec 30, 2022
As easy as /aitch-tee-tee-pie/ 🥧 Modern, user-friendly command-line HTTP client for the API era. JSON support, colors, sessions, downloads, plugins & more. https://twitter.com/httpie

HTTPie: human-friendly CLI HTTP client for the API era HTTPie (pronounced aitch-tee-tee-pie) is a command-line HTTP client. Its goal is to make CLI in

HTTPie 25.4k Dec 30, 2022
A lightweight terminal-based password manager coded with Python using SQLCipher for SQLite database encryption.

password-manager A lightweight terminal-based password manager coded with Python using SQLCipher for SQLite database encryption. Screenshot Pre-requis

Leonardo de Araujo 15 Oct 15, 2022
An interactive aquarium for your terminal.

sipedon An interactive aquarium for your terminal, written using pytermgui. The project got its name from the Common Watersnake, also known as Nerodia

17 Nov 07, 2022
Tools hacking termux in the name ant-attack

Hello friends, I am ama.player0000. Web developer, software, Android command line (termux). (1)=Well, ant-attack tool is a tool to attack sites and disable them. (2)=You can use those CCTV servers, s

༺AMA.PLAYER༻ 1 Dec 17, 2021
Bad Apple printed out on the console with Python!

Bad Apple printed out on the console with Python!

CalvinLoke 186 Dec 01, 2022
Patool is a portable command line archive file manager

Patool Patool is an archive file manager. Various archive formats can be created, extracted, tested, listed, searched, repacked and compared with pato

318 Jan 04, 2023
A Python command-line utility for validating that the outputs of a given Declarative Form Azure Portal UI JSON template map to the input parameters of a given ARM Deployment Template JSON template

A Python command-line utility for validating that the outputs of a given Declarative Form Azure Portal UI JSON template map to the input parameters of a given ARM Deployment Template JSON template

Glenn Musa 1 Feb 03, 2022
CLabel is a terminal-based cluster labeling tool that allows you to explore text data interactively and label clusters based on reviewing that data.

CLabel is a terminal-based cluster labeling tool that allows you to explore text data interactively and label clusters based on reviewing that

Peter Baumgartner 29 Aug 09, 2022
A simple cli utility for importing or exporting dashboard json definitions using the Grafana HTTP API.

P4CMD 🌴 A Python Perforce package that doesn't bring in any other packages to work. Relies on p4cli installed on the system. p4cmd The p4cmd module h

Beam Connectivity 31 Jan 06, 2023
A multipurpose discord bot with more than 220 commands

Welcome WM Bot A advanced bot with more than 220 commands to fit your needs Explore the commands » View Demo · Report Bug · Request Feature Table of C

Wasi Master 12 Dec 16, 2022
Konsave lets use save your KDE Plasma customizatios and restore them very easily!

Konsave (Save Plasma Customization) A CLI program that will let you save and apply your KDE Plasma customizations with just one command! Als

439 Jan 02, 2023
Enlighten Progress Bar is a console progress bar library for Python.

Overview Enlighten Progress Bar is a console progress bar library for Python. The main advantage of Enlighten is it allows writing to stdout and stder

Rockhopper Technologies 265 Dec 28, 2022
Declarative CLIs with argparse and dataclasses

argparse_dataclass Declarative CLIs with argparse and dataclasses. Features Features marked with a ✓ are currently implemented; features marked with a

Mike DePalatis 29 Dec 06, 2022
WazirX Portfolio Tracker on your Terminal!

If you have been investing in crypto in India, there is a very good chance that you are using WazirX. If you are using WazirX, then you definitely know that there is no P&L report, no green arrows no

Raunit 15 Jan 10, 2022
ForX - get forex quotes from the terminal

A command line tool for checking exchange rates between currencies, both crypto and fiat.

Gabe Banks 52 Dec 10, 2022
Custom 64 bit shellcode encoder that evades detection and removes some common badchars (\x00\x0a\x0d\x20)

x64-shellcode-encoder Custom 64 bit shellcode encoder that evades detection and removes some common badchars (\x00\x0a\x0d\x20) Usage Using a generato

Cole Houston 2 Jan 26, 2022
A terminal client for connecting to hack.chat servers

A terminal client for connecting to hack.chat servers.

V9 2 Sep 21, 2022
Unofficial Open Corporates CLI: OpenCorporates is a website that shares data on corporations under the copyleft Open Database License. This is an unofficial open corporates python command line tool.

Unofficial Open Corporates CLI OpenCorporates is a website that shares data on corporations under the copyleft Open Database License. This is an unoff

Richard Mwewa 30 Sep 08, 2022