ftui 0.1.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
ftui-0.1.1/.gitignore ADDED
@@ -0,0 +1,133 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ pip-wheel-metadata/
24
+ share/python-wheels/
25
+ *.egg-info/
26
+ .installed.cfg
27
+ *.egg
28
+ MANIFEST
29
+
30
+ # PyInstaller
31
+ # Usually these files are written by a python script from a template
32
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
33
+ *.manifest
34
+ *.spec
35
+
36
+ # Installer logs
37
+ pip-log.txt
38
+ pip-delete-this-directory.txt
39
+
40
+ # Unit test / coverage reports
41
+ htmlcov/
42
+ .tox/
43
+ .nox/
44
+ .coverage
45
+ .coverage.*
46
+ .cache
47
+ nosetests.xml
48
+ coverage.xml
49
+ *.cover
50
+ *.py,cover
51
+ .hypothesis/
52
+ .pytest_cache/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ target/
76
+
77
+ # Jupyter Notebook
78
+ .ipynb_checkpoints
79
+
80
+ # IPython
81
+ profile_default/
82
+ ipython_config.py
83
+
84
+ # pyenv
85
+ .python-version
86
+
87
+ # pipenv
88
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
89
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
90
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
91
+ # install all needed dependencies.
92
+ #Pipfile.lock
93
+
94
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
95
+ __pypackages__/
96
+
97
+ # Celery stuff
98
+ celerybeat-schedule
99
+ celerybeat.pid
100
+
101
+ # SageMath parsed files
102
+ *.sage.py
103
+
104
+ # Environments
105
+ .env
106
+ .venv
107
+ env/
108
+ venv/
109
+ ENV/
110
+ env.bak/
111
+ venv.bak/
112
+
113
+ # Spyder project settings
114
+ .spyderproject
115
+ .spyproject
116
+
117
+ # Rope project settings
118
+ .ropeproject
119
+
120
+ # mkdocs documentation
121
+ /site
122
+
123
+ # mypy
124
+ .mypy_cache/
125
+ .dmypy.json
126
+ dmypy.json
127
+
128
+ # Pyre type checker
129
+ .pyre/
130
+
131
+ # ignore local yaml, keep example
132
+ *.yaml
133
+ !example.yaml
ftui-0.1.1/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Robert Davey (@froggleston)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
ftui-0.1.1/PKG-INFO ADDED
@@ -0,0 +1,233 @@
1
+ Metadata-Version: 2.3
2
+ Name: ftui
3
+ Version: 0.1.1
4
+ Summary: Freqtrade TUI
5
+ Project-URL: Homepage, https://github.com/freqtrade/ftui
6
+ Project-URL: Documentation, https://freqtrade.io
7
+ Project-URL: Bug Tracker, https://github.com/freqtrade/ftui/issues
8
+ Author: froggleston
9
+ Author-email: Freqtrade Team <freqtrade@protonmail.com>
10
+ License: MIT
11
+ License-File: LICENSE
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Science/Research
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Operating System :: MacOS
16
+ Classifier: Operating System :: Microsoft :: Windows
17
+ Classifier: Operating System :: Unix
18
+ Classifier: Programming Language :: Python :: 3.9
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Topic :: Office/Business :: Financial :: Investment
23
+ Requires-Python: >=3.9
24
+ Requires-Dist: freqtrade-client
25
+ Requires-Dist: numpy
26
+ Requires-Dist: pandas
27
+ Requires-Dist: python-rapidjson
28
+ Requires-Dist: pyyaml
29
+ Requires-Dist: requests
30
+ Requires-Dist: textual-plotext
31
+ Requires-Dist: textual>=0.55.1
32
+ Description-Content-Type: text/markdown
33
+
34
+ # Welcome to FTUI
35
+
36
+ Freqtrade Textual User Interface (FTUI) is a text-based interface for the
37
+ [Freqtrade](https://github.com/freqtrade/freqtrade) bot.
38
+
39
+ FTUI is developed using the awesome [Textual](https://textual.textualize.io/) and
40
+ [Rich](https://rich.readthedocs.io/en/stable/introduction.html) frameworks.
41
+
42
+ - Version: 0.1.0
43
+ - Original concept and development: [@froggleston](https://github.com/froggleston)
44
+ - Github : [https://github.com/freqtrade/ftui](https://github.com/freqtrade/ftui)
45
+
46
+ ### FTUI is in an alpha state so there will be bugs and missing features
47
+
48
+ ![image](https://github.com/freqtrade/ftui/assets/1872302/60deca56-421b-436d-85e3-eea4befe4c37)
49
+
50
+ ## Getting Started
51
+
52
+ FTUI is designed to mimic the [FreqUI](https://github.com/freqtrade/frequi) interface as
53
+ much as possible, but the main difference is that FTUI does not currenty support
54
+ controlling a running bot. Rather FTUI acts as a lightweight passive monitoring system
55
+ for running Freqtrade bots.
56
+
57
+ ### Installation
58
+
59
+ Currently, FTUI is only supported on Linux systems. We hope to provide a Docker container
60
+ in future.
61
+
62
+ __Linux__
63
+
64
+ FTUI can be installed into an existing venv (e.g. a existing freqtrade venv) or in a
65
+ new directory, e.g. `~/ftui`, and venv as follows:
66
+
67
+ ```bash
68
+ $ mkdir ~/ftui
69
+ $ cd ftui
70
+ $ python3 -m venv .venv
71
+ $ source .venv/bin/activate
72
+ $ pip3 install -r requirements.txt
73
+ $ pip3 install -e .
74
+ ```
75
+
76
+ Once installed, a `config.yaml` needs to be provided to FTUI, so create it in your new
77
+ `ftui/` directory and edit it with a cli text editor like `nano`:
78
+
79
+ ```bash
80
+ $ touch config.yaml
81
+ $ nano config.yaml
82
+ ```
83
+
84
+ ### Configuration
85
+
86
+ FTUI is configured using a `config.yaml` file, where a list of running Freqtrade bots needs
87
+ to be provided. An example has been provided to get you started as below:
88
+
89
+ ```yaml
90
+ ---
91
+ servers:
92
+ - name : "botA"
93
+ username : "you"
94
+ password : "your_password"
95
+ ip : 1.2.3.4
96
+ port : 8080
97
+ - name : "botB"
98
+ username : "you"
99
+ password : "your_password"
100
+ ip : 1.2.3.4
101
+ port : 8081
102
+
103
+ - name : "botC"
104
+ username : "you"
105
+ password : "your_password"
106
+ ip : 5.6.7.8
107
+ port : 8080
108
+
109
+ colours:
110
+ pair_col: "purple"
111
+ bot_col: "yellow"
112
+ bot_start_col: "white"
113
+ trade_id_col: "white"
114
+ open_rate_col: "white"
115
+ current_rate_col: "white"
116
+ open_date_col: "cyan"
117
+ winrate_col: "cyan"
118
+ open_trade_num_col: "cyan"
119
+ closed_trade_num_col: "purple"
120
+ profit_chart_col: "orange"
121
+ link_col: "yellow"
122
+ candlestick_trade_text_col: "orange"
123
+ candlestick_trade_open_col: "blue"
124
+ candlestick_trade_close_col: "purple"
125
+
126
+ debug: False
127
+ show_fear: True
128
+ ```
129
+
130
+ Add a corresponding `servers` block into your own `config.yaml`, making note of the
131
+ indentation.
132
+
133
+ You can monitor bots across multiple servers easily in one FTUI interface. FTUI uses
134
+ the [freqtrade-client](https://pypi.org/project/freqtrade-client/) REST API client, so
135
+ you do not need to wrestle with any CORS setup as you have to do in FreqUI to access
136
+ multiple bots.
137
+
138
+ You can also set custom colours for some of the UI elements as per the example above.
139
+ The supported list of colour names can be found
140
+ [here](https://textual.textualize.io/api/color/#textual.color--named-colors). You can
141
+ leave the `colours` option out of the configuration and defaults will be used.
142
+
143
+ In future, the Settings screen will allow configuration of the `config.yaml` from inside the
144
+ FTUI interface.
145
+
146
+ ### Running FTUI
147
+
148
+ Once you have saved your `config.yaml` file, make sure you are in your ftui directory with your
149
+ venv activated, and run FTUI as below. FTUI will load each bot client, and preload trade data
150
+ into memory:
151
+
152
+ ```bash
153
+ $ ftui -y config.yaml
154
+
155
+ ███████╗████████╗██╗ ██╗██╗
156
+ ██╔════╝╚══██╔══╝██║ ██║██║
157
+ █████╗ ██║ ██║ ██║██║
158
+ ██╔══╝ ██║ ██║ ██║██║
159
+ ██║ ██║ ╚██████╔╝██║
160
+ ╚═╝ ╚═╝ ╚═════╝ ╚═╝
161
+
162
+ Freqtrade Textual User Interface (FTUI)
163
+
164
+ Run with:
165
+
166
+ ftui -y config.yaml
167
+
168
+ Setting up botA version 2024.1-dev-1b70e9b07 at http://1.2.3.4:8080: SampleStrategy running dry_run 5m
169
+ Setting up botB version 2024.1-dev-1b70e9b07 at http://1.2.3.4:8081: SampleStrategy running dry_run 5m
170
+ Setting up botC version 2024.1-dev-1b70e9b07 at http://5.6.7.8:8080: SampleStrategy running dry_run 5m
171
+
172
+ Starting FTUI - preloading all dataframes.......
173
+ ```
174
+
175
+ ### Screens
176
+
177
+ __Dashboard__
178
+
179
+ The main dashboard shows summary statistics from all bots. You can access the dashboard by
180
+ clicking the Dashboard button in the bottom left, or hitting the `D` key.
181
+
182
+ ![image](https://github.com/freqtrade/ftui/assets/1872302/53d9e2ca-1afd-4d0d-ace6-a7a5419a0397)
183
+
184
+ __View Bots__
185
+
186
+ The bot view allows selection of a running bot from the dropdown at the top of the screen.
187
+ Once selected, various information about the bot will be shown in the tabs in the bottom half
188
+ of the screen. You can access the View Bots screen by clicking the button in the bottom left,
189
+ or hitting the `B` key.
190
+
191
+ Open trades:
192
+ ![image](https://github.com/freqtrade/ftui/assets/1872302/ac12cf57-2235-4215-9463-8072ef9d9f02)
193
+
194
+ Closed trades:
195
+ ![image](https://github.com/freqtrade/ftui/assets/1872302/abdd62ef-f9dc-4eb3-b33e-05e4611141c5)
196
+
197
+ Tag summary:
198
+ ![image](https://github.com/freqtrade/ftui/assets/1872302/906f644b-f203-45a3-b821-c7b0d25a01e7)
199
+
200
+ Performance:
201
+ ![image](https://github.com/freqtrade/ftui/assets/1872302/16cce9a9-61f0-4caa-98f2-823b57a82ef8)
202
+
203
+ General bot information:
204
+ ![image](https://github.com/freqtrade/ftui/assets/1872302/6e597102-59f2-4456-b321-f5ce787ab89d)
205
+
206
+ Logs:
207
+ ![image](https://github.com/freqtrade/ftui/assets/1872302/1dcc8b43-7bd4-43ae-907f-0dc749a717ea)
208
+
209
+ Sysinfo:
210
+ ![image](https://github.com/freqtrade/ftui/assets/1872302/b1377e21-03f8-47a1-92eb-11b523753ad7)
211
+
212
+
213
+ __Settings__
214
+
215
+ The Settings screen shows the list of configured bots on the left hand side of the screen.
216
+ Other configuration options are shown on the right. You can access the Settings
217
+ screen by clicking the button in the bottom left, or hitting the `S` key.
218
+
219
+ In future, you will be able to show and hide bots in FTUI by selecting/deselecting them
220
+ in the bot list, as well as changing other configuration options. Currently this feature
221
+ is disabled in this alpha release.
222
+
223
+ __Help__
224
+
225
+ This README!
226
+
227
+ ## Known Issues
228
+
229
+ ### General
230
+
231
+ - When the bot is been running and you put your PC to sleep, the async worker will bug out
232
+ and intermittently crash the UI.
233
+ - The Settings screen save functionality is currently disabled.
ftui-0.1.1/README.md ADDED
@@ -0,0 +1,200 @@
1
+ # Welcome to FTUI
2
+
3
+ Freqtrade Textual User Interface (FTUI) is a text-based interface for the
4
+ [Freqtrade](https://github.com/freqtrade/freqtrade) bot.
5
+
6
+ FTUI is developed using the awesome [Textual](https://textual.textualize.io/) and
7
+ [Rich](https://rich.readthedocs.io/en/stable/introduction.html) frameworks.
8
+
9
+ - Version: 0.1.0
10
+ - Original concept and development: [@froggleston](https://github.com/froggleston)
11
+ - Github : [https://github.com/freqtrade/ftui](https://github.com/freqtrade/ftui)
12
+
13
+ ### FTUI is in an alpha state so there will be bugs and missing features
14
+
15
+ ![image](https://github.com/freqtrade/ftui/assets/1872302/60deca56-421b-436d-85e3-eea4befe4c37)
16
+
17
+ ## Getting Started
18
+
19
+ FTUI is designed to mimic the [FreqUI](https://github.com/freqtrade/frequi) interface as
20
+ much as possible, but the main difference is that FTUI does not currenty support
21
+ controlling a running bot. Rather FTUI acts as a lightweight passive monitoring system
22
+ for running Freqtrade bots.
23
+
24
+ ### Installation
25
+
26
+ Currently, FTUI is only supported on Linux systems. We hope to provide a Docker container
27
+ in future.
28
+
29
+ __Linux__
30
+
31
+ FTUI can be installed into an existing venv (e.g. a existing freqtrade venv) or in a
32
+ new directory, e.g. `~/ftui`, and venv as follows:
33
+
34
+ ```bash
35
+ $ mkdir ~/ftui
36
+ $ cd ftui
37
+ $ python3 -m venv .venv
38
+ $ source .venv/bin/activate
39
+ $ pip3 install -r requirements.txt
40
+ $ pip3 install -e .
41
+ ```
42
+
43
+ Once installed, a `config.yaml` needs to be provided to FTUI, so create it in your new
44
+ `ftui/` directory and edit it with a cli text editor like `nano`:
45
+
46
+ ```bash
47
+ $ touch config.yaml
48
+ $ nano config.yaml
49
+ ```
50
+
51
+ ### Configuration
52
+
53
+ FTUI is configured using a `config.yaml` file, where a list of running Freqtrade bots needs
54
+ to be provided. An example has been provided to get you started as below:
55
+
56
+ ```yaml
57
+ ---
58
+ servers:
59
+ - name : "botA"
60
+ username : "you"
61
+ password : "your_password"
62
+ ip : 1.2.3.4
63
+ port : 8080
64
+ - name : "botB"
65
+ username : "you"
66
+ password : "your_password"
67
+ ip : 1.2.3.4
68
+ port : 8081
69
+
70
+ - name : "botC"
71
+ username : "you"
72
+ password : "your_password"
73
+ ip : 5.6.7.8
74
+ port : 8080
75
+
76
+ colours:
77
+ pair_col: "purple"
78
+ bot_col: "yellow"
79
+ bot_start_col: "white"
80
+ trade_id_col: "white"
81
+ open_rate_col: "white"
82
+ current_rate_col: "white"
83
+ open_date_col: "cyan"
84
+ winrate_col: "cyan"
85
+ open_trade_num_col: "cyan"
86
+ closed_trade_num_col: "purple"
87
+ profit_chart_col: "orange"
88
+ link_col: "yellow"
89
+ candlestick_trade_text_col: "orange"
90
+ candlestick_trade_open_col: "blue"
91
+ candlestick_trade_close_col: "purple"
92
+
93
+ debug: False
94
+ show_fear: True
95
+ ```
96
+
97
+ Add a corresponding `servers` block into your own `config.yaml`, making note of the
98
+ indentation.
99
+
100
+ You can monitor bots across multiple servers easily in one FTUI interface. FTUI uses
101
+ the [freqtrade-client](https://pypi.org/project/freqtrade-client/) REST API client, so
102
+ you do not need to wrestle with any CORS setup as you have to do in FreqUI to access
103
+ multiple bots.
104
+
105
+ You can also set custom colours for some of the UI elements as per the example above.
106
+ The supported list of colour names can be found
107
+ [here](https://textual.textualize.io/api/color/#textual.color--named-colors). You can
108
+ leave the `colours` option out of the configuration and defaults will be used.
109
+
110
+ In future, the Settings screen will allow configuration of the `config.yaml` from inside the
111
+ FTUI interface.
112
+
113
+ ### Running FTUI
114
+
115
+ Once you have saved your `config.yaml` file, make sure you are in your ftui directory with your
116
+ venv activated, and run FTUI as below. FTUI will load each bot client, and preload trade data
117
+ into memory:
118
+
119
+ ```bash
120
+ $ ftui -y config.yaml
121
+
122
+ ███████╗████████╗██╗ ██╗██╗
123
+ ██╔════╝╚══██╔══╝██║ ██║██║
124
+ █████╗ ██║ ██║ ██║██║
125
+ ██╔══╝ ██║ ██║ ██║██║
126
+ ██║ ██║ ╚██████╔╝██║
127
+ ╚═╝ ╚═╝ ╚═════╝ ╚═╝
128
+
129
+ Freqtrade Textual User Interface (FTUI)
130
+
131
+ Run with:
132
+
133
+ ftui -y config.yaml
134
+
135
+ Setting up botA version 2024.1-dev-1b70e9b07 at http://1.2.3.4:8080: SampleStrategy running dry_run 5m
136
+ Setting up botB version 2024.1-dev-1b70e9b07 at http://1.2.3.4:8081: SampleStrategy running dry_run 5m
137
+ Setting up botC version 2024.1-dev-1b70e9b07 at http://5.6.7.8:8080: SampleStrategy running dry_run 5m
138
+
139
+ Starting FTUI - preloading all dataframes.......
140
+ ```
141
+
142
+ ### Screens
143
+
144
+ __Dashboard__
145
+
146
+ The main dashboard shows summary statistics from all bots. You can access the dashboard by
147
+ clicking the Dashboard button in the bottom left, or hitting the `D` key.
148
+
149
+ ![image](https://github.com/freqtrade/ftui/assets/1872302/53d9e2ca-1afd-4d0d-ace6-a7a5419a0397)
150
+
151
+ __View Bots__
152
+
153
+ The bot view allows selection of a running bot from the dropdown at the top of the screen.
154
+ Once selected, various information about the bot will be shown in the tabs in the bottom half
155
+ of the screen. You can access the View Bots screen by clicking the button in the bottom left,
156
+ or hitting the `B` key.
157
+
158
+ Open trades:
159
+ ![image](https://github.com/freqtrade/ftui/assets/1872302/ac12cf57-2235-4215-9463-8072ef9d9f02)
160
+
161
+ Closed trades:
162
+ ![image](https://github.com/freqtrade/ftui/assets/1872302/abdd62ef-f9dc-4eb3-b33e-05e4611141c5)
163
+
164
+ Tag summary:
165
+ ![image](https://github.com/freqtrade/ftui/assets/1872302/906f644b-f203-45a3-b821-c7b0d25a01e7)
166
+
167
+ Performance:
168
+ ![image](https://github.com/freqtrade/ftui/assets/1872302/16cce9a9-61f0-4caa-98f2-823b57a82ef8)
169
+
170
+ General bot information:
171
+ ![image](https://github.com/freqtrade/ftui/assets/1872302/6e597102-59f2-4456-b321-f5ce787ab89d)
172
+
173
+ Logs:
174
+ ![image](https://github.com/freqtrade/ftui/assets/1872302/1dcc8b43-7bd4-43ae-907f-0dc749a717ea)
175
+
176
+ Sysinfo:
177
+ ![image](https://github.com/freqtrade/ftui/assets/1872302/b1377e21-03f8-47a1-92eb-11b523753ad7)
178
+
179
+
180
+ __Settings__
181
+
182
+ The Settings screen shows the list of configured bots on the left hand side of the screen.
183
+ Other configuration options are shown on the right. You can access the Settings
184
+ screen by clicking the button in the bottom left, or hitting the `S` key.
185
+
186
+ In future, you will be able to show and hide bots in FTUI by selecting/deselecting them
187
+ in the bot list, as well as changing other configuration options. Currently this feature
188
+ is disabled in this alpha release.
189
+
190
+ __Help__
191
+
192
+ This README!
193
+
194
+ ## Known Issues
195
+
196
+ ### General
197
+
198
+ - When the bot is been running and you put your PC to sleep, the async worker will bug out
199
+ and intermittently crash the UI.
200
+ - The Settings screen save functionality is currently disabled.
@@ -0,0 +1 @@
1
+ __version__ = "0.1.1"