Elffuss BraidHub

kikocis/freqtrade public

develop · 32.3 KiBRenderedRawPermalink
1# Utility Subcommands
2
3Besides the Live-Trade and Dry-Run run modes, the `backtesting`, `edge` and `hyperopt` optimization subcommands, and the `download-data` subcommand which prepares historical data, the bot contains a number of utility subcommands. They are described in this section.
4
5## Create userdir
6
7Creates the directory structure to hold your files for freqtrade.
8Will also create strategy and hyperopt examples for you to get started.
9Can be used multiple times - using `--reset` will reset the sample strategy and hyperopt files to their default state.
10
11```
12usage: freqtrade create-userdir [-h] [--userdir PATH] [--reset]
13
14optional arguments:
15 -h, --help show this help message and exit
16 --userdir PATH, --user-data-dir PATH
17 Path to userdata directory.
18 --reset Reset sample files to their original state.
19```
20
21!!! Warning
22 Using `--reset` may result in loss of data, since this will overwrite all sample files without asking again.
23
24```
25├── backtest_results
26├── data
27├── hyperopt_results
28├── hyperopts
29│   ├── sample_hyperopt_advanced.py
30│   ├── sample_hyperopt_loss.py
31│   └── sample_hyperopt.py
32├── notebooks
33│   └── strategy_analysis_example.ipynb
34├── plot
35└── strategies
36 └── sample_strategy.py
37```
38
39## Create new config
40
41Creates a new configuration file, asking some questions which are important selections for a configuration.
42
43```
44usage: freqtrade new-config [-h] [-c PATH]
45
46optional arguments:
47 -h, --help show this help message and exit
48 -c PATH, --config PATH
49 Specify configuration file (default: `config.json`). Multiple --config options may be used. Can be set to `-`
50 to read config from stdin.
51```
52
53!!! Warning
54 Only vital questions are asked. Freqtrade offers a lot more configuration possibilities, which are listed in the [Configuration documentation](configuration.md#configuration-parameters)
55
56### Create config examples
57
58```
59$ freqtrade new-config --config config_binance.json
60
61? Do you want to enable Dry-run (simulated trades)? Yes
62? Please insert your stake currency: BTC
63? Please insert your stake amount: 0.05
64? Please insert max_open_trades (Integer or 'unlimited'): 3
65? Please insert your desired timeframe (e.g. 5m): 5m
66? Please insert your display Currency (for reporting): USD
67? Select exchange binance
68? Do you want to enable Telegram? No
69```
70
71## Create new strategy
72
73Creates a new strategy from a template similar to SampleStrategy.
74The file will be named inline with your class name, and will not overwrite existing files.
75
76Results will be located in `user_data/strategies/<strategyclassname>.py`.
77
78``` output
79usage: freqtrade new-strategy [-h] [--userdir PATH] [-s NAME]
80 [--template {full,minimal,advanced}]
81
82optional arguments:
83 -h, --help show this help message and exit
84 --userdir PATH, --user-data-dir PATH
85 Path to userdata directory.
86 -s NAME, --strategy NAME
87 Specify strategy class name which will be used by the
88 bot.
89 --template {full,minimal,advanced}
90 Use a template which is either `minimal`, `full`
91 (containing multiple sample indicators) or `advanced`.
92 Default: `full`.
93
94```
95
96### Sample usage of new-strategy
97
98```bash
99freqtrade new-strategy --strategy AwesomeStrategy
100```
101
102With custom user directory
103
104```bash
105freqtrade new-strategy --userdir ~/.freqtrade/ --strategy AwesomeStrategy
106```
107
108Using the advanced template (populates all optional functions and methods)
109
110```bash
111freqtrade new-strategy --strategy AwesomeStrategy --template advanced
112```
113
114## Create new hyperopt
115
116Creates a new hyperopt from a template similar to SampleHyperopt.
117The file will be named inline with your class name, and will not overwrite existing files.
118
119Results will be located in `user_data/hyperopts/<classname>.py`.
120
121``` output
122usage: freqtrade new-hyperopt [-h] [--userdir PATH] [--hyperopt NAME]
123 [--template {full,minimal,advanced}]
124
125optional arguments:
126 -h, --help show this help message and exit
127 --userdir PATH, --user-data-dir PATH
128 Path to userdata directory.
129 --hyperopt NAME Specify hyperopt class name which will be used by the
130 bot.
131 --template {full,minimal,advanced}
132 Use a template which is either `minimal`, `full`
133 (containing multiple sample indicators) or `advanced`.
134 Default: `full`.
135```
136
137### Sample usage of new-hyperopt
138
139```bash
140freqtrade new-hyperopt --hyperopt AwesomeHyperopt
141```
142
143With custom user directory
144
145```bash
146freqtrade new-hyperopt --userdir ~/.freqtrade/ --hyperopt AwesomeHyperopt
147```
148
149## List Strategies and List Hyperopts
150
151Use the `list-strategies` subcommand to see all strategies in one particular directory and the `list-hyperopts` subcommand to list custom Hyperopts.
152
153These subcommands are useful for finding problems in your environment with loading strategies or hyperopt classes: modules with strategies or hyperopt classes that contain errors and failed to load are printed in red (LOAD FAILED), while strategies or hyperopt classes with duplicate names are printed in yellow (DUPLICATE NAME).
154
155```
156usage: freqtrade list-strategies [-h] [-v] [--logfile FILE] [-V] [-c PATH]
157 [-d PATH] [--userdir PATH]
158 [--strategy-path PATH] [-1] [--no-color]
159
160optional arguments:
161 -h, --help show this help message and exit
162 --strategy-path PATH Specify additional strategy lookup path.
163 -1, --one-column Print output in one column.
164 --no-color Disable colorization of hyperopt results. May be
165 useful if you are redirecting output to a file.
166
167Common arguments:
168 -v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
169 --logfile FILE Log to the file specified. Special values are:
170 'syslog', 'journald'. See the documentation for more
171 details.
172 -V, --version show program's version number and exit
173 -c PATH, --config PATH
174 Specify configuration file (default: `config.json`).
175 Multiple --config options may be used. Can be set to
176 `-` to read config from stdin.
177 -d PATH, --datadir PATH
178 Path to directory with historical backtesting data.
179 --userdir PATH, --user-data-dir PATH
180 Path to userdata directory.
181```
182```
183usage: freqtrade list-hyperopts [-h] [-v] [--logfile FILE] [-V] [-c PATH]
184 [-d PATH] [--userdir PATH]
185 [--hyperopt-path PATH] [-1] [--no-color]
186
187optional arguments:
188 -h, --help show this help message and exit
189 --hyperopt-path PATH Specify additional lookup path for Hyperopt and
190 Hyperopt Loss functions.
191 -1, --one-column Print output in one column.
192 --no-color Disable colorization of hyperopt results. May be
193 useful if you are redirecting output to a file.
194
195Common arguments:
196 -v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
197 --logfile FILE Log to the file specified. Special values are:
198 'syslog', 'journald'. See the documentation for more
199 details.
200 -V, --version show program's version number and exit
201 -c PATH, --config PATH
202 Specify configuration file (default: `config.json`).
203 Multiple --config options may be used. Can be set to
204 `-` to read config from stdin.
205 -d PATH, --datadir PATH
206 Path to directory with historical backtesting data.
207 --userdir PATH, --user-data-dir PATH
208 Path to userdata directory.
209```
210
211!!! Warning
212 Using these commands will try to load all python files from a directory. This can be a security risk if untrusted files reside in this directory, since all module-level code is executed.
213
214Example: Search default strategies and hyperopts directories (within the default userdir).
215
216``` bash
217freqtrade list-strategies
218freqtrade list-hyperopts
219```
220
221Example: Search strategies and hyperopts directory within the userdir.
222
223``` bash
224freqtrade list-strategies --userdir ~/.freqtrade/
225freqtrade list-hyperopts --userdir ~/.freqtrade/
226```
227
228Example: Search dedicated strategy path.
229
230``` bash
231freqtrade list-strategies --strategy-path ~/.freqtrade/strategies/
232```
233
234Example: Search dedicated hyperopt path.
235
236``` bash
237freqtrade list-hyperopt --hyperopt-path ~/.freqtrade/hyperopts/
238```
239
240## List Exchanges
241
242Use the `list-exchanges` subcommand to see the exchanges available for the bot.
243
244```
245usage: freqtrade list-exchanges [-h] [-1] [-a]
246
247optional arguments:
248 -h, --help show this help message and exit
249 -1, --one-column Print output in one column.
250 -a, --all Print all exchanges known to the ccxt library.
251```
252
253* Example: see exchanges available for the bot:
254```
255$ freqtrade list-exchanges
256Exchanges available for Freqtrade:
257Exchange name Valid reason
258--------------- ------- --------------------------------------------
259aax True
260ascendex True missing opt: fetchMyTrades
261bequant True
262bibox True
263bigone True
264binance True
265binanceus True
266bitbank True missing opt: fetchTickers
267bitcoincom True
268bitfinex True
269bitforex True missing opt: fetchMyTrades, fetchTickers
270bitget True
271bithumb True missing opt: fetchMyTrades
272bitkk True missing opt: fetchMyTrades
273bitmart True
274bitmax True missing opt: fetchMyTrades
275bitpanda True
276bittrex True
277bitvavo True
278bitz True missing opt: fetchMyTrades
279btcalpha True missing opt: fetchTicker, fetchTickers
280btcmarkets True missing opt: fetchTickers
281buda True missing opt: fetchMyTrades, fetchTickers
282bw True missing opt: fetchMyTrades, fetchL2OrderBook
283bybit True
284bytetrade True
285cdax True
286cex True missing opt: fetchMyTrades
287coinbaseprime True missing opt: fetchTickers
288coinbasepro True missing opt: fetchTickers
289coinex True
290crex24 True
291deribit True
292digifinex True
293equos True missing opt: fetchTicker, fetchTickers
294eterbase True
295fcoin True missing opt: fetchMyTrades, fetchTickers
296fcoinjp True missing opt: fetchMyTrades, fetchTickers
297ftx True
298gateio True
299gemini True
300gopax True
301hbtc True
302hitbtc True
303huobijp True
304huobipro True
305idex True
306kraken True
307kucoin True
308lbank True missing opt: fetchMyTrades
309mercado True missing opt: fetchTickers
310ndax True missing opt: fetchTickers
311novadax True
312okcoin True
313okex True
314probit True
315qtrade True
316stex True
317timex True
318upbit True missing opt: fetchMyTrades
319vcc True
320zb True missing opt: fetchMyTrades
321
322```
323
324!!! Note "missing opt exchanges"
325 Values with "missing opt:" might need special configuration (e.g. using orderbook if `fetchTickers` is missing) - but should in theory work (although we cannot guarantee they will).
326
327* Example: see all exchanges supported by the ccxt library (including 'bad' ones, i.e. those that are known to not work with Freqtrade):
328```
329$ freqtrade list-exchanges -a
330All exchanges supported by the ccxt library:
331Exchange name Valid reason
332------------------ ------- ---------------------------------------------------------------------------------------
333aax True
334aofex False missing: fetchOrder
335ascendex True missing opt: fetchMyTrades
336bequant True
337bibox True
338bigone True
339binance True
340binanceus True
341bit2c False missing: fetchOrder, fetchOHLCV
342bitbank True missing opt: fetchTickers
343bitbay False missing: fetchOrder
344bitcoincom True
345bitfinex True
346bitfinex2 False missing: fetchOrder
347bitflyer False missing: fetchOrder, fetchOHLCV
348bitforex True missing opt: fetchMyTrades, fetchTickers
349bitget True
350bithumb True missing opt: fetchMyTrades
351bitkk True missing opt: fetchMyTrades
352bitmart True
353bitmax True missing opt: fetchMyTrades
354bitmex False Various reasons.
355bitpanda True
356bitso False missing: fetchOHLCV
357bitstamp False Does not provide history. Details in https://github.com/freqtrade/freqtrade/issues/1983
358bitstamp1 False missing: fetchOrder, fetchOHLCV
359bittrex True
360bitvavo True
361bitz True missing opt: fetchMyTrades
362bl3p False missing: fetchOrder, fetchOHLCV
363bleutrade False missing: fetchOrder
364braziliex False missing: fetchOHLCV
365btcalpha True missing opt: fetchTicker, fetchTickers
366btcbox False missing: fetchOHLCV
367btcmarkets True missing opt: fetchTickers
368btctradeua False missing: fetchOrder, fetchOHLCV
369btcturk False missing: fetchOrder
370buda True missing opt: fetchMyTrades, fetchTickers
371bw True missing opt: fetchMyTrades, fetchL2OrderBook
372bybit True
373bytetrade True
374cdax True
375cex True missing opt: fetchMyTrades
376chilebit False missing: fetchOrder, fetchOHLCV
377coinbase False missing: fetchOrder, cancelOrder, createOrder, fetchOHLCV
378coinbaseprime True missing opt: fetchTickers
379coinbasepro True missing opt: fetchTickers
380coincheck False missing: fetchOrder, fetchOHLCV
381coinegg False missing: fetchOHLCV
382coinex True
383coinfalcon False missing: fetchOHLCV
384coinfloor False missing: fetchOrder, fetchOHLCV
385coingi False missing: fetchOrder, fetchOHLCV
386coinmarketcap False missing: fetchOrder, cancelOrder, createOrder, fetchBalance, fetchOHLCV
387coinmate False missing: fetchOHLCV
388coinone False missing: fetchOHLCV
389coinspot False missing: fetchOrder, cancelOrder, fetchOHLCV
390crex24 True
391currencycom False missing: fetchOrder
392delta False missing: fetchOrder
393deribit True
394digifinex True
395equos True missing opt: fetchTicker, fetchTickers
396eterbase True
397exmo False missing: fetchOrder
398exx False missing: fetchOHLCV
399fcoin True missing opt: fetchMyTrades, fetchTickers
400fcoinjp True missing opt: fetchMyTrades, fetchTickers
401flowbtc False missing: fetchOrder, fetchOHLCV
402foxbit False missing: fetchOrder, fetchOHLCV
403ftx True
404gateio True
405gemini True
406gopax True
407hbtc True
408hitbtc True
409hollaex False missing: fetchOrder
410huobijp True
411huobipro True
412idex True
413independentreserve False missing: fetchOHLCV
414indodax False missing: fetchOHLCV
415itbit False missing: fetchOHLCV
416kraken True
417kucoin True
418kuna False missing: fetchOHLCV
419lakebtc False missing: fetchOrder, fetchOHLCV
420latoken False missing: fetchOrder, fetchOHLCV
421lbank True missing opt: fetchMyTrades
422liquid False missing: fetchOHLCV
423luno False missing: fetchOHLCV
424lykke False missing: fetchOHLCV
425mercado True missing opt: fetchTickers
426mixcoins False missing: fetchOrder, fetchOHLCV
427ndax True missing opt: fetchTickers
428novadax True
429oceanex False missing: fetchOHLCV
430okcoin True
431okex True
432paymium False missing: fetchOrder, fetchOHLCV
433phemex False Does not provide history.
434poloniex False missing: fetchOrder
435probit True
436qtrade True
437rightbtc False missing: fetchOrder
438ripio False missing: fetchOHLCV
439southxchange False missing: fetchOrder, fetchOHLCV
440stex True
441surbitcoin False missing: fetchOrder, fetchOHLCV
442therock False missing: fetchOHLCV
443tidebit False missing: fetchOrder
444tidex False missing: fetchOHLCV
445timex True
446upbit True missing opt: fetchMyTrades
447vbtc False missing: fetchOrder, fetchOHLCV
448vcc True
449wavesexchange False missing: fetchOrder
450whitebit False missing: fetchOrder, cancelOrder, createOrder, fetchBalance
451xbtce False missing: fetchOrder, fetchOHLCV
452xena False missing: fetchOrder
453yobit False missing: fetchOHLCV
454zaif False missing: fetchOrder, fetchOHLCV
455zb True missing opt: fetchMyTrades
456```
457
458## List Timeframes
459
460Use the `list-timeframes` subcommand to see the list of timeframes available for the exchange.
461
462```
463usage: freqtrade list-timeframes [-h] [-v] [--logfile FILE] [-V] [-c PATH] [-d PATH] [--userdir PATH] [--exchange EXCHANGE] [-1]
464
465optional arguments:
466 -h, --help show this help message and exit
467 --exchange EXCHANGE Exchange name (default: `bittrex`). Only valid if no config is provided.
468 -1, --one-column Print output in one column.
469
470Common arguments:
471 -v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
472 --logfile FILE Log to the file specified. Special values are: 'syslog', 'journald'. See the documentation for more details.
473 -V, --version show program's version number and exit
474 -c PATH, --config PATH
475 Specify configuration file (default: `config.json`). Multiple --config options may be used. Can be set to `-`
476 to read config from stdin.
477 -d PATH, --datadir PATH
478 Path to directory with historical backtesting data.
479 --userdir PATH, --user-data-dir PATH
480 Path to userdata directory.
481
482```
483
484* Example: see the timeframes for the 'binance' exchange, set in the configuration file:
485
486```
487$ freqtrade list-timeframes -c config_binance.json
488...
489Timeframes available for the exchange `binance`: 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M
490```
491
492* Example: enumerate exchanges available for Freqtrade and print timeframes supported by each of them:
493```
494$ for i in `freqtrade list-exchanges -1`; do freqtrade list-timeframes --exchange $i; done
495```
496
497## List pairs/list markets
498
499The `list-pairs` and `list-markets` subcommands allow to see the pairs/markets available on exchange.
500
501Pairs are markets with the '/' character between the base currency part and the quote currency part in the market symbol.
502For example, in the 'ETH/BTC' pair 'ETH' is the base currency, while 'BTC' is the quote currency.
503
504For pairs traded by Freqtrade the pair quote currency is defined by the value of the `stake_currency` configuration setting.
505
506You can print info about any pair/market with these subcommands - and you can filter output by quote-currency using `--quote BTC`, or by base-currency using `--base ETH` options correspondingly.
507
508These subcommands have same usage and same set of available options:
509
510```
511usage: freqtrade list-markets [-h] [-v] [--logfile FILE] [-V] [-c PATH]
512 [-d PATH] [--userdir PATH] [--exchange EXCHANGE]
513 [--print-list] [--print-json] [-1] [--print-csv]
514 [--base BASE_CURRENCY [BASE_CURRENCY ...]]
515 [--quote QUOTE_CURRENCY [QUOTE_CURRENCY ...]]
516 [-a]
517
518usage: freqtrade list-pairs [-h] [-v] [--logfile FILE] [-V] [-c PATH]
519 [-d PATH] [--userdir PATH] [--exchange EXCHANGE]
520 [--print-list] [--print-json] [-1] [--print-csv]
521 [--base BASE_CURRENCY [BASE_CURRENCY ...]]
522 [--quote QUOTE_CURRENCY [QUOTE_CURRENCY ...]] [-a]
523
524optional arguments:
525 -h, --help show this help message and exit
526 --exchange EXCHANGE Exchange name (default: `bittrex`). Only valid if no
527 config is provided.
528 --print-list Print list of pairs or market symbols. By default data
529 is printed in the tabular format.
530 --print-json Print list of pairs or market symbols in JSON format.
531 -1, --one-column Print output in one column.
532 --print-csv Print exchange pair or market data in the csv format.
533 --base BASE_CURRENCY [BASE_CURRENCY ...]
534 Specify base currency(-ies). Space-separated list.
535 --quote QUOTE_CURRENCY [QUOTE_CURRENCY ...]
536 Specify quote currency(-ies). Space-separated list.
537 -a, --all Print all pairs or market symbols. By default only
538 active ones are shown.
539
540Common arguments:
541 -v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
542 --logfile FILE Log to the file specified. Special values are:
543 'syslog', 'journald'. See the documentation for more
544 details.
545 -V, --version show program's version number and exit
546 -c PATH, --config PATH
547 Specify configuration file (default: `config.json`).
548 Multiple --config options may be used. Can be set to
549 `-` to read config from stdin.
550 -d PATH, --datadir PATH
551 Path to directory with historical backtesting data.
552 --userdir PATH, --user-data-dir PATH
553 Path to userdata directory.
554
555```
556
557By default, only active pairs/markets are shown. Active pairs/markets are those that can currently be traded
558on the exchange. The see the list of all pairs/markets (not only the active ones), use the `-a`/`-all` option.
559
560Pairs/markets are sorted by its symbol string in the printed output.
561
562### Examples
563
564* Print the list of active pairs with quote currency USD on exchange, specified in the default
565configuration file (i.e. pairs on the "Bittrex" exchange) in JSON format:
566
567```
568$ freqtrade list-pairs --quote USD --print-json
569```
570
571* Print the list of all pairs on the exchange, specified in the `config_binance.json` configuration file
572(i.e. on the "Binance" exchange) with base currencies BTC or ETH and quote currencies USDT or USD, as the
573human-readable list with summary:
574
575```
576$ freqtrade list-pairs -c config_binance.json --all --base BTC ETH --quote USDT USD --print-list
577```
578
579* Print all markets on exchange "Kraken", in the tabular format:
580
581```
582$ freqtrade list-markets --exchange kraken --all
583```
584
585## Test pairlist
586
587Use the `test-pairlist` subcommand to test the configuration of [dynamic pairlists](plugins.md#pairlists).
588
589Requires a configuration with specified `pairlists` attribute.
590Can be used to generate static pairlists to be used during backtesting / hyperopt.
591
592```
593usage: freqtrade test-pairlist [-h] [-c PATH]
594 [--quote QUOTE_CURRENCY [QUOTE_CURRENCY ...]]
595 [-1] [--print-json]
596
597optional arguments:
598 -h, --help show this help message and exit
599 -c PATH, --config PATH
600 Specify configuration file (default: `config.json`).
601 Multiple --config options may be used. Can be set to
602 `-` to read config from stdin.
603 --quote QUOTE_CURRENCY [QUOTE_CURRENCY ...]
604 Specify quote currency(-ies). Space-separated list.
605 -1, --one-column Print output in one column.
606 --print-json Print list of pairs or market symbols in JSON format.
607```
608
609### Examples
610
611Show whitelist when using a [dynamic pairlist](plugins.md#pairlists).
612
613```
614freqtrade test-pairlist --config config.json --quote USDT BTC
615```
616
617## List Hyperopt results
618
619You can list the hyperoptimization epochs the Hyperopt module evaluated previously with the `hyperopt-list` sub-command.
620
621```
622usage: freqtrade hyperopt-list [-h] [-v] [--logfile FILE] [-V] [-c PATH]
623 [-d PATH] [--userdir PATH] [--best]
624 [--profitable] [--min-trades INT]
625 [--max-trades INT] [--min-avg-time FLOAT]
626 [--max-avg-time FLOAT] [--min-avg-profit FLOAT]
627 [--max-avg-profit FLOAT]
628 [--min-total-profit FLOAT]
629 [--max-total-profit FLOAT]
630 [--min-objective FLOAT] [--max-objective FLOAT]
631 [--no-color] [--print-json] [--no-details]
632 [--hyperopt-filename PATH] [--export-csv FILE]
633
634optional arguments:
635 -h, --help show this help message and exit
636 --best Select only best epochs.
637 --profitable Select only profitable epochs.
638 --min-trades INT Select epochs with more than INT trades.
639 --max-trades INT Select epochs with less than INT trades.
640 --min-avg-time FLOAT Select epochs above average time.
641 --max-avg-time FLOAT Select epochs below average time.
642 --min-avg-profit FLOAT
643 Select epochs above average profit.
644 --max-avg-profit FLOAT
645 Select epochs below average profit.
646 --min-total-profit FLOAT
647 Select epochs above total profit.
648 --max-total-profit FLOAT
649 Select epochs below total profit.
650 --min-objective FLOAT
651 Select epochs above objective.
652 --max-objective FLOAT
653 Select epochs below objective.
654 --no-color Disable colorization of hyperopt results. May be
655 useful if you are redirecting output to a file.
656 --print-json Print output in JSON format.
657 --no-details Do not print best epoch details.
658 --hyperopt-filename FILENAME
659 Hyperopt result filename.Example: `--hyperopt-
660 filename=hyperopt_results_2020-09-27_16-20-48.pickle`
661 --export-csv FILE Export to CSV-File. This will disable table print.
662 Example: --export-csv hyperopt.csv
663
664Common arguments:
665 -v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
666 --logfile FILE Log to the file specified. Special values are:
667 'syslog', 'journald'. See the documentation for more
668 details.
669 -V, --version show program's version number and exit
670 -c PATH, --config PATH
671 Specify configuration file (default:
672 `userdir/config.json` or `config.json` whichever
673 exists). Multiple --config options may be used. Can be
674 set to `-` to read config from stdin.
675 -d PATH, --datadir PATH
676 Path to directory with historical backtesting data.
677 --userdir PATH, --user-data-dir PATH
678 Path to userdata directory.
679```
680
681!!! Note
682 `hyperopt-list` will automatically use the latest available hyperopt results file.
683 You can override this using the `--hyperopt-filename` argument, and specify another, available filename (without path!).
684
685### Examples
686
687List all results, print details of the best result at the end:
688```
689freqtrade hyperopt-list
690```
691
692List only epochs with positive profit. Do not print the details of the best epoch, so that the list can be iterated in a script:
693```
694freqtrade hyperopt-list --profitable --no-details
695```
696
697## Show details of Hyperopt results
698
699You can show the details of any hyperoptimization epoch previously evaluated by the Hyperopt module with the `hyperopt-show` subcommand.
700
701```
702usage: freqtrade hyperopt-show [-h] [-v] [--logfile FILE] [-V] [-c PATH]
703 [-d PATH] [--userdir PATH] [--best]
704 [--profitable] [-n INT] [--print-json]
705 [--hyperopt-filename PATH] [--no-header]
706
707optional arguments:
708 -h, --help show this help message and exit
709 --best Select only best epochs.
710 --profitable Select only profitable epochs.
711 -n INT, --index INT Specify the index of the epoch to print details for.
712 --print-json Print output in JSON format.
713 --hyperopt-filename FILENAME
714 Hyperopt result filename.Example: `--hyperopt-
715 filename=hyperopt_results_2020-09-27_16-20-48.pickle`
716 --no-header Do not print epoch details header.
717
718Common arguments:
719 -v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
720 --logfile FILE Log to the file specified. Special values are:
721 'syslog', 'journald'. See the documentation for more
722 details.
723 -V, --version show program's version number and exit
724 -c PATH, --config PATH
725 Specify configuration file (default:
726 `userdir/config.json` or `config.json` whichever
727 exists). Multiple --config options may be used. Can be
728 set to `-` to read config from stdin.
729 -d PATH, --datadir PATH
730 Path to directory with historical backtesting data.
731 --userdir PATH, --user-data-dir PATH
732 Path to userdata directory.
733
734```
735
736!!! Note
737 `hyperopt-show` will automatically use the latest available hyperopt results file.
738 You can override this using the `--hyperopt-filename` argument, and specify another, available filename (without path!).
739
740### Examples
741
742Print details for the epoch 168 (the number of the epoch is shown by the `hyperopt-list` subcommand or by Hyperopt itself during hyperoptimization run):
743
744```
745freqtrade hyperopt-show -n 168
746```
747
748Prints JSON data with details for the last best epoch (i.e., the best of all epochs):
749
750```
751freqtrade hyperopt-show --best -n -1 --print-json --no-header
752```
753
754## Show trades
755
756Print selected (or all) trades from database to screen.
757
758```
759usage: freqtrade show-trades [-h] [-v] [--logfile FILE] [-V] [-c PATH]
760 [-d PATH] [--userdir PATH] [--db-url PATH]
761 [--trade-ids TRADE_IDS [TRADE_IDS ...]]
762 [--print-json]
763
764optional arguments:
765 -h, --help show this help message and exit
766 --db-url PATH Override trades database URL, this is useful in custom
767 deployments (default: `sqlite:///tradesv3.sqlite` for
768 Live Run mode, `sqlite:///tradesv3.dryrun.sqlite` for
769 Dry Run).
770 --trade-ids TRADE_IDS [TRADE_IDS ...]
771 Specify the list of trade ids.
772 --print-json Print output in JSON format.
773
774Common arguments:
775 -v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
776 --logfile FILE Log to the file specified. Special values are:
777 'syslog', 'journald'. See the documentation for more
778 details.
779 -V, --version show program's version number and exit
780 -c PATH, --config PATH
781 Specify configuration file (default:
782 `userdir/config.json` or `config.json` whichever
783 exists). Multiple --config options may be used. Can be
784 set to `-` to read config from stdin.
785 -d PATH, --datadir PATH
786 Path to directory with historical backtesting data.
787 --userdir PATH, --user-data-dir PATH
788 Path to userdata directory.
789```
790
791### Examples
792
793Print trades with id 2 and 3 as json
794
795``` bash
796freqtrade show-trades --db-url sqlite:///tradesv3.sqlite --trade-ids 2 3 --print-json
797```