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
Booky - A command line utility for bookmarking files on your terminal!

Booky A command line utility for bookmarking files for quick access With it you can: Bookmark and delete your (aliases of) files at demand Launch them

Pran 1 Sep 11, 2022
AWS Interactive CLI - Allows you to execute a complex AWS commands by chaining one or more other AWS CLI dependency

AWS Interactive CLI - Allows you to execute a complex AWS commands by chaining one or more other AWS CLI dependency

Rafael Torres 2 Dec 10, 2021
This is a command line program to play cricket made using Python.

SimpleCricketPython This is a command line program to play cricket made using Python How it works First you have the option of selecting whether you

Imira Randeniya 1 Sep 11, 2022
Python codecs extension featuring CLI tools for encoding/decoding anything

CodExt Encode/decode anything. This library extends the native codecs library (namely for adding new custom encodings and character mappings) and prov

Alex 210 Dec 30, 2022
Bonjour Software pypahe is a Python Package Helper command-line tool.

pypahe Bonjour Software pypahe is a Python Package Helper command-line tool. Requirements Docker runtime Usage print the latest available version of a

Bonjour Software 0 Aug 10, 2021
Present - A terminal-based presentation tool with colors and effects.

present A terminal-based presentation tool with colors and effects. You can also play a codio (pre-recorded code block) on a slide. present is built o

Vinayak Mehta 4.2k Jan 03, 2023
Another (unofficial) Qt CLI Installer on multi-platforms

Another Qt installer(aqt) Release: Documentation: Test status: and Coverage: This is a utility alternative to the official graphical Qt installer, for

Hiroshi Miura 528 Jan 02, 2023
WebApp Maker make web apps (Duh). It is open source and make with python and shell.

WebApp Maker make web apps (Duh). It is open source and make with python and shell. This app can take any website and turn it into an app. I highly recommend turning these few websites into webapps:

2 Jan 09, 2022
Postgres CLI with autocompletion and syntax highlighting

A REPL for Postgres This is a postgres client that does auto-completion and syntax highlighting. Home Page: http://pgcli.com MySQL Equivalent: http://

dbcli 10.8k Jan 02, 2023
Pymongo based CLI client, to run operation on existing databases and collections

Mongodb-Operations-Console Pymongo based CLI client, to run operation on existing databases and collections Program developed by Gustavo Wydler Azuaga

Gus 1 Dec 01, 2021
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
Python script to tabulate data formats like json, csv, html, etc

pyT PyT is a a command line tool and as well a library for visualising various data formats like: JSON HTML Table CSV XML, etc. Features Print table o

Mobolaji Abdulsalam 1 Dec 30, 2021
vimBrain is a brainfuck-based vim-inspired esoteric programming language.

vimBrain vimBrain is a brainfuck-based vim-inspired esoteric programming language. vimBrainPy Currently, the only interpreter available is written in

SalahDin Ahmed 3 May 08, 2022
Standalone script written in Python 3 for generating Reverse Shell one liner snippets and handles the communication between target and client using custom Netcat binaries

Standalone script written in Python 3 for generating Reverse Shell one liner snippets and handles the communication between target and client using custom Netcat binaries. It automates the boring stu

Yash Bhardwaj 3 Sep 27, 2022
Task-manager-CLI with Priority Modification

Task-manager-CLI with Priority Modification The functions for the app have been written in task.py file. 1. Install Node.js This project requires Node

1 Jan 21, 2022
Hack-All is a simple CLI tool that helps ethical-hackers to make a reverse connection without knowing the target device in use is it computer or phone

Hack-All is a simple CLI tool that helps ethical-hackers to make a reverse connection without knowing the target device in use is it computer

LightYagami17 5 Nov 22, 2022
lazy_table - a python-tabulate wrapper for producing tables from generators

A python-tabulate wrapper for producing tables from generators. Motivation lazy_table is useful when (i) each row of your table is generated by a poss

Parsiad Azimzadeh 52 Nov 12, 2022
A simple and easy-to-use CLI parse tool.

A simple and easy-to-use CLI parse tool.

AbsentM 1 Mar 04, 2022
A command line interface to interact with the Hypixel api allowing the user to get stats, leaderboards, etc

HyConsole is a way to get data on players and leaderboards from the Hypixel Minecraft server from the command line. Keep in mind I have no a

1 Feb 14, 2022
Code for "Salient Deconvolutional Networks, Aravindh Mahendran, Andrea Vedaldi, ECCV 2016"

deconvnet_analysis Code for "Salient Deconvolutional Networks, Aravindh Mahendran, Andrea Vedaldi, ECCV 2016" Parts of this code Generate figures in t

Aravindh Mahendran 12 Jan 25, 2021