Give each Freqtrade dry-run its own SQLite file with an explicit --db-url (or db_url). Official CLI and configuration defaults are sqlite:///tradesv3.dryrun.sqlite in dry-run and sqlite:///tradesv3.sqlite in live mode; this article still recommends an explicit, fresh path so runs do not share a file. After the window, inspect the same URL with freqtrade show-trades, optionally --print-json. Use a different file for a second run, and never point a live bot at a database that already holds dry-run trades.
Documentation review. AI-assisted drafting. Educational information; no individual financial advice.
Point dry-run trades at a named database
Freqtrade can write dry-run trades to a SQLite file you choose, instead of mixing them with another run or with a production database. Official command help for freqtrade trade documents --db-url as an override for the trades database URL, with defaults sqlite:///tradesv3.sqlite for live-run mode and sqlite:///tradesv3.dryrun.sqlite for dry-run mode. The official configuration parameter db_url states the same defaults: sqlite:///tradesv3.dryrun.sqlite when dry_run is true, and sqlite:///tradesv3.sqlite for production instances.
The official bot-usage page also includes a sentence that, in dry-run, no transactions are stored in a database by default, immediately followed by the same --db-url example. Because that prose conflicts with the CLI and configuration defaults, this article does not rely on an implicit store. For a repeatable test, pass an explicit --db-url (or set db_url in the config you actually load) and then read that same URL with show-trades.
Official configuration documentation for dry-run mode tells you to set "dry_run": true and to specify db_url for a persistence database, and gives the example "db_url": "sqlite:///tradesv3.dryrun.sqlite". Official production-switch guidance says to use a different, fresh database so dry-run trades are not mixed with exchange money and statistics.
Official flags and defaults
| Control | Official role |
|---|---|
--dry-run or "dry_run": true | Enforce or configure dry-run (simulated trades; exchange secrets are not required) |
--db-url PATH or "db_url" | Trades database URL (SQLAlchemy connect string) |
| Default when dry-run is true | sqlite:///tradesv3.dryrun.sqlite (CLI help and configuration note) |
| Default when live | sqlite:///tradesv3.sqlite |
freqtrade show-trades --db-url PATH | Print selected or all trades from that database |
freqtrade show-trades --print-json | JSON output for comparison |
freqtrade convert-db | Migrate trades, orders, and pairlocks to another database system; official warning is to use an empty target |
A relative SQLite URL such as sqlite:///user_data/dryrun-2026-11-11-a.sqlite is resolved by the SQLAlchemy string you pass; keep the path stable and record it in the test notes. Official create-userdir layout includes user_data/ as the usual place for user files.
A fresh-database procedure
This procedure creates a new file for a single dry-run window, inspects it, and leaves it untouched as the record of that run. It is not a completed bot session and not a performance result.
- Choose a new filename that does not already exist, for example
user_data/dryrun-2026-11-11-a.sqlite. Do not reusetradesv3.sqlite. Reusetradesv3.dryrun.sqliteonly if you intend to append to that default file; for a repeatable isolated test, use a new name. - Confirm the file is absent (or that you have copied it aside if you are restarting a failed attempt).
- Start dry-run with an explicit database and log:
freqtrade trade --dry-run --strategy YourStrategy --config user_data/config.json --db-url sqlite:///user_data/dryrun-2026-11-11-a.sqlite --logfile user_data/logs/dryrun-2026-11-11-a.log - Alternatively, set both
"dry_run": trueand"db_url": "sqlite:///user_data/dryrun-2026-11-11-a.sqlite"in the loaded configuration. Official prevalence rules say CLI arguments override the configuration file, so a--db-urlon the command line wins if both are present. - When the window ends, stop the bot and inspect the file with:
freqtrade show-trades --db-url sqlite:///user_data/dryrun-2026-11-11-a.sqliteand, for a machine-readable copy, add--print-json. Officialshow-tradesalso accepts--trade-idsto print selected trades. - Archive the SQLite file, the log, and the exact command line (strategy name, config path, and database URL) together. Official dry-run notes also state that open orders — not trades, which are stored in the database — are kept open after a bot restart, assuming they were not filled while offline. A repeatable comparison should record whether the bot was restarted mid-window.
Compare two runs without mixing records
To compare two dry-run windows, give each run its own file, for example dryrun-2026-11-11-a.sqlite and dryrun-2026-11-11-b.sqlite. Run show-trades --print-json against each URL and compare trade fields (pair, amounts, entry and exit rates, times, and exit reasons). Do not point the second run at the first file unless you intentionally want a single combined history.
The same isolation applies when you also run a backtest: backtest exports go to a backtest results directory, not to the dry-run SQLite file (see dry-run versus backtest fills). If you later move a dry-run history into another engine, official convert-db can migrate to a different system, but only onto an empty target.
Keep dry-run data out of a production database
Official production-mode guidance is to switch dry_run to false and to adapt the database URL if it is set, using a different or fresh database. Do not start a live run against a SQLite file that already contains dry-run trades. Conversely, do not pass a live tradesv3.sqlite URL to a dry-run "just to look" if that process might write to it; use a copy or a separate --db-url.
This article does not run Freqtrade and does not include sample trade rows. Recheck the official bot-usage, configuration, and utility (show-trades) pages at the next review. Related reading: the bot evaluation guide and the backtest statistics tool.
Sources & method
What this article adds
A fresh-file procedure that sets an explicit dry-run --db-url, inspects it with official show-trades, compares two runs on separate files, and keeps dry-run records out of the live default database, noting a prose conflict on the bot-usage page without inventing a default.
How it was prepared
Drafted from official Freqtrade stable bot-usage, configuration, and utility (show-trades, convert-db) pages fetched on 2026-11-11. A prose conflict on the bot-usage page about default dry-run persistence is noted; the procedure uses an explicit --db-url. Freqtrade was not executed and no trade rows are invented.
- Freqtrade stable docs: Start the bot (bot usage) Checked 2026-11-11
- Freqtrade stable docs: Configuration Checked 2026-11-11
- Freqtrade stable docs: Utility subcommands (show-trades, convert-db) Checked 2026-11-11
Official bot-usage and configuration pages support --dry-run, --db-url, db_url, and the stated default SQLite paths for dry-run and live modes, plus the instruction to specify db_url for dry-run persistence and to use a fresh database when switching to production. Official utility documentation supports show-trades and convert-db. The conflicting bot-usage sentence about default dry-run storage is noted as a limitation, not resolved by speculation.
For corrections, contact the publisher. Editorial policy · Affiliate disclosure