Compare commits

...

402 Commits

Author SHA1 Message Date
Matthias
83b372a32d docs: add "Funding fee adjustment" to deprecated docs 2025-12-13 19:30:21 +01:00
Matthias
51e0b204b6 docs: improve download data docs 2025-12-13 18:30:30 +01:00
Matthias
d15d08a2d5 test: Improve refresh_backtest test 2025-12-09 20:18:12 +01:00
Matthias
6aeab16ce4 test: improve candle type verification test 2025-12-09 20:13:10 +01:00
Matthias
46538d9a5b fix: verify prog actually exists before using it 2025-12-09 19:34:58 +01:00
Matthias
f0f48395c5 chore: update download-data help text 2025-12-09 18:25:54 +01:00
Matthias
b3a1442a69 feat: allow varying help texts for different subcommands 2025-12-09 18:25:11 +01:00
Matthias
bbafb1dabd fix: deduplicate list before downloading
This avoids duplicate downloads, for example on hyperliquid, which uses "futures" as mark candle type.
2025-12-09 13:54:05 +01:00
Matthias
645a9159e4 chore: hyperliquid doesn't have mark candles
it uses regular futures candles as multiplicator for funding fees.
2025-12-09 13:43:49 +01:00
Matthias
2d3ff2f8ca test: mark-test should use the candle's defined mark price attribute 2025-12-09 13:42:59 +01:00
Matthias
309985503d test: fix funding_rate_history online test 2025-12-08 20:17:10 +01:00
Matthias
072ed705fc test: fix funding_fee online tests 2025-12-08 19:21:48 +01:00
Matthias
00f687f3f5 test: test futures data with online exchanges 2025-12-08 17:07:26 +01:00
Matthias
96849fcafe refactor: provide a non-failing check_candle_support method 2025-12-08 17:01:36 +01:00
Matthias
80d5b6e24c test: minor refactor in online tests 2025-12-08 16:23:43 +01:00
Matthias
f33fd98c83 test: Add test for candle type verification 2025-12-08 14:43:12 +01:00
Matthias
c7636734de feat: validate supported candle types when downloading data 2025-12-08 14:29:16 +01:00
Matthias
994e61fe42 feat: add (commented) validation for fetch_*_ohlcv methods 2025-12-08 13:47:26 +01:00
Matthias
359eba462b feat: add candle_types argument to download-data 2025-12-08 12:45:41 +01:00
Matthias
38e48c0c5e test: update refresh ohlcv data test 2025-12-08 11:55:58 +01:00
Matthias
cde886b884 chore: use str for safe usage of candle_type 2025-12-08 10:20:00 +01:00
Matthias
9f4e167455 chore: force keyword usage on refresh_backtest_ohlcv 2025-12-08 09:27:48 +01:00
Matthias
f5e6504e22 test: add test for funding rate exchange fix 2025-12-08 09:11:49 +01:00
Matthias
0ec1066b34 test: add test for funding_rate fix 2025-12-08 08:48:37 +01:00
Matthias
62d4da3b94 test: add test for get_funding_rate_timeframe 2025-12-08 08:43:50 +01:00
Matthias
e6030b7f59 chore: minor adjustments for clarity 2025-12-07 20:01:08 +01:00
Matthias
c1c968666e chore: some minor cleanups 2025-12-07 18:19:22 +01:00
Matthias
f8d6363d19 test: update further tests 2025-12-07 16:11:47 +01:00
Matthias
acc69e0d2e test: fix a couple more tests 2025-12-07 16:02:30 +01:00
Matthias
5110d0bdde test: update a couple of tests for new behavior 2025-12-07 15:12:42 +01:00
Matthias
597cc0592b test: update funding_rate_migration test 2025-12-06 20:14:22 +01:00
Matthias
01b0a8fa42 fix: 1h should be the default for funding/mark candles 2025-12-06 16:15:32 +01:00
Matthias
cf6b7a847b fix: bitget's minimal funding fee interval is 1h 2025-12-06 16:01:05 +01:00
Matthias
4897080827 fix: bybit's minimal funding fee interval to 1h 2025-12-06 15:53:27 +01:00
Matthias
3ca8e0fb5c feat: auto-adjust funding rate timeframe in dataprovider 2025-12-06 15:42:40 +01:00
Matthias
40f4ff04c2 feat: auto-fix invalid funding rate timeframe in informative decorator 2025-12-06 14:16:27 +01:00
Matthias
3bd911982f feat: add get_funding_rate_timeframe to dataprovider 2025-12-06 14:13:53 +01:00
Matthias
730383ab18 feat: auto-download correct funding rate timeframe 2025-12-06 14:13:41 +01:00
Matthias
b70f10dca6 chore: simplify warning formatting 2025-12-06 14:06:17 +01:00
Matthias
17009ac59f chore: allow non-matching funding timeframe - as timeframe doesn't actually matter any longer. 2025-12-06 13:53:18 +01:00
Matthias
07fbf2b467 feat: support dynamic funding fees in dry/live mode 2025-12-06 13:46:27 +01:00
Matthias
3f0be5e41f fix: floor timestamp to seconds
no candle has more than second precision.
2025-12-06 13:42:16 +01:00
Matthias
2845568f61 feat: limit funding_fee renaming to rename from low to high. 2025-12-05 20:32:56 +01:00
Matthias
41a82eff21 fix: don't fill up funding fee data Data
Timeframes are arbitrary and may vary between pairs or
time ranges
2025-12-05 18:20:14 +01:00
Matthias
d41acc77f7 fix: floor funding-rate to seconds to account for slight time offset 2025-12-05 18:20:14 +01:00
Matthias
271fc6b585 feat: don't fill up missing funding-fees after merge 2025-12-05 18:20:14 +01:00
Matthias
262f4ffa4c test: update bt tests for new timeout behavior 2025-12-05 07:10:17 +01:00
Matthias
338c1c5424 fix: compare timeout with <= instead of <
closes #12590

Backtesting assumes round dates, so a timeout at "candle length" needs
to timeout at the hour - not after the hour.
otherwise the timeout becomes either double (60 instead of 30) -
or longer by one "timeframe detail" (31 instead of 30).
2025-12-05 07:10:04 +01:00
Matthias
68e54248fd fix: calculate meaningful price change properly weighting each pair
closes #12588
2025-12-04 21:28:31 +01:00
Matthias
e792bafe21 test: update test to ensure rel_mean is reasonable 2025-12-04 21:28:31 +01:00
Matthias
fe95581acd test: update rel_mean test to use USDT Pairs
This will allow highlighting a problem pointed out in #12588
2025-12-04 21:28:31 +01:00
Matthias
7f831f8a9c test: update tests for new test pairs 2025-12-04 21:28:31 +01:00
Matthias
3fb7382cc4 test: update test data to include USDT pairs 2025-12-04 21:28:31 +01:00
Matthias
83f70b3c27 Merge pull request #12585 from LMessi2000/fix/okx-price-type-mapping
fix(okx): correct PriceType.MARK and PriceType.INDEX mapping
2025-12-04 07:24:31 +01:00
Matthias
e6e14ab67f Merge branch 'develop' into fix/okx-price-type-mapping 2025-12-04 07:02:27 +01:00
Matthias
37792e7d86 Merge pull request #12589 from freqtrade/update/binance-leverage-tiers
Update Binance Leverage Tiers
2025-12-04 07:01:44 +01:00
Matthias
a63ea6adb8 test: switch to BTC/USDC in tests for now 2025-12-04 06:56:14 +01:00
Matthias
06a8f3d097 chore: bump ccxt to 4.5.24 2025-12-04 06:36:13 +01:00
Freqtrade Bot
e76b9bb64a chore: update pre-commit hooks 2025-12-04 03:27:18 +00:00
LMessi2000
606dbe5db1 Revert "test(okx): add unit test for stop_price_type_value_mapping"
This reverts commit 81e4e0d301.
2025-12-03 22:17:59 +08:00
LMessi2000
81e4e0d301 test(okx): add unit test for stop_price_type_value_mapping 2025-12-03 20:58:12 +08:00
LMessi2000
a3e97527d1 fix(okx): correct PriceType.MARK and PriceType.INDEX mapping 2025-12-03 20:41:01 +08:00
Matthias
7137461891 feat: improved download-data logging 2025-12-02 21:16:37 +01:00
Matthias
10e7d279f0 test: improve funding rate combine test 2025-12-02 20:39:34 +01:00
Matthias
971cb94ce4 feat: limit returned columns for merged mark/funding calc to used columns 2025-12-02 20:24:52 +01:00
Matthias
19526f1df2 test: update tests to align to improved formatting 2025-12-02 19:12:24 +01:00
Matthias
9c73c8671e feat: improve format_date with fallback value 2025-12-02 19:12:24 +01:00
Matthias
0f5427f4a0 feat: round_value should support None 2025-12-02 19:12:24 +01:00
Matthias
a013793b2f feat: improved trade repr format (used for logs) 2025-12-02 19:12:24 +01:00
Matthias
1a77f1b203 Merge pull request #12581 from freqtrade/fix/sloe_handling
Improve stoploss cancellation logic
2025-12-02 16:18:52 +01:00
Matthias
faf552837a test: add test for stoploss cancel skips 2025-12-02 06:48:53 +01:00
Matthias
4b2d099258 fix: ensure stoploss on exchange is canceled once the trade closes. 2025-12-02 06:48:53 +01:00
Matthias
4e6ea1d2ba feat: don't cancel stoploss early if it's not necessary 2025-12-02 06:48:53 +01:00
Matthias
197623839d Merge pull request #12579 from freqtrade/dependabot/github_actions/develop/actions/checkout-6.0.0
chore(deps): bump actions/checkout from 5.0.1 to 6.0.0
2025-12-02 06:47:47 +01:00
Matthias
6d8fa76708 Merge pull request #12580 from freqtrade/update/pre-commit-hooks
Update pre-commit hooks
2025-12-02 06:40:25 +01:00
Matthias
d7eb49d5d0 chore: align usage of actions/checkout version pin 2025-12-02 06:31:32 +01:00
Freqtrade Bot
659509e085 chore: update pre-commit hooks 2025-12-02 03:26:42 +00:00
Matthias
2b729c2527 test: improve integration test to have proper return value 2025-12-01 20:11:03 +01:00
dependabot[bot]
38151423b8 chore(deps): bump actions/checkout from 5.0.1 to 6.0.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 5.0.1 to 6.0.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Commits](https://github.com/actions/checkout/compare/v5.0.1...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-01 18:48:43 +00:00
Matthias
2f990b773d chore: increase dependabot cooldown to 7 days 2025-12-01 19:08:50 +01:00
Matthias
20d253dd41 Merge pull request #12574 from freqtrade/dependabot/pip/develop/pre-commit-4.5.0
chore(deps-dev): bump pre-commit from 4.4.0 to 4.5.0
2025-12-01 08:16:40 +01:00
Matthias
6e2165b5e5 Merge pull request #12572 from freqtrade/dependabot/pip/develop/fastapi-0.122.0
chore(deps): bump fastapi from 0.121.3 to 0.122.0
2025-12-01 07:25:23 +01:00
Matthias
6860904bb9 Merge pull request #12573 from freqtrade/dependabot/pip/develop/ccxt-4.5.22
chore(deps): bump ccxt from 4.5.20 to 4.5.22
2025-12-01 07:16:12 +01:00
Matthias
450dc23374 Merge pull request #12571 from freqtrade/dependabot/pip/develop/pymdown-extensions-10.17.2
chore(deps): bump pymdown-extensions from 10.17.1 to 10.17.2
2025-12-01 07:10:42 +01:00
Matthias
d781f09b46 Merge pull request #12566 from freqtrade/dependabot/pip/develop/scipy-e647f76feb
chore(deps-dev): bump scipy-stubs from 1.16.3.0 to 1.16.3.1 in the scipy group
2025-12-01 07:10:13 +01:00
dependabot[bot]
dbde8332f7 chore(deps): bump fastapi from 0.121.3 to 0.122.0
Bumps [fastapi](https://github.com/fastapi/fastapi) from 0.121.3 to 0.122.0.
- [Release notes](https://github.com/fastapi/fastapi/releases)
- [Commits](https://github.com/fastapi/fastapi/compare/0.121.3...0.122.0)

---
updated-dependencies:
- dependency-name: fastapi
  dependency-version: 0.122.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-01 06:00:27 +00:00
Matthias
f5f1785b17 Merge pull request #12576 from freqtrade/dependabot/github_actions/develop/zizmorcore/zizmor-action-0.3.0
chore(deps): bump zizmorcore/zizmor-action from 0.2.0 to 0.3.0
2025-12-01 06:59:33 +01:00
Matthias
7d01928df0 Merge pull request #12567 from freqtrade/dependabot/pip/develop/pydantic-2.12.5
chore(deps): bump pydantic from 2.12.4 to 2.12.5
2025-12-01 06:58:53 +01:00
Matthias
31f712749b Merge pull request #12568 from freqtrade/dependabot/pip/develop/time-machine-3.1.0
chore(deps-dev): bump time-machine from 3.0.0 to 3.1.0
2025-12-01 06:58:36 +01:00
Matthias
bcdf83100f Merge pull request #12577 from freqtrade/dependabot/github_actions/develop/actions/checkout-6.0.0
chore(deps): bump actions/checkout from 5.0.0 to 6.0.0
2025-12-01 06:58:02 +01:00
dependabot[bot]
dc88ea0ed9 chore(deps-dev): bump pre-commit from 4.4.0 to 4.5.0
Bumps [pre-commit](https://github.com/pre-commit/pre-commit) from 4.4.0 to 4.5.0.
- [Release notes](https://github.com/pre-commit/pre-commit/releases)
- [Changelog](https://github.com/pre-commit/pre-commit/blob/main/CHANGELOG.md)
- [Commits](https://github.com/pre-commit/pre-commit/compare/v4.4.0...v4.5.0)

---
updated-dependencies:
- dependency-name: pre-commit
  dependency-version: 4.5.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-01 05:57:42 +00:00
Matthias
543457a1ef Merge pull request #12575 from freqtrade/dependabot/github_actions/develop/peter-evans/create-pull-request-7.0.9
chore(deps): bump peter-evans/create-pull-request from 7.0.8 to 7.0.9
2025-12-01 06:57:05 +01:00
Matthias
5d781d0114 Merge pull request #12570 from freqtrade/dependabot/pip/develop/xgboost-3.1.2
chore(deps): bump xgboost from 3.1.1 to 3.1.2
2025-12-01 06:51:39 +01:00
Matthias
45b1dabe0a chore: bump scipy-stubs in pre-commit config 2025-12-01 06:44:00 +01:00
Matthias
ffea373f86 Merge pull request #12578 from freqtrade/dependabot/github_actions/develop/astral-sh/setup-uv-7.1.4
chore(deps): bump astral-sh/setup-uv from 7.1.2 to 7.1.4
2025-12-01 06:41:44 +01:00
Matthias
ba650de562 Merge pull request #12569 from freqtrade/dependabot/pip/develop/ruff-0.14.6
chore(deps-dev): bump ruff from 0.14.5 to 0.14.6
2025-12-01 06:41:20 +01:00
dependabot[bot]
39233ff240 chore(deps): bump astral-sh/setup-uv from 7.1.2 to 7.1.4
Bumps [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) from 7.1.2 to 7.1.4.
- [Release notes](https://github.com/astral-sh/setup-uv/releases)
- [Commits](85856786d1...1e862dfacb)

---
updated-dependencies:
- dependency-name: astral-sh/setup-uv
  dependency-version: 7.1.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-01 03:30:36 +00:00
dependabot[bot]
8950423418 chore(deps): bump actions/checkout from 5.0.0 to 6.0.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 5.0.0 to 6.0.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-01 03:30:21 +00:00
dependabot[bot]
760a2b9ff7 chore(deps): bump zizmorcore/zizmor-action from 0.2.0 to 0.3.0
Bumps [zizmorcore/zizmor-action](https://github.com/zizmorcore/zizmor-action) from 0.2.0 to 0.3.0.
- [Release notes](https://github.com/zizmorcore/zizmor-action/releases)
- [Commits](e673c3917a...e639db9933)

---
updated-dependencies:
- dependency-name: zizmorcore/zizmor-action
  dependency-version: 0.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-01 03:30:05 +00:00
dependabot[bot]
a13f488b84 chore(deps): bump peter-evans/create-pull-request from 7.0.8 to 7.0.9
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 7.0.8 to 7.0.9.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](271a8d0340...84ae59a2cd)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-version: 7.0.9
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-01 03:29:53 +00:00
dependabot[bot]
09b1582704 chore(deps): bump ccxt from 4.5.20 to 4.5.22
Bumps [ccxt](https://github.com/ccxt/ccxt) from 4.5.20 to 4.5.22.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Commits](https://github.com/ccxt/ccxt/compare/v4.5.20...v4.5.22)

---
updated-dependencies:
- dependency-name: ccxt
  dependency-version: 4.5.22
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-01 03:06:04 +00:00
dependabot[bot]
61ab49a124 chore(deps): bump pymdown-extensions from 10.17.1 to 10.17.2
Bumps [pymdown-extensions](https://github.com/facelessuser/pymdown-extensions) from 10.17.1 to 10.17.2.
- [Release notes](https://github.com/facelessuser/pymdown-extensions/releases)
- [Commits](https://github.com/facelessuser/pymdown-extensions/compare/10.17.1...10.17.2)

---
updated-dependencies:
- dependency-name: pymdown-extensions
  dependency-version: 10.17.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-01 03:05:36 +00:00
dependabot[bot]
1a95b04d79 chore(deps): bump xgboost from 3.1.1 to 3.1.2
Bumps [xgboost](https://github.com/dmlc/xgboost) from 3.1.1 to 3.1.2.
- [Release notes](https://github.com/dmlc/xgboost/releases)
- [Changelog](https://github.com/dmlc/xgboost/blob/master/NEWS.md)
- [Commits](https://github.com/dmlc/xgboost/compare/v3.1.1...v3.1.2)

---
updated-dependencies:
- dependency-name: xgboost
  dependency-version: 3.1.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-01 03:05:23 +00:00
dependabot[bot]
691a6b0a72 chore(deps-dev): bump ruff from 0.14.5 to 0.14.6
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.14.5 to 0.14.6.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/0.14.5...0.14.6)

---
updated-dependencies:
- dependency-name: ruff
  dependency-version: 0.14.6
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-01 03:05:16 +00:00
dependabot[bot]
1d0a902251 chore(deps-dev): bump time-machine from 3.0.0 to 3.1.0
Bumps [time-machine](https://github.com/adamchainz/time-machine) from 3.0.0 to 3.1.0.
- [Changelog](https://github.com/adamchainz/time-machine/blob/main/docs/changelog.rst)
- [Commits](https://github.com/adamchainz/time-machine/compare/3.0.0...3.1.0)

---
updated-dependencies:
- dependency-name: time-machine
  dependency-version: 3.1.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-01 03:04:53 +00:00
dependabot[bot]
1de9f5a2fb chore(deps): bump pydantic from 2.12.4 to 2.12.5
Bumps [pydantic](https://github.com/pydantic/pydantic) from 2.12.4 to 2.12.5.
- [Release notes](https://github.com/pydantic/pydantic/releases)
- [Changelog](https://github.com/pydantic/pydantic/blob/main/HISTORY.md)
- [Commits](https://github.com/pydantic/pydantic/compare/v2.12.4...v2.12.5)

---
updated-dependencies:
- dependency-name: pydantic
  dependency-version: 2.12.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-01 03:04:45 +00:00
dependabot[bot]
7a5342cc93 chore(deps-dev): bump scipy-stubs in the scipy group
Bumps the scipy group with 1 update: [scipy-stubs](https://github.com/scipy/scipy-stubs).


Updates `scipy-stubs` from 1.16.3.0 to 1.16.3.1
- [Release notes](https://github.com/scipy/scipy-stubs/releases)
- [Commits](https://github.com/scipy/scipy-stubs/compare/v1.16.3.0...v1.16.3.1)

---
updated-dependencies:
- dependency-name: scipy-stubs
  dependency-version: 1.16.3.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: scipy
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-01 03:04:40 +00:00
Matthias
52c73eabeb docs: add missing space in docs 2025-11-30 13:25:12 +01:00
Matthias
02de1f0a1e Merge pull request #12559 from freqtrade/feat/dry_stop
Enhance dry-run stoploss functionality
2025-11-29 13:44:45 +01:00
Matthias
3453bdf607 chore: bump version to 2025.12-dev 2025-11-29 13:10:16 +01:00
Matthias
ac2723c3a0 test: add explicit test for dry stoploss order filling 2025-11-29 12:23:15 +01:00
Matthias
1536c09df3 test: improved test naming 2025-11-29 12:07:13 +01:00
Matthias
bfe9aac16b fix(hyperliquid): exclude HIP3 pairs for now
part of #12558
2025-11-28 18:16:26 +01:00
Matthias
fade66afd9 fix: ensure we always have a price when checking stops 2025-11-28 15:52:30 +01:00
Matthias
f63484d0b0 feat: add dry-limit check for stoploss orders 2025-11-28 15:52:30 +01:00
Matthias
3543e96ec5 refactor: extract dry-market order slippage from function 2025-11-28 15:52:30 +01:00
Matthias
c83ea0db4f chore: fix default behavior for crossed mode 2025-11-28 15:52:30 +01:00
Matthias
ad256367be feat: dry-is-crossed should support stoploss 2025-11-28 15:52:30 +01:00
Matthias
73b427370b test: add tests for dry crossed stoploss 2025-11-28 15:52:30 +01:00
Matthias
ca7234e33f test: fix dry-stop tests 2025-11-28 15:52:30 +01:00
Matthias
cd7b267171 feat: record dry-run stop_price price separately 2025-11-28 15:52:30 +01:00
Matthias
1770a68457 chore: fix wrongly worded exchange_response endpoint naming 2025-11-28 13:37:31 +01:00
Matthias
57fd455adf fix: Proper fix for plotscript
this time also saving the file ...

closes #12557
2025-11-28 13:29:50 +01:00
Matthias
61ecaa4c41 fix: ensure automatic exportfilename detection works
closes #12557
2025-11-28 13:13:57 +01:00
Matthias
682c4137b4 docs: improved wording 2025-11-27 20:16:38 +01:00
Matthias
759c18df3d docs: improve pre-commit docs wording 2025-11-27 07:04:00 +01:00
Matthias
04fda255de Merge pull request #12529 from mrpabloyeah/fix-backtesting-exception-when-no-data-is-available-for-a-pair
Fix backtesting exception when no data is available for a pair
2025-11-27 06:29:24 +01:00
Matthias
26f23c10b5 Merge pull request #12555 from freqtrade/update/binance-leverage-tiers
Update Binance Leverage Tiers
2025-11-27 06:13:17 +01:00
Freqtrade Bot
001baa07b1 chore: update pre-commit hooks 2025-11-27 03:21:53 +00:00
mrpabloyeah
72724037af Replaced unsafe loop with a list comprehension & added docstring in refresh_pairlist() 2025-11-26 11:03:18 +01:00
Matthias
1bd60c2afb Merge pull request #12554 from freqtrade/restructure_ci
restructure CI to reliably fail the build step if other ch…
2025-11-25 20:11:49 +01:00
Matthias
c0a1911f22 chore(ci): improve zizmor action formatting 2025-11-25 19:47:51 +01:00
Matthias
f4920f199c chore(ci): only notify after build. 2025-11-25 19:47:15 +01:00
Matthias
6b8968ed0f chore(ci): restructure CI to reliably fail the build step if other checks failed 2025-11-25 19:47:15 +01:00
Matthias
85a88d3594 Merge pull request #12552 from freqtrade/codecov
Switch from Coveralls to Codecov
2025-11-25 19:18:53 +01:00
Matthias
b5e17735a6 chore: use codecov with token 2025-11-25 19:03:48 +01:00
Matthias
67beeb6f26 Merge pull request #12553 from freqtrade/update/pre-commit-hooks
Update pre-commit hooks
2025-11-25 06:34:42 +01:00
Freqtrade Bot
f94acc9173 chore: update pre-commit hooks 2025-11-25 03:23:56 +00:00
Matthias
a7ac957399 chore: implement cleanup for codecov action bug 2025-11-24 20:19:20 +01:00
Matthias
b337b075ab chore: limit to appropriate runner 2025-11-24 19:53:55 +01:00
Matthias
3152e97b2f chore: switch from coveralls to codecov 2025-11-24 19:49:44 +01:00
mrpabloyeah
77e8a53572 Fix backtesting exception when no data is available for a pair (new approach) 2025-11-24 10:43:00 +01:00
Matthias
4eea0cca08 Merge pull request #12546 from freqtrade/dependabot/pip/develop/time-machine-3.0.0
chore(deps-dev): bump time-machine from 2.19.0 to 3.0.0
2025-11-24 08:11:34 +01:00
Matthias
8274a6c3a9 chore: update usage of TTLCache to FtTTLCache 2025-11-24 07:07:13 +01:00
Matthias
f0a5b95ec0 feat: add FtTTLCache to avoid mocking issues
overrides timer in a central location.
2025-11-24 07:05:49 +01:00
Matthias
e4dd3b2821 Merge pull request #12544 from freqtrade/dependabot/pip/develop/types-2e6adcc4ce
chore(deps-dev): bump types-python-dateutil from 2.9.0.20251108 to 2.9.0.20251115 in the types group
2025-11-24 07:02:11 +01:00
Matthias
7698ee9f3d Merge pull request #12549 from freqtrade/dependabot/pip/develop/numpy-2.3.5
chore(deps): bump numpy from 2.3.4 to 2.3.5
2025-11-24 06:50:52 +01:00
Matthias
c5127ba522 Merge pull request #12548 from freqtrade/dependabot/pip/develop/ruff-0.14.5
chore(deps-dev): bump ruff from 0.14.4 to 0.14.5
2025-11-24 06:50:13 +01:00
Matthias
024d2db2e2 chore: bump pre-commit config dateutil types 2025-11-24 06:37:39 +01:00
Matthias
f2498df99b Merge pull request #12550 from freqtrade/dependabot/pip/develop/plotly-6.5.0
chore(deps): bump plotly from 6.4.0 to 6.5.0
2025-11-24 06:35:18 +01:00
Matthias
37ce645bad Merge pull request #12545 from freqtrade/dependabot/pip/develop/cachetools-6.2.2
chore(deps): bump cachetools from 6.2.1 to 6.2.2
2025-11-24 06:32:43 +01:00
Matthias
d4188a093b Merge pull request #12547 from freqtrade/dependabot/pip/develop/fastapi-0.121.3
chore(deps): bump fastapi from 0.121.1 to 0.121.3
2025-11-24 06:32:14 +01:00
dependabot[bot]
bc3342b4d2 chore(deps): bump plotly from 6.4.0 to 6.5.0
Bumps [plotly](https://github.com/plotly/plotly.py) from 6.4.0 to 6.5.0.
- [Release notes](https://github.com/plotly/plotly.py/releases)
- [Changelog](https://github.com/plotly/plotly.py/blob/main/CHANGELOG.md)
- [Commits](https://github.com/plotly/plotly.py/compare/v6.4.0...v6.5.0)

---
updated-dependencies:
- dependency-name: plotly
  dependency-version: 6.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-24 03:02:27 +00:00
dependabot[bot]
64cf284c07 chore(deps): bump numpy from 2.3.4 to 2.3.5
Bumps [numpy](https://github.com/numpy/numpy) from 2.3.4 to 2.3.5.
- [Release notes](https://github.com/numpy/numpy/releases)
- [Changelog](https://github.com/numpy/numpy/blob/main/doc/RELEASE_WALKTHROUGH.rst)
- [Commits](https://github.com/numpy/numpy/compare/v2.3.4...v2.3.5)

---
updated-dependencies:
- dependency-name: numpy
  dependency-version: 2.3.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-24 03:02:23 +00:00
dependabot[bot]
15b0cc28f8 chore(deps-dev): bump ruff from 0.14.4 to 0.14.5
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.14.4 to 0.14.5.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/0.14.4...0.14.5)

---
updated-dependencies:
- dependency-name: ruff
  dependency-version: 0.14.5
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-24 03:02:14 +00:00
dependabot[bot]
a647ceb753 chore(deps): bump fastapi from 0.121.1 to 0.121.3
Bumps [fastapi](https://github.com/fastapi/fastapi) from 0.121.1 to 0.121.3.
- [Release notes](https://github.com/fastapi/fastapi/releases)
- [Commits](https://github.com/fastapi/fastapi/compare/0.121.1...0.121.3)

---
updated-dependencies:
- dependency-name: fastapi
  dependency-version: 0.121.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-24 03:01:54 +00:00
dependabot[bot]
54840a3f7e chore(deps-dev): bump time-machine from 2.19.0 to 3.0.0
Bumps [time-machine](https://github.com/adamchainz/time-machine) from 2.19.0 to 3.0.0.
- [Changelog](https://github.com/adamchainz/time-machine/blob/main/docs/changelog.rst)
- [Commits](https://github.com/adamchainz/time-machine/compare/2.19.0...3.0.0)

---
updated-dependencies:
- dependency-name: time-machine
  dependency-version: 3.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-24 03:01:50 +00:00
dependabot[bot]
2b1ef1bf59 chore(deps): bump cachetools from 6.2.1 to 6.2.2
Bumps [cachetools](https://github.com/tkem/cachetools) from 6.2.1 to 6.2.2.
- [Changelog](https://github.com/tkem/cachetools/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/tkem/cachetools/compare/v6.2.1...v6.2.2)

---
updated-dependencies:
- dependency-name: cachetools
  dependency-version: 6.2.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-24 03:01:45 +00:00
dependabot[bot]
757439a594 chore(deps-dev): bump types-python-dateutil in the types group
Bumps the types group with 1 update: [types-python-dateutil](https://github.com/typeshed-internal/stub_uploader).


Updates `types-python-dateutil` from 2.9.0.20251108 to 2.9.0.20251115
- [Commits](https://github.com/typeshed-internal/stub_uploader/commits)

---
updated-dependencies:
- dependency-name: types-python-dateutil
  dependency-version: 2.9.0.20251115
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: types
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-24 03:01:12 +00:00
Matthias
73dccb0780 test: Add test case for no parallel on 1 combo 2025-11-23 15:43:17 +01:00
Matthias
aa7aac3a14 feat: don't jump into parallel mode for single pair/timeframe downloads 2025-11-23 15:43:17 +01:00
Matthias
2015ccc727 test: update parallel-history test 2025-11-23 15:43:17 +01:00
Matthias
47301830b6 fix: be more selective before activating parallel download 2025-11-23 15:43:17 +01:00
Matthias
b7b280de96 Merge pull request #12542 from freqtrade/feat/no_data
Fix telegram crash during exchange downtime and improve percentage formatting
2025-11-23 15:43:07 +01:00
Matthias
7edc2e8c94 fix: improved realized profit telegram condition 2025-11-23 13:23:18 +01:00
Matthias
972e25a6a7 feat: Improve conditions to not exclude 0.0 profits 2025-11-23 08:33:11 +01:00
Matthias
649db69314 test: add tests for N/A when formatting prices 2025-11-23 08:30:24 +01:00
Matthias
d0fb4cdc37 feat: use N/A for round value 2025-11-23 08:30:10 +01:00
Matthias
efabcef330 feat: use pct formatting helper throughout telegram module 2025-11-23 08:23:05 +01:00
Matthias
a4e6ac0c7f test: update test for new status table behavior 2025-11-23 08:18:51 +01:00
Matthias
0ce9149ddd feat: use helper method to format for pct 2025-11-23 08:18:17 +01:00
Matthias
2750643e07 test: add tests for format_pct 2025-11-23 08:14:39 +01:00
Matthias
b92535deea feat: Add format_pct helper method 2025-11-23 08:13:48 +01:00
Matthias
2fa0503993 fix: telegram crash during exchange downtime 2025-11-23 08:09:37 +01:00
Matthias
3932470190 Merge pull request #12541 from stash86/main-stash
make sure the strat's startup count don't get replaced
2025-11-23 08:09:25 +01:00
Stefano
d901f4b10b make sure the strat's starupt count don't get replaced 2025-11-23 14:01:36 +09:00
Matthias
8269384077 fix: missing space in template
closes #12539
2025-11-22 19:51:16 +01:00
Matthias
b364153d02 feat: add nr_of_successful_* to api 2025-11-22 15:46:34 +01:00
Matthias
916d8324cb test: update tests with new fields 2025-11-22 13:48:57 +01:00
Matthias
60309b9e57 chore: move num_entries/exits to trade model 2025-11-22 13:40:57 +01:00
Matthias
a05d142af6 chore: remove unneeded formatting 2025-11-22 13:38:33 +01:00
Matthias
1feb11bac0 refactor: use fstring for telegram sending 2025-11-22 13:32:38 +01:00
Matthias
93936c9946 refactor: use fstrings for /order telegram message 2025-11-22 13:29:27 +01:00
Matthias
ce78039ea8 refactor: don't do delayed formatting on status message 2025-11-22 13:26:50 +01:00
Matthias
1db871e42d Merge pull request #12536 from stash86/add-liq-price
Add liq price info on telegram message
2025-11-22 13:05:01 +01:00
Matthias
1513ba9af9 chore: Move liquidation up a line 2025-11-22 12:48:51 +01:00
Stefano
22b88249ff Merge branch 'add-liq-price' of https://github.com/stash86/freqtrade into add-liq-price 2025-11-22 16:52:47 +09:00
Stefano
18f73af6e6 use get to return None on trade with no liq price 2025-11-22 16:52:43 +09:00
Stefano
b8c835e24e Merge branch 'freqtrade:develop' into add-liq-price 2025-11-22 16:40:25 +09:00
Stefano
2f392b483c add liq line 2025-11-22 16:39:35 +09:00
Matthias
220480327c test: add explicit test for dry_order_filled 2025-11-21 07:11:05 +01:00
Matthias
2c6ff3f018 docs: update supported exchanges for Delist Filter 2025-11-20 20:30:43 +01:00
Matthias
56a8fb4aae Merge pull request #12532 from stash86/bitget-delist
add delisting check for bitget futures
2025-11-20 19:51:05 +01:00
Matthias
3f782fc482 Merge pull request #12531 from stash86/bybit-delist
add delisting check for bybit futures
2025-11-20 19:48:11 +01:00
Matthias
d02e5f2b90 chore: simplify imports 2025-11-20 19:34:51 +01:00
Matthias
92fd9411e5 chore: simplify import 2025-11-20 19:31:28 +01:00
Stefano
650cdf5eb3 change to exclude optimize mode 2025-11-20 15:16:11 +09:00
Stefano
060a1543e9 change to exclude optimize mode 2025-11-20 15:13:56 +09:00
Matthias
50402c5cdc test: add explicit tests for price_crossed 2025-11-20 06:54:22 +01:00
Matthias
0835414f24 Merge pull request #12533 from freqtrade/update/binance-leverage-tiers
Update Binance Leverage Tiers
2025-11-20 06:30:14 +01:00
Freqtrade Bot
6449074658 chore: update pre-commit hooks 2025-11-20 03:20:59 +00:00
Stefano
b8d558a455 remove unnecessary check because it will be catch anyway 2025-11-20 09:41:57 +09:00
Stefano
4017b010f4 add test 2025-11-20 09:36:17 +09:00
Stefano
7e178cb032 add test 2025-11-20 09:26:16 +09:00
Stefano
e17936c407 use dt_ts 2025-11-19 14:55:31 +09:00
Stefano
f437d4a55b use dt_ts 2025-11-19 14:53:57 +09:00
Stefano
a731b73457 add delisting check for bitget futures 2025-11-19 12:36:34 +09:00
Stefano
b5be462dd1 add delisting check for bybit futures 2025-11-19 12:25:35 +09:00
Matthias
b55e7bcf4e chore: Improve fetch_dry_run_order 2025-11-18 19:45:43 +01:00
Matthias
d1e71544af test: imrpove testcase 2025-11-18 19:45:32 +01:00
Matthias
6e1367fa94 test: enable gate futures test 2025-11-18 19:16:32 +01:00
Matthias
58452ebc7c chore: bump ccxt to 4.5.20
closes #12516
2025-11-18 19:15:50 +01:00
Matthias
7b1dd61ae4 Merge pull request #12530 from freqtrade/update/pre-commit-hooks
Update pre-commit hooks
2025-11-18 06:28:09 +01:00
Freqtrade Bot
1321991fca chore: update pre-commit hooks 2025-11-18 03:22:24 +00:00
Matthias
8ae8b615b2 Merge pull request #12518 from freqtrade/dependabot/pip/develop/pytest-9513a616b5
chore(deps-dev): bump the pytest group with 2 updates
2025-11-17 19:23:24 +01:00
Matthias
1c96dfd58f chore: add TODO comment for pytest migration 2025-11-17 18:24:10 +01:00
mrpabloyeah
f98efdbe07 Fix backtesting exception when no data is available for a pair 2025-11-17 13:09:48 +01:00
Matthias
e67c2eefff test: live test "get_fee" for futures exchange 2025-11-17 07:20:44 +01:00
Matthias
2ea19f2ab0 Merge pull request #12517 from freqtrade/dependabot/pip/develop/types-ee32193104
chore(deps-dev): bump types-python-dateutil from 2.9.0.20251008 to 2.9.0.20251108 in the types group
2025-11-17 06:57:29 +01:00
Matthias
44a6d2ead7 Merge pull request #12520 from freqtrade/dependabot/pip/develop/fastapi-0.121.1
chore(deps): bump fastapi from 0.121.0 to 0.121.1
2025-11-17 06:57:00 +01:00
Matthias
5fa314e4a8 Merge pull request #12522 from freqtrade/dependabot/pip/develop/certifi-2025.11.12
chore(deps): bump certifi from 2025.10.5 to 2025.11.12
2025-11-17 06:52:58 +01:00
dependabot[bot]
89a8adcbcf chore(deps-dev): bump the pytest group with 2 updates
Bumps the pytest group with 2 updates: [pytest](https://github.com/pytest-dev/pytest) and [pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio).


Updates `pytest` from 8.4.2 to 9.0.1
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/8.4.2...9.0.1)

Updates `pytest-asyncio` from 1.2.0 to 1.3.0
- [Release notes](https://github.com/pytest-dev/pytest-asyncio/releases)
- [Commits](https://github.com/pytest-dev/pytest-asyncio/compare/v1.2.0...v1.3.0)

---
updated-dependencies:
- dependency-name: pytest
  dependency-version: 9.0.1
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: pytest
- dependency-name: pytest-asyncio
  dependency-version: 1.3.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: pytest
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-17 05:39:17 +00:00
Matthias
57f216e9c7 chore: bump dateutil in pre-commit config 2025-11-17 06:32:18 +01:00
Matthias
927a771f2e Merge pull request #12526 from freqtrade/dependabot/pip/develop/optuna-4.6.0
chore(deps): bump optuna from 4.5.0 to 4.6.0
2025-11-17 06:30:19 +01:00
Matthias
3a1fffeeb7 Merge pull request #12521 from freqtrade/dependabot/pip/develop/torch-2.9.1
chore(deps): bump torch from 2.9.0 to 2.9.1
2025-11-17 06:30:00 +01:00
Matthias
9a5622fe33 Merge pull request #12527 from freqtrade/dependabot/pip/develop/ccxt-4.5.19
chore(deps): bump ccxt from 4.5.17 to 4.5.19
2025-11-17 06:29:09 +01:00
Matthias
ec51820074 Merge pull request #12519 from freqtrade/dependabot/pip/develop/mkdocs-a50e39aa08
chore(deps): bump mkdocs-material from 9.6.23 to 9.7.0 in the mkdocs group
2025-11-17 06:28:14 +01:00
Matthias
4425e0cd40 Merge pull request #12525 from freqtrade/dependabot/pip/develop/pymdown-extensions-10.17.1
chore(deps): bump pymdown-extensions from 10.16.1 to 10.17.1
2025-11-17 06:27:34 +01:00
Matthias
97a830b4f0 Merge pull request #12523 from freqtrade/dependabot/pip/develop/pre-commit-4.4.0
chore(deps-dev): bump pre-commit from 4.3.0 to 4.4.0
2025-11-17 06:27:20 +01:00
Matthias
cb28498890 Merge pull request #12524 from freqtrade/dependabot/pip/develop/ruff-0.14.4
chore(deps-dev): bump ruff from 0.14.3 to 0.14.4
2025-11-17 06:27:09 +01:00
dependabot[bot]
1747114b57 chore(deps): bump ccxt from 4.5.17 to 4.5.19
Bumps [ccxt](https://github.com/ccxt/ccxt) from 4.5.17 to 4.5.19.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/exchanges.cfg)
- [Commits](https://github.com/ccxt/ccxt/compare/v4.5.17...v4.5.19)

---
updated-dependencies:
- dependency-name: ccxt
  dependency-version: 4.5.19
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-17 03:02:58 +00:00
dependabot[bot]
1056b2562e chore(deps): bump optuna from 4.5.0 to 4.6.0
Bumps [optuna](https://github.com/optuna/optuna) from 4.5.0 to 4.6.0.
- [Release notes](https://github.com/optuna/optuna/releases)
- [Commits](https://github.com/optuna/optuna/compare/v4.5.0...v4.6.0)

---
updated-dependencies:
- dependency-name: optuna
  dependency-version: 4.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-17 03:02:48 +00:00
dependabot[bot]
64f680ed86 chore(deps): bump pymdown-extensions from 10.16.1 to 10.17.1
Bumps [pymdown-extensions](https://github.com/facelessuser/pymdown-extensions) from 10.16.1 to 10.17.1.
- [Release notes](https://github.com/facelessuser/pymdown-extensions/releases)
- [Commits](https://github.com/facelessuser/pymdown-extensions/compare/10.16.1...10.17.1)

---
updated-dependencies:
- dependency-name: pymdown-extensions
  dependency-version: 10.17.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-17 03:02:44 +00:00
dependabot[bot]
028c60ce5a chore(deps-dev): bump ruff from 0.14.3 to 0.14.4
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.14.3 to 0.14.4.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/0.14.3...0.14.4)

---
updated-dependencies:
- dependency-name: ruff
  dependency-version: 0.14.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-17 03:02:36 +00:00
dependabot[bot]
d27ee227cb chore(deps-dev): bump pre-commit from 4.3.0 to 4.4.0
Bumps [pre-commit](https://github.com/pre-commit/pre-commit) from 4.3.0 to 4.4.0.
- [Release notes](https://github.com/pre-commit/pre-commit/releases)
- [Changelog](https://github.com/pre-commit/pre-commit/blob/main/CHANGELOG.md)
- [Commits](https://github.com/pre-commit/pre-commit/compare/v4.3.0...v4.4.0)

---
updated-dependencies:
- dependency-name: pre-commit
  dependency-version: 4.4.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-17 03:02:21 +00:00
dependabot[bot]
81c49136d1 chore(deps): bump certifi from 2025.10.5 to 2025.11.12
Bumps [certifi](https://github.com/certifi/python-certifi) from 2025.10.5 to 2025.11.12.
- [Commits](https://github.com/certifi/python-certifi/compare/2025.10.05...2025.11.12)

---
updated-dependencies:
- dependency-name: certifi
  dependency-version: 2025.11.12
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-17 03:02:18 +00:00
dependabot[bot]
4297207226 chore(deps): bump torch from 2.9.0 to 2.9.1
Bumps [torch](https://github.com/pytorch/pytorch) from 2.9.0 to 2.9.1.
- [Release notes](https://github.com/pytorch/pytorch/releases)
- [Changelog](https://github.com/pytorch/pytorch/blob/main/RELEASE.md)
- [Commits](https://github.com/pytorch/pytorch/compare/v2.9.0...v2.9.1)

---
updated-dependencies:
- dependency-name: torch
  dependency-version: 2.9.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-17 03:02:14 +00:00
dependabot[bot]
3877fb46de chore(deps): bump fastapi from 0.121.0 to 0.121.1
Bumps [fastapi](https://github.com/fastapi/fastapi) from 0.121.0 to 0.121.1.
- [Release notes](https://github.com/fastapi/fastapi/releases)
- [Commits](https://github.com/fastapi/fastapi/compare/0.121.0...0.121.1)

---
updated-dependencies:
- dependency-name: fastapi
  dependency-version: 0.121.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-17 03:01:56 +00:00
dependabot[bot]
22707b8664 chore(deps): bump mkdocs-material in the mkdocs group
Bumps the mkdocs group with 1 update: [mkdocs-material](https://github.com/squidfunk/mkdocs-material).


Updates `mkdocs-material` from 9.6.23 to 9.7.0
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.6.23...9.7.0)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-version: 9.7.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: mkdocs
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-17 03:01:46 +00:00
dependabot[bot]
d2c380c83b chore(deps-dev): bump types-python-dateutil in the types group
Bumps the types group with 1 update: [types-python-dateutil](https://github.com/typeshed-internal/stub_uploader).


Updates `types-python-dateutil` from 2.9.0.20251008 to 2.9.0.20251108
- [Commits](https://github.com/typeshed-internal/stub_uploader/commits)

---
updated-dependencies:
- dependency-name: types-python-dateutil
  dependency-version: 2.9.0.20251108
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: types
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-17 03:01:12 +00:00
Matthias
bc516db3f8 refactor: add generic "migrate" method 2025-11-16 09:11:02 +01:00
Matthias
5c0cf8f228 chore: prevent execution of command partials on python <3.13 2025-11-16 08:41:14 +01:00
Matthias
b753231d3c Merge pull request #12512 from mrpabloyeah/fix-high_value-calculation-in-calculate_max_drawdown
Fix high_value calculation in calculate_max_drawdown()
2025-11-15 16:03:35 +01:00
Matthias
af728f8224 chore: update command partial 2025-11-15 15:50:58 +01:00
Matthias
5000927939 test: add tests for new list-timeframes behavior 2025-11-15 15:49:45 +01:00
Matthias
89274bfcdb test: update tests for new timeframe approach 2025-11-15 15:46:09 +01:00
Matthias
ef86b4113d feat: add trading-mode to list-timeframes
some exchanges provide different timeframe configurations depending on the market type
2025-11-15 13:11:10 +01:00
Matthias
38ff755533 fix: start drawdown series with a 0 row
This will account for edge-cases with no winning / losing trades
2025-11-15 09:52:24 +01:00
Matthias
70ec376657 test: further expand drawdown test 2025-11-15 09:51:27 +01:00
Matthias
1a506dc4b4 test: add tests for high/low logic 2025-11-14 19:41:52 +01:00
mrpabloyeah
47451dd989 Fix high_value calculation in calculate_max_drawdown() 2025-11-13 20:14:39 +01:00
Matthias
705849db3d Merge pull request #12511 from freqtrade/update/binance-leverage-tiers
Update Binance Leverage Tiers
2025-11-13 06:55:06 +01:00
Freqtrade Bot
14d3096a22 chore: update pre-commit hooks 2025-11-13 03:22:53 +00:00
Matthias
72889e2edb Merge pull request #12504 from freqtrade/update/pre-commit-hooks
Update pre-commit hooks
2025-11-11 06:32:49 +01:00
Freqtrade Bot
0f17b04b2f chore: update pre-commit hooks 2025-11-11 03:23:01 +00:00
Matthias
179a5ba6ed Merge pull request #12498 from freqtrade/dependabot/pip/develop/fastapi-0.121.0
chore(deps): bump fastapi from 0.120.2 to 0.121.0
2025-11-10 07:04:54 +01:00
Matthias
ed65b012b8 Merge pull request #12501 from freqtrade/dependabot/pip/develop/ccxt-4.5.17
chore(deps): bump ccxt from 4.5.16 to 4.5.17
2025-11-10 06:59:48 +01:00
dependabot[bot]
625629b9db chore(deps): bump fastapi from 0.120.2 to 0.121.0
Bumps [fastapi](https://github.com/fastapi/fastapi) from 0.120.2 to 0.121.0.
- [Release notes](https://github.com/fastapi/fastapi/releases)
- [Commits](https://github.com/fastapi/fastapi/compare/0.120.2...0.121.0)

---
updated-dependencies:
- dependency-name: fastapi
  dependency-version: 0.121.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-10 05:48:14 +00:00
Matthias
9fa9f0860c chore: remove coincurve - ccxt depends directly on it 2025-11-10 06:43:05 +01:00
Matthias
5970881bb8 Merge pull request #12500 from freqtrade/dependabot/pip/develop/markdown-3.10
chore(deps): bump markdown from 3.9 to 3.10
2025-11-10 06:38:31 +01:00
Matthias
bed93429cd Merge pull request #12493 from freqtrade/dependabot/pip/develop/plotly-6.4.0
chore(deps): bump plotly from 6.3.1 to 6.4.0
2025-11-10 06:38:11 +01:00
Matthias
3af9089d51 Merge pull request #12499 from freqtrade/dependabot/pip/develop/gymnasium-1.2.2
chore(deps): bump gymnasium from 1.2.1 to 1.2.2
2025-11-10 06:37:56 +01:00
Matthias
3aed562806 Merge pull request #12497 from freqtrade/dependabot/pip/develop/pydantic-2.12.4
chore(deps): bump pydantic from 2.12.3 to 2.12.4
2025-11-10 06:36:58 +01:00
Matthias
7f32ce498b Merge pull request #12496 from freqtrade/dependabot/pip/develop/ruff-0.14.3
chore(deps-dev): bump ruff from 0.14.2 to 0.14.3
2025-11-10 06:36:30 +01:00
Matthias
9e89ba6eed Merge pull request #12495 from freqtrade/dependabot/pip/develop/psutil-7.1.3
chore(deps): bump psutil from 7.1.2 to 7.1.3
2025-11-10 06:36:12 +01:00
Matthias
82309c3f47 Merge pull request #12494 from freqtrade/dependabot/github_actions/develop/docker/setup-qemu-action-3.7.0
chore(deps): bump docker/setup-qemu-action from 3.6.0 to 3.7.0
2025-11-10 06:35:59 +01:00
Matthias
d5613cf471 Merge pull request #12492 from freqtrade/dependabot/pip/develop/mkdocs-30218cca00
chore(deps): bump mkdocs-material from 9.6.22 to 9.6.23 in the mkdocs group
2025-11-10 06:35:34 +01:00
dependabot[bot]
73f91eab15 chore(deps): bump ccxt from 4.5.16 to 4.5.17
Bumps [ccxt](https://github.com/ccxt/ccxt) from 4.5.16 to 4.5.17.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/exchanges.cfg)
- [Commits](https://github.com/ccxt/ccxt/compare/v4.5.16...v4.5.17)

---
updated-dependencies:
- dependency-name: ccxt
  dependency-version: 4.5.17
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-10 03:03:06 +00:00
dependabot[bot]
35fb598017 chore(deps): bump markdown from 3.9 to 3.10
Bumps [markdown](https://github.com/Python-Markdown/markdown) from 3.9 to 3.10.
- [Release notes](https://github.com/Python-Markdown/markdown/releases)
- [Changelog](https://github.com/Python-Markdown/markdown/blob/master/docs/changelog.md)
- [Commits](https://github.com/Python-Markdown/markdown/compare/3.9.0...3.10.0)

---
updated-dependencies:
- dependency-name: markdown
  dependency-version: '3.10'
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-10 03:02:56 +00:00
dependabot[bot]
40b9a836eb chore(deps): bump gymnasium from 1.2.1 to 1.2.2
Bumps [gymnasium](https://github.com/Farama-Foundation/Gymnasium) from 1.2.1 to 1.2.2.
- [Release notes](https://github.com/Farama-Foundation/Gymnasium/releases)
- [Commits](https://github.com/Farama-Foundation/Gymnasium/compare/v1.2.1...v1.2.2)

---
updated-dependencies:
- dependency-name: gymnasium
  dependency-version: 1.2.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-10 03:02:44 +00:00
dependabot[bot]
7189c0ff35 chore(deps): bump pydantic from 2.12.3 to 2.12.4
Bumps [pydantic](https://github.com/pydantic/pydantic) from 2.12.3 to 2.12.4.
- [Release notes](https://github.com/pydantic/pydantic/releases)
- [Changelog](https://github.com/pydantic/pydantic/blob/v2.12.4/HISTORY.md)
- [Commits](https://github.com/pydantic/pydantic/compare/v2.12.3...v2.12.4)

---
updated-dependencies:
- dependency-name: pydantic
  dependency-version: 2.12.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-10 03:02:34 +00:00
dependabot[bot]
0eb206c7b3 chore(deps-dev): bump ruff from 0.14.2 to 0.14.3
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.14.2 to 0.14.3.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/0.14.2...0.14.3)

---
updated-dependencies:
- dependency-name: ruff
  dependency-version: 0.14.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-10 03:02:27 +00:00
dependabot[bot]
728d2c9bcb chore(deps): bump psutil from 7.1.2 to 7.1.3
Bumps [psutil](https://github.com/giampaolo/psutil) from 7.1.2 to 7.1.3.
- [Changelog](https://github.com/giampaolo/psutil/blob/master/HISTORY.rst)
- [Commits](https://github.com/giampaolo/psutil/compare/release-7.1.2...release-7.1.3)

---
updated-dependencies:
- dependency-name: psutil
  dependency-version: 7.1.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-10 03:02:16 +00:00
dependabot[bot]
f22feb7dee chore(deps): bump docker/setup-qemu-action from 3.6.0 to 3.7.0
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 3.6.0 to 3.7.0.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](29109295f8...c7c5346462)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-version: 3.7.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-10 03:02:07 +00:00
dependabot[bot]
c6bf0e1843 chore(deps): bump plotly from 6.3.1 to 6.4.0
Bumps [plotly](https://github.com/plotly/plotly.py) from 6.3.1 to 6.4.0.
- [Release notes](https://github.com/plotly/plotly.py/releases)
- [Changelog](https://github.com/plotly/plotly.py/blob/main/CHANGELOG.md)
- [Commits](https://github.com/plotly/plotly.py/compare/v6.3.1...v6.4.0)

---
updated-dependencies:
- dependency-name: plotly
  dependency-version: 6.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-10 03:02:04 +00:00
dependabot[bot]
68836cb7be chore(deps): bump mkdocs-material in the mkdocs group
Bumps the mkdocs group with 1 update: [mkdocs-material](https://github.com/squidfunk/mkdocs-material).


Updates `mkdocs-material` from 9.6.22 to 9.6.23
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.6.22...9.6.23)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-version: 9.6.23
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: mkdocs
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-10 03:01:51 +00:00
Matthias
706955e5fc Merge pull request #12489 from freqtrade/partials-3.13
Partials with python 3.13
2025-11-09 09:02:37 +01:00
Matthias
9aec10b0f3 docs: update badge link to point to CI workflow directly 2025-11-09 08:43:16 +01:00
Matthias
b6b817e051 chore: re-export all command partials 2025-11-09 08:41:02 +01:00
Matthias
40107b9380 feat: format partials codeblock as outputs 2025-11-09 08:40:35 +01:00
Matthias
8804850170 refactor: extract partial-file writing 2025-11-09 08:38:32 +01:00
Matthias
d246933c28 refactor: improve partials script 2025-11-09 08:37:39 +01:00
Matthias
777ff1938e feat: extract freqtrade-client to auto-use help 2025-11-09 08:36:42 +01:00
Matthias
2846d9478e chore: fix ci condition 2025-11-09 08:30:38 +01:00
Matthias
5d494eac51 docs: update command partials to be created with python 3.13 2025-11-09 08:07:37 +01:00
Matthias
e26c3cbe5a chore: update CI to create partials on 3.13 2025-11-09 08:07:16 +01:00
Matthias
81a5056e1b fix: support ft-client help and ft-client show commands 2025-11-09 08:03:07 +01:00
Matthias
1876656afc Merge pull request #12488 from stash86/main-stash
update docs regarding forceenter endpoint
2025-11-09 07:59:37 +01:00
Stefano
889ab7ea00 update docs regarding forceenter endpoint 2025-11-09 13:33:07 +09:00
Matthias
2d4b02f7e5 refactor: align wording from category to space 2025-11-08 19:24:11 +01:00
Matthias
c5a339eaf3 refactor: improve wording from category to space 2025-11-08 16:34:12 +01:00
Matthias
1e50a2da53 refactor: simplify hyperopt-auto 2025-11-08 16:26:05 +01:00
Matthias
7d1c2d3a1b test: Update test mock approach for hyperopt 2025-11-08 16:25:07 +01:00
Matthias
a9f9b73a3a Merge pull request #12479 from freqtrade/feat/hyperopt_custom_spaces
Add support for custom hyperopt spaces
2025-11-08 16:01:42 +01:00
Matthias
236df5be6f chore: remove unnecessary pip flag
closes #12487
2025-11-07 19:45:05 +01:00
Matthias
6ea83ba0e7 docs: clarify space naming prevalence 2025-11-06 20:58:12 +01:00
Matthias
992c2f9e3e feat: improve code for list-strategies 2025-11-06 20:51:30 +01:00
Matthias
5e74700e31 chore: don't use conflicting spaces in sample strategy 2025-11-06 20:45:33 +01:00
Matthias
4a225cab23 test: update test for new "conflicting" behavior 2025-11-06 20:43:57 +01:00
Matthias
524ceebcbb fix: don't restrict spaces - explicitly defined space should win 2025-11-06 20:43:46 +01:00
Matthias
f93c906614 test: improve tests for new builtin spaces 2025-11-06 20:36:40 +01:00
Matthias
b32ba68a6e docs: at enter/exit spaces as builtin spaces 2025-11-06 20:33:09 +01:00
Matthias
649aff8076 feat: add builtin spaces enter and exit 2025-11-06 20:30:38 +01:00
Matthias
a3efba019f docs: update documentation for new hyperopt spaces 2025-11-06 20:06:52 +01:00
Matthias
ff4230af8a chore: update space parameter docstring 2025-11-06 19:43:35 +01:00
Matthias
d1014ce3ce Merge pull request #12448 from stash86/main-stash
Add blacklist mode to MarketcapPairlist
2025-11-06 07:30:37 +01:00
Matthias
3bad6d3341 chore: switch white/blacklist to option 2025-11-06 07:10:05 +01:00
Matthias
7526fd0e0d test: Add additional test
shows the difference between max_rank 2 and max_rank6 in blacklist mode.
2025-11-06 07:05:36 +01:00
Matthias
a2ec085dab Merge pull request #12484 from freqtrade/update/binance-leverage-tiers
Update Binance Leverage Tiers
2025-11-06 06:28:25 +01:00
Freqtrade Bot
cce7702e9c chore: update pre-commit hooks 2025-11-06 03:23:16 +00:00
Matthias
1cf7f4f9d8 Merge pull request #12480 from freqtrade/feat/add_coincurve
Add coincurve for faster ECDSA signing
2025-11-05 21:05:45 +01:00
Matthias
1328df772b feat: ensure spaces are valid identifiers 2025-11-05 21:05:15 +01:00
Matthias
68dea691c2 chore: improve help wording 2025-11-05 20:59:39 +01:00
Matthias
f214942ff1 fix: improve error message for missing hyperopt parameters 2025-11-05 20:49:32 +01:00
Matthias
91866c1165 refactor: move lookup dictionary outside of loop 2025-11-05 20:46:53 +01:00
Matthias
f73cbed843 chore: update ccxt version to 4.5.16 2025-11-05 20:43:36 +01:00
Matthias
5ad817f59e chore: add coincurve to support faster ECDSA signing 2025-11-05 20:41:19 +01:00
Matthias
4a8f487b68 chore: update json schema 2025-11-05 20:38:55 +01:00
Matthias
d1b553cecc test: add custom parameter to test strategy 2025-11-05 20:14:28 +01:00
Matthias
1a2f261ee2 feat: support "--spaces all" with custom spaces 2025-11-05 20:12:56 +01:00
Matthias
cfd4926f47 chore: fix odd indentation error 2025-11-05 20:03:03 +01:00
Matthias
36593ec593 Merge pull request #12477 from fengyuchuanshen/develop
chore: minor improvement for docs
2025-11-05 19:42:11 +01:00
fengyuchuanshen
dc5f646f24 chore: minor improvement for docs
Signed-off-by: fengyuchuanshen <fengyuchuanshen@outlook.com>
2025-11-05 22:32:32 +08:00
Matthias
d7e4965cde feat: improve list-strategies command output 2025-11-04 07:21:43 +01:00
Matthias
e22bf5c681 chore: non-loaded strategies shouldn't show as hyperoptable 2025-11-04 07:16:57 +01:00
Matthias
007ab1b796 test: some cleanup 2025-11-04 07:14:01 +01:00
Matthias
c748ac2aa2 chore: be more precise in type 2025-11-04 07:13:07 +01:00
Matthias
c091426c44 feat: improve Auto-space detection logic 2025-11-04 07:07:55 +01:00
Matthias
ab28e43050 test: update tests to new behavior 2025-11-04 07:07:55 +01:00
Matthias
74a18bdb11 chore: improve output wording/formatting 2025-11-04 07:07:55 +01:00
Matthias
367b9fa7f6 test: fix failing test 2025-11-04 07:07:55 +01:00
Matthias
8269333d9c feat: improve output wording 2025-11-04 07:07:55 +01:00
Matthias
d83f222a13 chore: remove unused imports 2025-11-04 07:07:55 +01:00
Matthias
2ba9172526 feat: Assign all matching parameters 2025-11-04 07:07:55 +01:00
Matthias
465af62c16 feat: further updates 2025-11-04 07:07:55 +01:00
Matthias
231a145716 refactor: improve parameter storage 2025-11-04 07:07:55 +01:00
Matthias
4cabbe4d52 test: remove detect_parameters from tests 2025-11-04 07:07:55 +01:00
Matthias
72c87b7cbd chore: remove no longer used function 2025-11-04 07:07:55 +01:00
Matthias
3da6006a44 feat: improve hyperopt detection logic 2025-11-04 07:07:55 +01:00
Matthias
6f48b82297 test: slight update to test ... 2025-11-04 07:07:55 +01:00
Matthias
ac51b41fdf refactor: remove pointless wrapper 2025-11-04 07:07:55 +01:00
Matthias
4b0b306c44 fix: hyperoptable should work whenever there's any space detected. 2025-11-04 07:07:55 +01:00
Matthias
fd0acc074c feat: improve parameter detection to detect random named spaces 2025-11-04 07:07:55 +01:00
Matthias
39c37980d5 fix: improve resiliance 2025-11-04 07:07:55 +01:00
Matthias
6dc2547177 feat: Update output for random space names 2025-11-04 07:07:55 +01:00
Matthias
d1224367e5 feat: further enable dynamic hyperopt parameters 2025-11-04 07:07:55 +01:00
Matthias
c88a92b4f9 feat: allow init of random spaces 2025-11-04 07:07:55 +01:00
Matthias
ffab6c3c50 test: Add test for "no hyperopt parameters found" error 2025-11-04 07:07:55 +01:00
Matthias
cb7e04bfb0 feat: add explicit scenario testing if any parameter is selected 2025-11-04 07:07:55 +01:00
Matthias
c6a7b84684 test: update test for new init sequence 2025-11-04 07:07:55 +01:00
Matthias
97afb4a56a chore: remove no longer used helper methods 2025-11-04 07:07:55 +01:00
Matthias
886c15a7fb test: update test asserting no longer existing metric 2025-11-04 07:07:55 +01:00
Matthias
e34e84c5c6 refactor: further refactor of hyperopt spaces 2025-11-04 07:07:55 +01:00
Matthias
4cac68d774 chore: refactor buy/sell spaces slightly 2025-11-04 07:07:55 +01:00
Matthias
a792744c0d refactor: improve get_indicator space naming 2025-11-04 07:07:55 +01:00
Matthias
384ed3fafb feat: don't limit spaces to builtin spaces 2025-11-04 07:07:54 +01:00
Matthias
80ea476497 Merge pull request #12461 from freqtrade/feat/stringread_strategyload
improve strategy loading with huge strategy libraries
2025-11-04 06:37:28 +01:00
Matthias
8ddbf4ba08 Merge pull request #12476 from freqtrade/update/pre-commit-hooks
Update pre-commit hooks
2025-11-04 06:29:07 +01:00
Freqtrade Bot
041d93a254 chore: update pre-commit hooks 2025-11-04 03:20:44 +00:00
Matthias
167f264bc4 Merge pull request #12470 from freqtrade/dependabot/pip/develop/ccxt-4.5.14
chore(deps): bump ccxt from 4.5.12 to 4.5.14
2025-11-03 17:12:19 +01:00
Matthias
5c036f5fcc Merge pull request #12474 from freqtrade/dependabot/pip/develop/pyarrow-22.0.0
chore(deps): bump pyarrow from 20.0.0 to 22.0.0
2025-11-03 16:54:29 +01:00
Matthias
964ed8099c chore: remove workaround dependency pin for aarch64 2025-11-03 11:59:18 +01:00
Matthias
71b169616f chore: update pyarrow armhf wheel 2025-11-03 11:58:59 +01:00
Matthias
d824755597 Merge pull request #12468 from freqtrade/dependabot/github_actions/develop/actions/upload-artifact-5
chore(deps): bump actions/upload-artifact from 4 to 5
2025-11-03 07:15:06 +01:00
Matthias
8e41699348 Merge pull request #12466 from freqtrade/dependabot/pip/develop/scipy-16e6c1b478
chore(deps): bump the scipy group with 2 updates
2025-11-03 07:13:59 +01:00
dependabot[bot]
a580ba1903 chore(deps): bump pyarrow from 20.0.0 to 22.0.0
Bumps [pyarrow](https://github.com/apache/arrow) from 20.0.0 to 22.0.0.
- [Release notes](https://github.com/apache/arrow/releases)
- [Commits](https://github.com/apache/arrow/compare/apache-arrow-20.0.0...apache-arrow-22.0.0)

---
updated-dependencies:
- dependency-name: pyarrow
  dependency-version: 22.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-03 06:04:07 +00:00
Matthias
edcb3696f1 Merge pull request #12472 from freqtrade/dependabot/pip/develop/orjson-3.11.4
chore(deps): bump orjson from 3.11.3 to 3.11.4
2025-11-03 07:00:57 +01:00
dependabot[bot]
f1f07a1764 chore(deps): bump ccxt from 4.5.12 to 4.5.14
Bumps [ccxt](https://github.com/ccxt/ccxt) from 4.5.12 to 4.5.14.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/exchanges.cfg)
- [Commits](https://github.com/ccxt/ccxt/compare/v4.5.12...v4.5.14)

---
updated-dependencies:
- dependency-name: ccxt
  dependency-version: 4.5.14
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-03 05:38:09 +00:00
Matthias
5139ea4e1c chore: bump scipy-stubs in pre-commit config 2025-11-03 06:35:10 +01:00
dependabot[bot]
fdf9d4da81 chore(deps): bump orjson from 3.11.3 to 3.11.4
Bumps [orjson](https://github.com/ijl/orjson) from 3.11.3 to 3.11.4.
- [Release notes](https://github.com/ijl/orjson/releases)
- [Changelog](https://github.com/ijl/orjson/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ijl/orjson/compare/3.11.3...3.11.4)

---
updated-dependencies:
- dependency-name: orjson
  dependency-version: 3.11.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-03 05:34:32 +00:00
Matthias
65267b2bb7 Merge pull request #12471 from freqtrade/dependabot/pip/develop/psutil-7.1.2
chore(deps): bump psutil from 7.1.1 to 7.1.2
2025-11-03 06:32:12 +01:00
Matthias
420bb720c1 Merge pull request #12473 from freqtrade/dependabot/pip/develop/aiohttp-3.13.2
chore(deps): bump aiohttp from 3.13.1 to 3.13.2
2025-11-03 06:31:54 +01:00
Matthias
bfbb6404e6 Merge pull request #12469 from freqtrade/dependabot/pip/develop/ruff-0.14.2
chore(deps-dev): bump ruff from 0.14.1 to 0.14.2
2025-11-03 06:31:39 +01:00
Matthias
6ffc88b3b3 Merge pull request #12464 from freqtrade/dependabot/github_actions/develop/actions/download-artifact-6
chore(deps): bump actions/download-artifact from 5 to 6
2025-11-03 06:31:30 +01:00
Matthias
54501b5c16 Merge pull request #12465 from freqtrade/dependabot/github_actions/develop/astral-sh/setup-uv-7.1.2
chore(deps): bump astral-sh/setup-uv from 7.1.0 to 7.1.2
2025-11-03 06:31:11 +01:00
Matthias
d7ef5e8bd2 Merge pull request #12467 from freqtrade/dependabot/pip/develop/fastapi-0.120.2
chore(deps): bump fastapi from 0.119.1 to 0.120.2
2025-11-03 06:30:28 +01:00
dependabot[bot]
c7e64360cd chore(deps): bump aiohttp from 3.13.1 to 3.13.2
---
updated-dependencies:
- dependency-name: aiohttp
  dependency-version: 3.13.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-03 03:03:15 +00:00
dependabot[bot]
55b66ca5e6 chore(deps): bump psutil from 7.1.1 to 7.1.2
Bumps [psutil](https://github.com/giampaolo/psutil) from 7.1.1 to 7.1.2.
- [Changelog](https://github.com/giampaolo/psutil/blob/master/HISTORY.rst)
- [Commits](https://github.com/giampaolo/psutil/compare/release-7.1.1...release-7.1.2)

---
updated-dependencies:
- dependency-name: psutil
  dependency-version: 7.1.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-03 03:02:52 +00:00
dependabot[bot]
1fc6cf4c89 chore(deps-dev): bump ruff from 0.14.1 to 0.14.2
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.14.1 to 0.14.2.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/0.14.1...0.14.2)

---
updated-dependencies:
- dependency-name: ruff
  dependency-version: 0.14.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-03 03:02:33 +00:00
dependabot[bot]
918e7c4bf8 chore(deps): bump actions/upload-artifact from 4 to 5
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-03 03:02:20 +00:00
dependabot[bot]
cfc406709c chore(deps): bump fastapi from 0.119.1 to 0.120.2
Bumps [fastapi](https://github.com/fastapi/fastapi) from 0.119.1 to 0.120.2.
- [Release notes](https://github.com/fastapi/fastapi/releases)
- [Commits](https://github.com/fastapi/fastapi/compare/0.119.1...0.120.2)

---
updated-dependencies:
- dependency-name: fastapi
  dependency-version: 0.120.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-03 03:02:20 +00:00
dependabot[bot]
9f55dac605 chore(deps): bump the scipy group with 2 updates
Bumps the scipy group with 2 updates: [scipy](https://github.com/scipy/scipy) and [scipy-stubs](https://github.com/scipy/scipy-stubs).


Updates `scipy` from 1.16.2 to 1.16.3
- [Release notes](https://github.com/scipy/scipy/releases)
- [Commits](https://github.com/scipy/scipy/compare/v1.16.2...v1.16.3)

Updates `scipy-stubs` from 1.16.2.4 to 1.16.3.0
- [Release notes](https://github.com/scipy/scipy-stubs/releases)
- [Commits](https://github.com/scipy/scipy-stubs/compare/v1.16.2.4...v1.16.3.0)

---
updated-dependencies:
- dependency-name: scipy
  dependency-version: 1.16.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: scipy
- dependency-name: scipy-stubs
  dependency-version: 1.16.3.0
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: scipy
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-03 03:02:11 +00:00
dependabot[bot]
00a6575fb4 chore(deps): bump astral-sh/setup-uv from 7.1.0 to 7.1.2
Bumps [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) from 7.1.0 to 7.1.2.
- [Release notes](https://github.com/astral-sh/setup-uv/releases)
- [Commits](3259c6206f...85856786d1)

---
updated-dependencies:
- dependency-name: astral-sh/setup-uv
  dependency-version: 7.1.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-03 03:02:01 +00:00
dependabot[bot]
c6eb63ab77 chore(deps): bump actions/download-artifact from 5 to 6
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 5 to 6.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-03 03:01:53 +00:00
Matthias
db63d433f7 chore: improve log message 2025-11-02 16:49:07 +01:00
Matthias
635af046bf test: add test for string loading skipping 2025-11-02 16:48:53 +01:00
Matthias
86381955a3 feat: use text-analysis to short-circuit strategy loading 2025-11-02 16:30:38 +01:00
Matthias
3cfa366ec9 fix: validate trading-mode support when downloading data
closes #12458
2025-11-02 09:40:15 +01:00
Matthias
baa5b1a58e feat: support validating trading mode only 2025-11-02 09:38:27 +01:00
Matthias
5be0a9c069 test: update test trading-mode validation test 2025-11-02 09:38:10 +01:00
Matthias
8978da7c20 Merge pull request #12457 from luckynick/patch-2
Update exchanges.md - clarify Hyperliquid docs on subaccounts usage
2025-11-02 09:23:05 +01:00
Matthias
b3bbb92358 docs: slight rewording of hyperliquid subaccount docs 2025-11-02 09:08:43 +01:00
luckynick
06ac40fdbb Update exchanges.md 2025-11-01 14:05:20 +01:00
Matthias
d38d8167d8 chore: update command-partials 2025-11-01 11:49:16 +01:00
Matthias
5684d0de0b chore: improve description formatting 2025-11-01 11:05:08 +01:00
Matthias
a2f887aabb chore: update config schema 2025-11-01 09:47:23 +01:00
Matthias
f72e708627 chore: move some setting-validations to config-schema 2025-11-01 09:47:23 +01:00
Stefano
781d8501cb update docs 2025-11-01 08:41:47 +09:00
Stefano
015f1055a7 add tests 2025-10-31 17:22:46 +09:00
Matthias
2466cf85a1 Merge branch 'new_release' into develop 2025-10-31 07:16:45 +01:00
Matthias
e6ddeef07f chore: update version to 2025.11-dev 2025-10-31 07:16:33 +01:00
Stefano
614b85e833 add blacklist mode 2025-10-30 15:49:48 +09:00
160 changed files with 11040 additions and 8760 deletions

View File

@@ -2,7 +2,7 @@ version: 2
updates:
- package-ecosystem: docker
cooldown:
default-days: 4
default-days: 7
directories:
- "/"
- "/docker"
@@ -16,7 +16,7 @@ updates:
- package-ecosystem: devcontainers
directory: "/"
cooldown:
default-days: 4
default-days: 7
schedule:
interval: daily
open-pull-requests-limit: 10
@@ -24,7 +24,7 @@ updates:
- package-ecosystem: pip
directory: "/"
cooldown:
default-days: 4
default-days: 7
exclude:
- ccxt
schedule:
@@ -51,7 +51,7 @@ updates:
- package-ecosystem: "github-actions"
directory: "/"
cooldown:
default-days: 4
default-days: 7
schedule:
interval: "weekly"
open-pull-requests-limit: 10

View File

@@ -15,7 +15,7 @@ jobs:
environment:
name: develop
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6.0.0
with:
persist-credentials: false
@@ -34,7 +34,7 @@ jobs:
run: python build_helpers/binance_update_lev_tiers.py
- uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
- uses: peter-evans/create-pull-request@84ae59a2cdc2258d6fa0732dd66352dddae2a412 # v7.0.9
with:
token: ${{ secrets.REPO_SCOPED_TOKEN }}
add-paths: freqtrade/exchange/binance_leverage_tiers.json

View File

@@ -28,7 +28,7 @@ jobs:
python-version: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6.0.0
with:
persist-credentials: false
@@ -38,7 +38,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@3259c6206f993105e3a61b142c2d97bf4b9ef83d # v7.1.0
uses: astral-sh/setup-uv@1e862dfacbd1d6d858c55d9b792c756523627244 # v7.1.4
with:
activate-environment: true
enable-cache: true
@@ -74,15 +74,17 @@ jobs:
run: |
pytest --random-order --cov=freqtrade --cov=freqtrade_client --cov-config=.coveragerc
- name: Coveralls
- uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
if: (runner.os == 'Linux' && matrix.python-version == '3.12' && matrix.os == 'ubuntu-24.04')
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Cleanup codecov dirty state files
if: (runner.os == 'Linux' && matrix.python-version == '3.12' && matrix.os == 'ubuntu-24.04')
env:
# Coveralls token. Not used as secret due to github not providing secrets to forked repositories
COVERALLS_REPO_TOKEN: 6D1m0xupS3FgutfuGao8keFf9Hc0FpIXu
run: |
# Allow failure for coveralls
uv pip install coveralls
coveralls || true
# See https://github.com/codecov/codecov-action/issues/1851
rm -rf codecov codecov.SHA256SUM codecov.SHA256SUM.sig
- name: Run json schema extract
# This should be kept before the repository check to ensure that the schema is up-to-date
@@ -91,12 +93,12 @@ jobs:
- name: Run command docs partials extract
# This should be kept before the repository check to ensure that the docs are up-to-date
if: ${{ (matrix.python-version == '3.13') }}
run: |
python build_helpers/create_command_partials.py
- name: Check for repository changes - *nix
# TODO: python 3.13 slightly changed the output of argparse.
if: ${{ (matrix.python-version != '3.13') && (runner.os != 'Windows') }}
if: ${{ (runner.os != 'Windows') }}
run: |
if [ -n "$(git status --porcelain)" ]; then
echo "Repository is dirty, changes detected:"
@@ -175,7 +177,7 @@ jobs:
name: "Mypy Version Check"
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6.0.0
with:
persist-credentials: false
@@ -193,7 +195,7 @@ jobs:
name: "Pre-commit checks"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6.0.0
with:
persist-credentials: false
@@ -206,7 +208,7 @@ jobs:
name: "Documentation build"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6.0.0
with:
persist-credentials: false
@@ -238,7 +240,7 @@ jobs:
name: "Tests and Linting - Online tests"
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6.0.0
with:
persist-credentials: false
@@ -248,7 +250,7 @@ jobs:
python-version: "3.12"
- name: Install uv
uses: astral-sh/setup-uv@3259c6206f993105e3a61b142c2d97bf4b9ef83d # v7.1.0
uses: astral-sh/setup-uv@1e862dfacbd1d6d858c55d9b792c756523627244 # v7.1.4
with:
activate-environment: true
enable-cache: true
@@ -273,10 +275,7 @@ jobs:
# Notify only once - when CI completes (and after deploy) in case it's successful
notify-complete:
needs: [
tests,
docs-check,
mypy-version-check,
pre-commit,
build,
build-linux-online
]
runs-on: ubuntu-22.04
@@ -304,12 +303,24 @@ jobs:
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
build:
if: always()
name: "Build"
needs: [ tests, docs-check, mypy-version-check, pre-commit ]
needs: [
tests,
docs-check,
mypy-version-check,
pre-commit,
]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v5
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
with:
jobs: ${{ toJSON(needs) }}
- uses: actions/checkout@v6.0.0
with:
persist-credentials: false
@@ -324,7 +335,7 @@ jobs:
python -m build --sdist --wheel
- name: Upload artifacts 📦
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: freqtrade-build
path: |
@@ -337,7 +348,7 @@ jobs:
python -m build --sdist --wheel ft_client
- name: Upload artifacts 📦
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: freqtrade-client-build
path: |
@@ -356,12 +367,12 @@ jobs:
id-token: write
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6.0.0
with:
persist-credentials: false
- name: Download artifact 📦
uses: actions/download-artifact@v5
uses: actions/download-artifact@v6
with:
pattern: freqtrade*-build
path: dist
@@ -385,12 +396,12 @@ jobs:
id-token: write
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6.0.0
with:
persist-credentials: false
- name: Download artifact 📦
uses: actions/download-artifact@v5
uses: actions/download-artifact@v6
with:
pattern: freqtrade*-build
path: dist
@@ -403,10 +414,7 @@ jobs:
docker-build:
name: "Docker Build and Deploy"
needs: [
tests,
docs-check,
mypy-version-check,
pre-commit
build,
]
if: (github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'release') && github.repository == 'freqtrade/freqtrade'
uses: ./.github/workflows/docker-build.yml

View File

@@ -19,7 +19,7 @@ jobs:
name: Deploy Docs through mike
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6.0.0
with:
persist-credentials: true

View File

@@ -24,7 +24,7 @@ jobs:
packages: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6.0.0
with:
persist-credentials: false
- name: Login to GitHub Container Registry

View File

@@ -33,7 +33,7 @@ jobs:
if: github.repository == 'freqtrade/freqtrade'
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6.0.0
with:
persist-credentials: false
@@ -48,7 +48,7 @@ jobs:
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Set up QEMU
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
with:
cache-image: false
@@ -152,7 +152,7 @@ jobs:
if: github.repository == 'freqtrade/freqtrade'
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6.0.0
with:
persist-credentials: false

View File

@@ -11,7 +11,7 @@ jobs:
dockerHubDescription:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6.0.0
with:
persist-credentials: false

View File

@@ -13,7 +13,7 @@ jobs:
auto-update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6.0.0
with:
persist-credentials: false
@@ -28,7 +28,7 @@ jobs:
- name: Run auto-update
run: pre-commit autoupdate
- uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
- uses: peter-evans/create-pull-request@84ae59a2cdc2258d6fa0732dd66352dddae2a412 # v7.0.9
with:
token: ${{ secrets.REPO_SCOPED_TOKEN }}
add-paths: .pre-commit-config.yaml

View File

@@ -14,6 +14,7 @@ permissions: {}
jobs:
zizmor:
name: Run zizmor 🌈
runs-on: ubuntu-latest
permissions:
security-events: write
@@ -21,9 +22,9 @@ jobs:
# actions: read # only needed for private repos
steps:
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
uses: actions/checkout@v6.0.0
with:
persist-credentials: false
- name: Run zizmor 🌈
uses: zizmorcore/zizmor-action@e673c3917a1aef3c65c972347ed84ccd013ecda4 # v0.2.0
uses: zizmorcore/zizmor-action@e639db99335bc9038abc0e066dfcd72e23d26fb4 # v0.3.0

View File

@@ -21,7 +21,7 @@ repos:
# stages: [push]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.18.2"
rev: "v1.19.0"
hooks:
- id: mypy
exclude: build_helpers
@@ -30,8 +30,8 @@ repos:
- types-filelock==3.2.7
- types-requests==2.32.4.20250913
- types-tabulate==0.9.0.20241207
- types-python-dateutil==2.9.0.20251008
- scipy-stubs==1.16.2.4
- types-python-dateutil==2.9.0.20251115
- scipy-stubs==1.16.3.1
- SQLAlchemy==2.0.44
# stages: [push]
@@ -44,7 +44,7 @@ repos:
- repo: https://github.com/charliermarsh/ruff-pre-commit
# Ruff version.
rev: 'v0.14.2'
rev: 'v0.14.7'
hooks:
- id: ruff
- id: ruff-format
@@ -83,6 +83,6 @@ repos:
# Ensure github actions remain safe
- repo: https://github.com/woodruffw/zizmor-pre-commit
rev: v1.16.0
rev: v1.18.0
hooks:
- id: zizmor

View File

@@ -1,6 +1,6 @@
# ![freqtrade](https://raw.githubusercontent.com/freqtrade/freqtrade/develop/docs/assets/freqtrade_poweredby.svg)
[![Freqtrade CI](https://github.com/freqtrade/freqtrade/actions/workflows/ci.yml/badge.svg?branch=develop)](https://github.com/freqtrade/freqtrade/actions/)
[![Freqtrade CI](https://github.com/freqtrade/freqtrade/actions/workflows/ci.yml/badge.svg?branch=develop)](https://github.com/freqtrade/freqtrade/actions/workflows/ci.yml)
[![DOI](https://joss.theoj.org/papers/10.21105/joss.04864/status.svg)](https://doi.org/10.21105/joss.04864)
[![Coverage Status](https://coveralls.io/repos/github/freqtrade/freqtrade/badge.svg?branch=develop&service=github)](https://coveralls.io/github/freqtrade/freqtrade?branch=develop)
[![Documentation](https://readthedocs.org/projects/freqtrade/badge/)](https://www.freqtrade.io)

View File

@@ -1,53 +1,71 @@
import subprocess # noqa: S404, RUF100
import sys
from pathlib import Path
subcommands = [
"trade",
"create-userdir",
"new-config",
"show-config",
"new-strategy",
"download-data",
"convert-data",
"convert-trade-data",
"trades-to-ohlcv",
"list-data",
"backtesting",
"backtesting-show",
"backtesting-analysis",
"edge",
"hyperopt",
"hyperopt-list",
"hyperopt-show",
"list-exchanges",
"list-markets",
"list-pairs",
"list-strategies",
"list-hyperoptloss",
"list-freqaimodels",
"list-timeframes",
"show-trades",
"test-pairlist",
"convert-db",
"install-ui",
"plot-dataframe",
"plot-profit",
"webserver",
"strategy-updater",
"lookahead-analysis",
"recursive-analysis",
]
result = subprocess.run(["freqtrade", "--help"], capture_output=True, text=True)
with Path("docs/commands/main.md").open("w") as f:
f.write(f"```\n{result.stdout}\n```\n")
def _write_partial_file(filename: str, content: str):
with Path(filename).open("w") as f:
f.write(f"``` output\n{content}\n```\n")
for command in subcommands:
print(f"Running for {command}")
result = subprocess.run(["freqtrade", command, "--help"], capture_output=True, text=True)
def extract_command_partials():
subcommands = [
"trade",
"create-userdir",
"new-config",
"show-config",
"new-strategy",
"download-data",
"convert-data",
"convert-trade-data",
"trades-to-ohlcv",
"list-data",
"backtesting",
"backtesting-show",
"backtesting-analysis",
"edge",
"hyperopt",
"hyperopt-list",
"hyperopt-show",
"list-exchanges",
"list-markets",
"list-pairs",
"list-strategies",
"list-hyperoptloss",
"list-freqaimodels",
"list-timeframes",
"show-trades",
"test-pairlist",
"convert-db",
"install-ui",
"plot-dataframe",
"plot-profit",
"webserver",
"strategy-updater",
"lookahead-analysis",
"recursive-analysis",
]
with Path(f"docs/commands/{command}.md").open("w") as f:
f.write(f"```\n{result.stdout}\n```\n")
result = subprocess.run(["freqtrade", "--help"], capture_output=True, text=True)
_write_partial_file("docs/commands/main.md", result.stdout)
for command in subcommands:
print(f"Running for {command}")
result = subprocess.run(["freqtrade", command, "--help"], capture_output=True, text=True)
_write_partial_file(f"docs/commands/{command}.md", result.stdout)
print("Running for freqtrade-client")
result_client = subprocess.run(["freqtrade-client", "--show"], capture_output=True, text=True)
_write_partial_file("docs/commands/freqtrade-client.md", result_client.stdout)
if __name__ == "__main__":
if sys.version_info < (3, 13): # pragma: no cover
sys.exit(
"argparse output changed in Python 3.13+. "
"To keep command partials up to date, please run this script with Python 3.13+."
)
extract_command_partials()

View File

@@ -273,6 +273,68 @@
]
}
},
"backtest_cache": {
"description": "Load a cached backtest result no older than specified age.",
"type": "string",
"enum": [
"none",
"day",
"week",
"month"
]
},
"hyperopt_path": {
"description": "Specify additional lookup path for Hyperopt Loss functions.",
"type": "string"
},
"epochs": {
"description": "Number of training epochs for Hyperopt.",
"type": "integer",
"minimum": 1
},
"early_stop": {
"description": "Early stop hyperopt if no improvement after <epochs>. Set to 0 to disable.",
"type": "integer",
"minimum": 0
},
"spaces": {
"description": "Hyperopt parameter spaces to optimize. Default is the default set andincludes all spaces except for 'trailing', 'protection', and 'trades'.",
"type": "array",
"items": {
"type": "string"
},
"default": [
"default"
]
},
"analyze_per_epoch": {
"description": "Perform analysis after each epoch in Hyperopt.",
"type": "boolean"
},
"print_all": {
"description": "Print all hyperopt trials, not just the best ones.",
"type": "boolean",
"default": false
},
"hyperopt_jobs": {
"description": "The number of concurrently running jobs for hyperoptimization (hyperopt worker processes). If -1 (default), all CPUs are used, for -2, all CPUs but one are used, etc. If 1 is given, no parallel computing is used.",
"type": "integer",
"default": -1
},
"hyperopt_random_state": {
"description": "Random state for hyperopt trials.",
"type": "integer",
"minimum": 0
},
"hyperopt_min_trades": {
"description": "Minimum number of trades per epoch for hyperopt.",
"type": "integer",
"minimum": 0
},
"hyperopt_loss": {
"description": "The class name of the hyperopt loss function class (IHyperOptLoss). Different functions can generate completely different results, since the target for optimization is different. Built-in Hyperopt-loss-functions are: ShortTradeDurHyperOptLoss, OnlyProfitHyperOptLoss, SharpeHyperOptLoss, SharpeHyperOptLossDaily, SortinoHyperOptLoss, SortinoHyperOptLossDaily, CalmarHyperOptLoss, MaxDrawDownHyperOptLoss, MaxDrawDownRelativeHyperOptLoss, MaxDrawDownPerPairHyperOptLoss, ProfitDrawDownHyperOptLoss, MultiMetricHyperOptLoss",
"type": "string"
},
"bot_name": {
"description": "Name of the trading bot. Passed via API to a client.",
"type": "string"

View File

@@ -1,4 +1,4 @@
```
``` output
usage: freqtrade backtesting-analysis [-h] [-v] [--no-color] [--logfile FILE]
[-V] [-c PATH] [-d PATH]
[--userdir PATH]
@@ -15,13 +15,13 @@ usage: freqtrade backtesting-analysis [-h] [-v] [--no-color] [--logfile FILE]
options:
-h, --help show this help message and exit
--backtest-filename PATH, --export-filename PATH
--backtest-filename, --export-filename PATH
Use this filename for backtest results.Example:
`--backtest-
filename=backtest_results_2020-09-27_16-20-48.json`.
Assumes either `user_data/backtest_results/` or
`--export-directory` as base directory.
--backtest-directory PATH, --export-directory PATH
--backtest-directory, --export-directory PATH
Directory to use for backtest results. Example:
`--export-directory=user_data/backtest_results/`.
--analysis-groups {0,1,2,3,4,5} [{0,1,2,3,4,5} ...]
@@ -54,21 +54,20 @@ Common arguments:
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
--no-color Disable colorization of hyperopt results. May be
useful if you are redirecting output to a file.
--logfile FILE, --log-file FILE
--logfile, --log-file FILE
Log to the file specified. Special values are:
'syslog', 'journald'. See the documentation for more
details.
-V, --version show program's version number and exit
-c PATH, --config PATH
Specify configuration file (default:
-c, --config PATH Specify configuration file (default:
`userdir/config.json` or `config.json` whichever
exists). Multiple --config options may be used. Can be
set to `-` to read config from stdin.
-d PATH, --datadir PATH, --data-dir PATH
-d, --datadir, --data-dir PATH
Path to the base directory of the exchange with
historical backtesting data. To see futures data, use
trading-mode additionally.
--userdir PATH, --user-data-dir PATH
--userdir, --user-data-dir PATH
Path to userdata directory.
```

View File

@@ -1,4 +1,4 @@
```
``` output
usage: freqtrade backtesting-show [-h] [-v] [--no-color] [--logfile FILE] [-V]
[-c PATH] [-d PATH] [--userdir PATH]
[--backtest-filename PATH]
@@ -8,13 +8,13 @@ usage: freqtrade backtesting-show [-h] [-v] [--no-color] [--logfile FILE] [-V]
options:
-h, --help show this help message and exit
--backtest-filename PATH, --export-filename PATH
--backtest-filename, --export-filename PATH
Use this filename for backtest results.Example:
`--backtest-
filename=backtest_results_2020-09-27_16-20-48.json`.
Assumes either `user_data/backtest_results/` or
`--export-directory` as base directory.
--backtest-directory PATH, --export-directory PATH
--backtest-directory, --export-directory PATH
Directory to use for backtest results. Example:
`--export-directory=user_data/backtest_results/`.
--show-pair-list Show backtesting pairlist sorted by profit.
@@ -26,21 +26,20 @@ Common arguments:
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
--no-color Disable colorization of hyperopt results. May be
useful if you are redirecting output to a file.
--logfile FILE, --log-file FILE
--logfile, --log-file FILE
Log to the file specified. Special values are:
'syslog', 'journald'. See the documentation for more
details.
-V, --version show program's version number and exit
-c PATH, --config PATH
Specify configuration file (default:
-c, --config PATH Specify configuration file (default:
`userdir/config.json` or `config.json` whichever
exists). Multiple --config options may be used. Can be
set to `-` to read config from stdin.
-d PATH, --datadir PATH, --data-dir PATH
-d, --datadir, --data-dir PATH
Path to the base directory of the exchange with
historical backtesting data. To see futures data, use
trading-mode additionally.
--userdir PATH, --user-data-dir PATH
--userdir, --user-data-dir PATH
Path to userdata directory.
```

View File

@@ -1,4 +1,4 @@
```
``` output
usage: freqtrade backtesting [-h] [-v] [--no-color] [--logfile FILE] [-V]
[-c PATH] [-d PATH] [--userdir PATH] [-s NAME]
[--strategy-path PATH]
@@ -23,7 +23,7 @@ usage: freqtrade backtesting [-h] [-v] [--no-color] [--logfile FILE] [-V]
options:
-h, --help show this help message and exit
-i TIMEFRAME, --timeframe TIMEFRAME
-i, --timeframe TIMEFRAME
Specify timeframe (`1m`, `5m`, `30m`, `1h`, `1d`).
--timerange TIMERANGE
Specify what timerange of data to use.
@@ -38,7 +38,7 @@ options:
setting.
--fee FLOAT Specify fee ratio. Will be applied twice (on trade
entry and exit).
-p PAIRS [PAIRS ...], --pairs PAIRS [PAIRS ...]
-p, --pairs PAIRS [PAIRS ...]
Limit command to these pairs. Pairs are space-
separated.
--eps, --enable-position-stacking
@@ -53,7 +53,7 @@ options:
pairlist will be generated for each new candle if
you're using a pairlist handler that supports this
feature, for example, ShuffleFilter.
--dry-run-wallet DRY_RUN_WALLET, --starting-balance DRY_RUN_WALLET
--dry-run-wallet, --starting-balance DRY_RUN_WALLET
Starting balance, used for backtesting / hyperopt and
dry-runs.
--timeframe-detail TIMEFRAME_DETAIL
@@ -68,13 +68,13 @@ options:
becomes `backtest-data-SampleStrategy.json`
--export {none,trades,signals}
Export backtest results (default: trades).
--backtest-filename PATH, --export-filename PATH
--backtest-filename, --export-filename PATH
Use this filename for backtest results.Example:
`--backtest-
filename=backtest_results_2020-09-27_16-20-48.json`.
Assumes either `user_data/backtest_results/` or
`--export-directory` as base directory.
--backtest-directory PATH, --export-directory PATH
--backtest-directory, --export-directory PATH
Directory to use for backtest results. Example:
`--export-directory=user_data/backtest_results/`.
--breakdown {day,week,month,year,weekday} [{day,week,month,year,weekday} ...]
@@ -91,26 +91,24 @@ Common arguments:
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
--no-color Disable colorization of hyperopt results. May be
useful if you are redirecting output to a file.
--logfile FILE, --log-file FILE
--logfile, --log-file FILE
Log to the file specified. Special values are:
'syslog', 'journald'. See the documentation for more
details.
-V, --version show program's version number and exit
-c PATH, --config PATH
Specify configuration file (default:
-c, --config PATH Specify configuration file (default:
`userdir/config.json` or `config.json` whichever
exists). Multiple --config options may be used. Can be
set to `-` to read config from stdin.
-d PATH, --datadir PATH, --data-dir PATH
-d, --datadir, --data-dir PATH
Path to the base directory of the exchange with
historical backtesting data. To see futures data, use
trading-mode additionally.
--userdir PATH, --user-data-dir PATH
--userdir, --user-data-dir PATH
Path to userdata directory.
Strategy arguments:
-s NAME, --strategy NAME
Specify strategy class name which will be used by the
-s, --strategy NAME Specify strategy class name which will be used by the
bot.
--strategy-path PATH Specify additional strategy lookup path.
--recursive-strategy-search

View File

@@ -1,17 +1,17 @@
```
``` output
usage: freqtrade convert-data [-h] [-v] [--no-color] [--logfile FILE] [-V]
[-c PATH] [-d PATH] [--userdir PATH]
[-p PAIRS [PAIRS ...]] --format-from
{json,jsongz,feather,parquet} --format-to
{json,jsongz,feather,parquet} [--erase]
[--exchange EXCHANGE]
[-p PAIRS [PAIRS ...]]
--format-from {json,jsongz,feather,parquet}
--format-to {json,jsongz,feather,parquet}
[--erase] [--exchange EXCHANGE]
[-t TIMEFRAMES [TIMEFRAMES ...]]
[--trading-mode {spot,margin,futures}]
[--candle-types {spot,futures,mark,index,premiumIndex,funding_rate} [{spot,futures,mark,index,premiumIndex,funding_rate} ...]]
options:
-h, --help show this help message and exit
-p PAIRS [PAIRS ...], --pairs PAIRS [PAIRS ...]
-p, --pairs PAIRS [PAIRS ...]
Limit command to these pairs. Pairs are space-
separated.
--format-from {json,jsongz,feather,parquet}
@@ -21,10 +21,10 @@ options:
--erase Clean all existing data for the selected
exchange/pairs/timeframes.
--exchange EXCHANGE Exchange name. Only valid if no config is provided.
-t TIMEFRAMES [TIMEFRAMES ...], --timeframes TIMEFRAMES [TIMEFRAMES ...]
-t, --timeframes TIMEFRAMES [TIMEFRAMES ...]
Specify which tickers to download. Space-separated
list. Default: `1m 5m`.
--trading-mode {spot,margin,futures}, --tradingmode {spot,margin,futures}
--trading-mode, --tradingmode {spot,margin,futures}
Select Trading mode
--candle-types {spot,futures,mark,index,premiumIndex,funding_rate} [{spot,futures,mark,index,premiumIndex,funding_rate} ...]
Select candle type to convert. Defaults to all
@@ -34,21 +34,20 @@ Common arguments:
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
--no-color Disable colorization of hyperopt results. May be
useful if you are redirecting output to a file.
--logfile FILE, --log-file FILE
--logfile, --log-file FILE
Log to the file specified. Special values are:
'syslog', 'journald'. See the documentation for more
details.
-V, --version show program's version number and exit
-c PATH, --config PATH
Specify configuration file (default:
-c, --config PATH Specify configuration file (default:
`userdir/config.json` or `config.json` whichever
exists). Multiple --config options may be used. Can be
set to `-` to read config from stdin.
-d PATH, --datadir PATH, --data-dir PATH
-d, --datadir, --data-dir PATH
Path to the base directory of the exchange with
historical backtesting data. To see futures data, use
trading-mode additionally.
--userdir PATH, --user-data-dir PATH
--userdir, --user-data-dir PATH
Path to userdata directory.
```

View File

@@ -1,4 +1,4 @@
```
``` output
usage: freqtrade convert-db [-h] [--db-url PATH] [--db-url-from PATH]
options:

View File

@@ -1,14 +1,14 @@
```
``` output
usage: freqtrade convert-trade-data [-h] [-v] [--no-color] [--logfile FILE]
[-V] [-c PATH] [-d PATH] [--userdir PATH]
[-p PAIRS [PAIRS ...]] --format-from
{json,jsongz,feather,parquet,kraken_csv}
[-p PAIRS [PAIRS ...]]
--format-from {json,jsongz,feather,parquet,kraken_csv}
--format-to {json,jsongz,feather,parquet}
[--erase] [--exchange EXCHANGE]
options:
-h, --help show this help message and exit
-p PAIRS [PAIRS ...], --pairs PAIRS [PAIRS ...]
-p, --pairs PAIRS [PAIRS ...]
Limit command to these pairs. Pairs are space-
separated.
--format-from {json,jsongz,feather,parquet,kraken_csv}
@@ -23,21 +23,20 @@ Common arguments:
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
--no-color Disable colorization of hyperopt results. May be
useful if you are redirecting output to a file.
--logfile FILE, --log-file FILE
--logfile, --log-file FILE
Log to the file specified. Special values are:
'syslog', 'journald'. See the documentation for more
details.
-V, --version show program's version number and exit
-c PATH, --config PATH
Specify configuration file (default:
-c, --config PATH Specify configuration file (default:
`userdir/config.json` or `config.json` whichever
exists). Multiple --config options may be used. Can be
set to `-` to read config from stdin.
-d PATH, --datadir PATH, --data-dir PATH
-d, --datadir, --data-dir PATH
Path to the base directory of the exchange with
historical backtesting data. To see futures data, use
trading-mode additionally.
--userdir PATH, --user-data-dir PATH
--userdir, --user-data-dir PATH
Path to userdata directory.
```

View File

@@ -1,9 +1,9 @@
```
``` output
usage: freqtrade create-userdir [-h] [--userdir PATH] [--reset]
options:
-h, --help show this help message and exit
--userdir PATH, --user-data-dir PATH
--userdir, --user-data-dir PATH
Path to userdata directory.
--reset Reset sample files to their original state.

View File

@@ -1,4 +1,4 @@
```
``` output
usage: freqtrade download-data [-h] [-v] [--no-color] [--logfile FILE] [-V]
[-c PATH] [-d PATH] [--userdir PATH]
[-p PAIRS [PAIRS ...]] [--pairs-file FILE]
@@ -11,11 +11,12 @@ usage: freqtrade download-data [-h] [-v] [--no-color] [--logfile FILE] [-V]
[--data-format-ohlcv {json,jsongz,feather,parquet}]
[--data-format-trades {json,jsongz,feather,parquet}]
[--trading-mode {spot,margin,futures}]
[--candle-types {spot,futures,mark,index,premiumIndex,funding_rate} [{spot,futures,mark,index,premiumIndex,funding_rate} ...]]
[--prepend]
options:
-h, --help show this help message and exit
-p PAIRS [PAIRS ...], --pairs PAIRS [PAIRS ...]
-p, --pairs PAIRS [PAIRS ...]
Limit command to these pairs. Pairs are space-
separated.
--pairs-file FILE File containing a list of pairs. Takes precedence over
@@ -37,7 +38,7 @@ options:
OHLCV (e.g. Kraken). If not provided, use `trades-to-
ohlcv` to convert trades data to OHLCV data.
--exchange EXCHANGE Exchange name. Only valid if no config is provided.
-t TIMEFRAMES [TIMEFRAMES ...], --timeframes TIMEFRAMES [TIMEFRAMES ...]
-t, --timeframes TIMEFRAMES [TIMEFRAMES ...]
Specify which tickers to download. Space-separated
list. Default: `1m 5m`.
--erase Clean all existing data for the selected
@@ -48,29 +49,33 @@ options:
--data-format-trades {json,jsongz,feather,parquet}
Storage format for downloaded trades data. (default:
`feather`).
--trading-mode {spot,margin,futures}, --tradingmode {spot,margin,futures}
--trading-mode, --tradingmode {spot,margin,futures}
Select Trading mode
--candle-types {spot,futures,mark,index,premiumIndex,funding_rate} [{spot,futures,mark,index,premiumIndex,funding_rate} ...]
Select candle type to download. Defaults to the
necessary candles for the selected trading mode (e.g.
'spot' or ('futures', 'funding_rate' and 'mark') for
futures).
--prepend Allow data prepending. (Data-appending is disabled)
Common arguments:
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
--no-color Disable colorization of hyperopt results. May be
useful if you are redirecting output to a file.
--logfile FILE, --log-file FILE
--logfile, --log-file FILE
Log to the file specified. Special values are:
'syslog', 'journald'. See the documentation for more
details.
-V, --version show program's version number and exit
-c PATH, --config PATH
Specify configuration file (default:
-c, --config PATH Specify configuration file (default:
`userdir/config.json` or `config.json` whichever
exists). Multiple --config options may be used. Can be
set to `-` to read config from stdin.
-d PATH, --datadir PATH, --data-dir PATH
-d, --datadir, --data-dir PATH
Path to the base directory of the exchange with
historical backtesting data. To see futures data, use
trading-mode additionally.
--userdir PATH, --user-data-dir PATH
--userdir, --user-data-dir PATH
Path to userdata directory.
```

View File

@@ -1,4 +1,4 @@
```
``` output
usage: freqtrade edge [-h] [-v] [--no-color] [--logfile FILE] [-V] [-c PATH]
[-d PATH] [--userdir PATH] [-s NAME]
[--strategy-path PATH] [--recursive-strategy-search]
@@ -10,7 +10,7 @@ usage: freqtrade edge [-h] [-v] [--no-color] [--logfile FILE] [-V] [-c PATH]
options:
-h, --help show this help message and exit
-i TIMEFRAME, --timeframe TIMEFRAME
-i, --timeframe TIMEFRAME
Specify timeframe (`1m`, `5m`, `30m`, `1h`, `1d`).
--timerange TIMERANGE
Specify what timerange of data to use.
@@ -25,7 +25,7 @@ options:
setting.
--fee FLOAT Specify fee ratio. Will be applied twice (on trade
entry and exit).
-p PAIRS [PAIRS ...], --pairs PAIRS [PAIRS ...]
-p, --pairs PAIRS [PAIRS ...]
Limit command to these pairs. Pairs are space-
separated.
@@ -33,26 +33,24 @@ Common arguments:
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
--no-color Disable colorization of hyperopt results. May be
useful if you are redirecting output to a file.
--logfile FILE, --log-file FILE
--logfile, --log-file FILE
Log to the file specified. Special values are:
'syslog', 'journald'. See the documentation for more
details.
-V, --version show program's version number and exit
-c PATH, --config PATH
Specify configuration file (default:
-c, --config PATH Specify configuration file (default:
`userdir/config.json` or `config.json` whichever
exists). Multiple --config options may be used. Can be
set to `-` to read config from stdin.
-d PATH, --datadir PATH, --data-dir PATH
-d, --datadir, --data-dir PATH
Path to the base directory of the exchange with
historical backtesting data. To see futures data, use
trading-mode additionally.
--userdir PATH, --user-data-dir PATH
--userdir, --user-data-dir PATH
Path to userdata directory.
Strategy arguments:
-s NAME, --strategy NAME
Specify strategy class name which will be used by the
-s, --strategy NAME Specify strategy class name which will be used by the
bot.
--strategy-path PATH Specify additional strategy lookup path.
--recursive-strategy-search

View File

@@ -0,0 +1,197 @@
``` output
Possible commands:
available_pairs
Return available pair (backtest data) based on timeframe / stake_currency selection
:param timeframe: Only pairs with this timeframe available.
:param stake_currency: Only pairs that include this stake currency.
balance
Get the account balance.
blacklist
Show the current blacklist.
:param add: List of coins to add (example: "BNB/BTC")
cancel_open_order
Cancel open order for trade.
:param trade_id: Cancels open orders for this trade.
count
Return the amount of open trades.
daily
Return the profits for each day, and amount of trades.
delete_lock
Delete (disable) lock from the database.
:param lock_id: ID for the lock to delete
delete_trade
Delete trade from the database.
Tries to close open orders. Requires manual handling of this asset on the exchange.
:param trade_id: Deletes the trade with this ID from the database.
entries
Returns List of dicts containing all Trades, based on buy tag performance
Can either be average for all pairs or a specific pair provided
exits
Returns List of dicts containing all Trades, based on exit reason performance
Can either be average for all pairs or a specific pair provided
forcebuy
Buy an asset.
:param pair: Pair to buy (ETH/BTC)
:param price: Optional - price to buy
forceenter
Force entering a trade
:param pair: Pair to buy (ETH/BTC)
:param side: 'long' or 'short'
:param price: Optional - price to buy
:param order_type: Optional keyword argument - 'limit' or 'market'
:param stake_amount: Optional keyword argument - stake amount (as float)
:param leverage: Optional keyword argument - leverage (as float)
:param enter_tag: Optional keyword argument - entry tag (as string, default: 'force_enter')
forceexit
Force-exit a trade.
:param tradeid: Id of the trade (can be received via status command)
:param ordertype: Order type to use (must be market or limit)
:param amount: Amount to sell. Full sell if not given
health
Provides a quick health check of the running bot.
list_custom_data
List custom-data of the running bot for a specific trade.
:param trade_id: ID of the trade
:param key: str, optional - Key of the custom-data
list_open_trades_custom_data
List open trades custom-data of the running bot.
:param key: str, optional - Key of the custom-data
:param limit: limit of trades
:param offset: trades offset for pagination
lock_add
Lock pair
:param pair: Pair to lock
:param until: Lock until this date (format "2024-03-30 16:00:00Z")
:param side: Side to lock (long, short, *)
:param reason: Reason for the lock
locks
Return current locks
logs
Show latest logs.
:param limit: Limits log messages to the last <limit> logs. No limit to get the entire log.
mix_tags
Returns List of dicts containing all Trades, based on entry_tag + exit_reason performance
Can either be average for all pairs or a specific pair provided
monthly
Return the profits for each month, and amount of trades.
pair_candles
Return live dataframe for <pair><timeframe>.
:param pair: Pair to get data for
:param timeframe: Only pairs with this timeframe available.
:param limit: Limit result to the last n candles.
:param columns: List of dataframe columns to return. Empty list will return OHLCV.
pair_history
Return historic, analyzed dataframe
:param pair: Pair to get data for
:param timeframe: Only pairs with this timeframe available.
:param strategy: Strategy to analyze and get values for
:param freqaimodel: FreqAI model to use for analysis
:param timerange: Timerange to get data for (same format than --timerange endpoints)
pairlists_available
Lists available pairlist providers
performance
Return the performance of the different coins.
ping
simple ping
plot_config
Return plot configuration if the strategy defines one.
profit
Return the profit summary.
reload_config
Reload configuration.
show_config
Returns part of the configuration, relevant for trading operations.
start
Start the bot if it's in the stopped state.
stats
Return the stats report (durations, sell-reasons).
status
Get the status of open trades.
stop
Stop the bot. Use `start` to restart.
stopbuy
Stop buying (but handle sells gracefully). Use `reload_config` to reset.
strategies
Lists available strategies
strategy
Get strategy details
:param strategy: Strategy class name
sysinfo
Provides system information (CPU, RAM usage)
trade
Return specific trade
:param trade_id: Specify which trade to get.
trades
Return trades history, sorted by id (or by latest timestamp if order_by_id=False)
:param limit: Limits trades to the X last trades. Max 500 trades.
:param offset: Offset by this amount of trades.
:param order_by_id: Sort trades by id (default: True). If False, sorts by latest timestamp.
version
Return the version of the bot.
weekly
Return the profits for each week, and amount of trades.
whitelist
Show the current whitelist.
```

View File

@@ -1,4 +1,4 @@
```
``` output
usage: freqtrade hyperopt-list [-h] [-v] [--no-color] [--logfile FILE] [-V]
[-c PATH] [-d PATH] [--userdir PATH] [--best]
[--profitable] [--min-trades INT]
@@ -44,21 +44,20 @@ Common arguments:
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
--no-color Disable colorization of hyperopt results. May be
useful if you are redirecting output to a file.
--logfile FILE, --log-file FILE
--logfile, --log-file FILE
Log to the file specified. Special values are:
'syslog', 'journald'. See the documentation for more
details.
-V, --version show program's version number and exit
-c PATH, --config PATH
Specify configuration file (default:
-c, --config PATH Specify configuration file (default:
`userdir/config.json` or `config.json` whichever
exists). Multiple --config options may be used. Can be
set to `-` to read config from stdin.
-d PATH, --datadir PATH, --data-dir PATH
-d, --datadir, --data-dir PATH
Path to the base directory of the exchange with
historical backtesting data. To see futures data, use
trading-mode additionally.
--userdir PATH, --user-data-dir PATH
--userdir, --user-data-dir PATH
Path to userdata directory.
```

View File

@@ -1,4 +1,4 @@
```
``` output
usage: freqtrade hyperopt-show [-h] [-v] [--no-color] [--logfile FILE] [-V]
[-c PATH] [-d PATH] [--userdir PATH] [--best]
[--profitable] [-n INT] [--print-json]
@@ -10,7 +10,7 @@ options:
-h, --help show this help message and exit
--best Select only best epochs.
--profitable Select only profitable epochs.
-n INT, --index INT Specify the index of the epoch to print details for.
-n, --index INT Specify the index of the epoch to print details for.
--print-json Print output in JSON format.
--hyperopt-filename FILENAME
Hyperopt result filename.Example: `--hyperopt-
@@ -26,21 +26,20 @@ Common arguments:
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
--no-color Disable colorization of hyperopt results. May be
useful if you are redirecting output to a file.
--logfile FILE, --log-file FILE
--logfile, --log-file FILE
Log to the file specified. Special values are:
'syslog', 'journald'. See the documentation for more
details.
-V, --version show program's version number and exit
-c PATH, --config PATH
Specify configuration file (default:
-c, --config PATH Specify configuration file (default:
`userdir/config.json` or `config.json` whichever
exists). Multiple --config options may be used. Can be
set to `-` to read config from stdin.
-d PATH, --datadir PATH, --data-dir PATH
-d, --datadir, --data-dir PATH
Path to the base directory of the exchange with
historical backtesting data. To see futures data, use
trading-mode additionally.
--userdir PATH, --user-data-dir PATH
--userdir, --user-data-dir PATH
Path to userdata directory.
```

View File

@@ -1,4 +1,4 @@
```
``` output
usage: freqtrade hyperopt [-h] [-v] [--no-color] [--logfile FILE] [-V]
[-c PATH] [-d PATH] [--userdir PATH] [-s NAME]
[--strategy-path PATH] [--recursive-strategy-search]
@@ -11,16 +11,15 @@ usage: freqtrade hyperopt [-h] [-v] [--no-color] [--logfile FILE] [-V]
[--eps] [--enable-protections]
[--dry-run-wallet DRY_RUN_WALLET]
[--timeframe-detail TIMEFRAME_DETAIL] [-e INT]
[--spaces {all,buy,sell,roi,stoploss,trailing,protection,trades,default} [{all,buy,sell,roi,stoploss,trailing,protection,trades,default} ...]]
[--print-all] [--print-json] [-j JOBS]
[--random-state INT] [--min-trades INT]
[--hyperopt-loss NAME] [--disable-param-export]
[--ignore-missing-spaces] [--analyze-per-epoch]
[--early-stop INT]
[--spaces SPACES [SPACES ...]] [--print-all]
[--print-json] [-j JOBS] [--random-state INT]
[--min-trades INT] [--hyperopt-loss NAME]
[--disable-param-export] [--ignore-missing-spaces]
[--analyze-per-epoch] [--early-stop INT]
options:
-h, --help show this help message and exit
-i TIMEFRAME, --timeframe TIMEFRAME
-i, --timeframe TIMEFRAME
Specify timeframe (`1m`, `5m`, `30m`, `1h`, `1d`).
--timerange TIMERANGE
Specify what timerange of data to use.
@@ -35,7 +34,7 @@ options:
setting.
--fee FLOAT Specify fee ratio. Will be applied twice (on trade
entry and exit).
-p PAIRS [PAIRS ...], --pairs PAIRS [PAIRS ...]
-p, --pairs PAIRS [PAIRS ...]
Limit command to these pairs. Pairs are space-
separated.
--hyperopt-path PATH Specify additional lookup path for Hyperopt Loss
@@ -47,19 +46,23 @@ options:
Enable protections for backtesting. Will slow
backtesting down by a considerable amount, but will
include configured protections
--dry-run-wallet DRY_RUN_WALLET, --starting-balance DRY_RUN_WALLET
--dry-run-wallet, --starting-balance DRY_RUN_WALLET
Starting balance, used for backtesting / hyperopt and
dry-runs.
--timeframe-detail TIMEFRAME_DETAIL
Specify detail timeframe for backtesting (`1m`, `5m`,
`30m`, `1h`, `1d`).
-e INT, --epochs INT Specify number of epochs (default: 100).
--spaces {all,buy,sell,roi,stoploss,trailing,protection,trades,default} [{all,buy,sell,roi,stoploss,trailing,protection,trades,default} ...]
-e, --epochs INT Specify number of epochs (default: 100).
--spaces SPACES [SPACES ...]
Specify which parameters to hyperopt. Space-separated
list.
list. Available builtin options (custom spaces will
not be listed here): default, all, buy, sell, enter,
exit, roi, stoploss, trailing, protection, trades.
Default: `default` - which includes all spaces except
for 'trailing', 'protection', and 'trades'.
--print-all Print all results, not only the best ones.
--print-json Print output in JSON format.
-j JOBS, --job-workers JOBS
-j, --job-workers JOBS
The number of concurrently running jobs for
hyperoptimization (hyperopt worker processes). If -1
(default), all CPUs are used, for -2, all CPUs but one
@@ -69,7 +72,7 @@ options:
reproducible hyperopt results.
--min-trades INT Set minimal desired number of trades for evaluations
in the hyperopt optimization path (default: 1).
--hyperopt-loss NAME, --hyperoptloss NAME
--hyperopt-loss, --hyperoptloss NAME
Specify the class name of the hyperopt loss function
class (IHyperOptLoss). Different functions can
generate completely different results, since the
@@ -95,26 +98,24 @@ Common arguments:
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
--no-color Disable colorization of hyperopt results. May be
useful if you are redirecting output to a file.
--logfile FILE, --log-file FILE
--logfile, --log-file FILE
Log to the file specified. Special values are:
'syslog', 'journald'. See the documentation for more
details.
-V, --version show program's version number and exit
-c PATH, --config PATH
Specify configuration file (default:
-c, --config PATH Specify configuration file (default:
`userdir/config.json` or `config.json` whichever
exists). Multiple --config options may be used. Can be
set to `-` to read config from stdin.
-d PATH, --datadir PATH, --data-dir PATH
-d, --datadir, --data-dir PATH
Path to the base directory of the exchange with
historical backtesting data. To see futures data, use
trading-mode additionally.
--userdir PATH, --user-data-dir PATH
--userdir, --user-data-dir PATH
Path to userdata directory.
Strategy arguments:
-s NAME, --strategy NAME
Specify strategy class name which will be used by the
-s, --strategy NAME Specify strategy class name which will be used by the
bot.
--strategy-path PATH Specify additional strategy lookup path.
--recursive-strategy-search

View File

@@ -1,4 +1,4 @@
```
``` output
usage: freqtrade install-ui [-h] [--erase] [--prerelease]
[--ui-version UI_VERSION]

View File

@@ -1,4 +1,4 @@
```
``` output
usage: freqtrade list-data [-h] [-v] [--no-color] [--logfile FILE] [-V]
[-c PATH] [-d PATH] [--userdir PATH]
[--exchange EXCHANGE]
@@ -18,10 +18,10 @@ options:
Storage format for downloaded trades data. (default:
`feather`).
--trades Work on trades data instead of OHLCV data.
-p PAIRS [PAIRS ...], --pairs PAIRS [PAIRS ...]
-p, --pairs PAIRS [PAIRS ...]
Limit command to these pairs. Pairs are space-
separated.
--trading-mode {spot,margin,futures}, --tradingmode {spot,margin,futures}
--trading-mode, --tradingmode {spot,margin,futures}
Select Trading mode
--show-timerange Show timerange available for available data. (May take
a while to calculate).
@@ -30,21 +30,20 @@ Common arguments:
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
--no-color Disable colorization of hyperopt results. May be
useful if you are redirecting output to a file.
--logfile FILE, --log-file FILE
--logfile, --log-file FILE
Log to the file specified. Special values are:
'syslog', 'journald'. See the documentation for more
details.
-V, --version show program's version number and exit
-c PATH, --config PATH
Specify configuration file (default:
-c, --config PATH Specify configuration file (default:
`userdir/config.json` or `config.json` whichever
exists). Multiple --config options may be used. Can be
set to `-` to read config from stdin.
-d PATH, --datadir PATH, --data-dir PATH
-d, --datadir, --data-dir PATH
Path to the base directory of the exchange with
historical backtesting data. To see futures data, use
trading-mode additionally.
--userdir PATH, --user-data-dir PATH
--userdir, --user-data-dir PATH
Path to userdata directory.
```

View File

@@ -1,4 +1,4 @@
```
``` output
usage: freqtrade list-exchanges [-h] [-v] [--no-color] [--logfile FILE] [-V]
[-c PATH] [-d PATH] [--userdir PATH] [-1] [-a]
[--trading-mode {spot,margin,futures}]
@@ -8,7 +8,7 @@ options:
-h, --help show this help message and exit
-1, --one-column Print output in one column.
-a, --all Print all exchanges known to the ccxt library.
--trading-mode {spot,margin,futures}, --tradingmode {spot,margin,futures}
--trading-mode, --tradingmode {spot,margin,futures}
Select Trading mode
--dex-exchanges Print only DEX exchanges.
@@ -16,21 +16,20 @@ Common arguments:
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
--no-color Disable colorization of hyperopt results. May be
useful if you are redirecting output to a file.
--logfile FILE, --log-file FILE
--logfile, --log-file FILE
Log to the file specified. Special values are:
'syslog', 'journald'. See the documentation for more
details.
-V, --version show program's version number and exit
-c PATH, --config PATH
Specify configuration file (default:
-c, --config PATH Specify configuration file (default:
`userdir/config.json` or `config.json` whichever
exists). Multiple --config options may be used. Can be
set to `-` to read config from stdin.
-d PATH, --datadir PATH, --data-dir PATH
-d, --datadir, --data-dir PATH
Path to the base directory of the exchange with
historical backtesting data. To see futures data, use
trading-mode additionally.
--userdir PATH, --user-data-dir PATH
--userdir, --user-data-dir PATH
Path to userdata directory.
```

View File

@@ -1,4 +1,4 @@
```
``` output
usage: freqtrade list-freqaimodels [-h] [-v] [--no-color] [--logfile FILE]
[-V] [-c PATH] [-d PATH] [--userdir PATH]
[--freqaimodel-path PATH] [-1]
@@ -13,21 +13,20 @@ Common arguments:
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
--no-color Disable colorization of hyperopt results. May be
useful if you are redirecting output to a file.
--logfile FILE, --log-file FILE
--logfile, --log-file FILE
Log to the file specified. Special values are:
'syslog', 'journald'. See the documentation for more
details.
-V, --version show program's version number and exit
-c PATH, --config PATH
Specify configuration file (default:
-c, --config PATH Specify configuration file (default:
`userdir/config.json` or `config.json` whichever
exists). Multiple --config options may be used. Can be
set to `-` to read config from stdin.
-d PATH, --datadir PATH, --data-dir PATH
-d, --datadir, --data-dir PATH
Path to the base directory of the exchange with
historical backtesting data. To see futures data, use
trading-mode additionally.
--userdir PATH, --user-data-dir PATH
--userdir, --user-data-dir PATH
Path to userdata directory.
```

View File

@@ -1,4 +1,4 @@
```
``` output
usage: freqtrade list-hyperoptloss [-h] [-v] [--no-color] [--logfile FILE]
[-V] [-c PATH] [-d PATH] [--userdir PATH]
[--hyperopt-path PATH] [-1]
@@ -13,21 +13,20 @@ Common arguments:
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
--no-color Disable colorization of hyperopt results. May be
useful if you are redirecting output to a file.
--logfile FILE, --log-file FILE
--logfile, --log-file FILE
Log to the file specified. Special values are:
'syslog', 'journald'. See the documentation for more
details.
-V, --version show program's version number and exit
-c PATH, --config PATH
Specify configuration file (default:
-c, --config PATH Specify configuration file (default:
`userdir/config.json` or `config.json` whichever
exists). Multiple --config options may be used. Can be
set to `-` to read config from stdin.
-d PATH, --datadir PATH, --data-dir PATH
-d, --datadir, --data-dir PATH
Path to the base directory of the exchange with
historical backtesting data. To see futures data, use
trading-mode additionally.
--userdir PATH, --user-data-dir PATH
--userdir, --user-data-dir PATH
Path to userdata directory.
```

View File

@@ -1,4 +1,4 @@
```
``` output
usage: freqtrade list-markets [-h] [-v] [--no-color] [--logfile FILE] [-V]
[-c PATH] [-d PATH] [--userdir PATH]
[--exchange EXCHANGE] [--print-list]
@@ -21,28 +21,27 @@ options:
Specify quote currency(-ies). Space-separated list.
-a, --all Print all pairs or market symbols. By default only
active ones are shown.
--trading-mode {spot,margin,futures}, --tradingmode {spot,margin,futures}
--trading-mode, --tradingmode {spot,margin,futures}
Select Trading mode
Common arguments:
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
--no-color Disable colorization of hyperopt results. May be
useful if you are redirecting output to a file.
--logfile FILE, --log-file FILE
--logfile, --log-file FILE
Log to the file specified. Special values are:
'syslog', 'journald'. See the documentation for more
details.
-V, --version show program's version number and exit
-c PATH, --config PATH
Specify configuration file (default:
-c, --config PATH Specify configuration file (default:
`userdir/config.json` or `config.json` whichever
exists). Multiple --config options may be used. Can be
set to `-` to read config from stdin.
-d PATH, --datadir PATH, --data-dir PATH
-d, --datadir, --data-dir PATH
Path to the base directory of the exchange with
historical backtesting data. To see futures data, use
trading-mode additionally.
--userdir PATH, --user-data-dir PATH
--userdir, --user-data-dir PATH
Path to userdata directory.
```

View File

@@ -1,4 +1,4 @@
```
``` output
usage: freqtrade list-pairs [-h] [-v] [--no-color] [--logfile FILE] [-V]
[-c PATH] [-d PATH] [--userdir PATH]
[--exchange EXCHANGE] [--print-list]
@@ -21,28 +21,27 @@ options:
Specify quote currency(-ies). Space-separated list.
-a, --all Print all pairs or market symbols. By default only
active ones are shown.
--trading-mode {spot,margin,futures}, --tradingmode {spot,margin,futures}
--trading-mode, --tradingmode {spot,margin,futures}
Select Trading mode
Common arguments:
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
--no-color Disable colorization of hyperopt results. May be
useful if you are redirecting output to a file.
--logfile FILE, --log-file FILE
--logfile, --log-file FILE
Log to the file specified. Special values are:
'syslog', 'journald'. See the documentation for more
details.
-V, --version show program's version number and exit
-c PATH, --config PATH
Specify configuration file (default:
-c, --config PATH Specify configuration file (default:
`userdir/config.json` or `config.json` whichever
exists). Multiple --config options may be used. Can be
set to `-` to read config from stdin.
-d PATH, --datadir PATH, --data-dir PATH
-d, --datadir, --data-dir PATH
Path to the base directory of the exchange with
historical backtesting data. To see futures data, use
trading-mode additionally.
--userdir PATH, --user-data-dir PATH
--userdir, --user-data-dir PATH
Path to userdata directory.
```

View File

@@ -1,4 +1,4 @@
```
``` output
usage: freqtrade list-strategies [-h] [-v] [--no-color] [--logfile FILE] [-V]
[-c PATH] [-d PATH] [--userdir PATH]
[--strategy-path PATH] [-1]
@@ -16,21 +16,20 @@ Common arguments:
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
--no-color Disable colorization of hyperopt results. May be
useful if you are redirecting output to a file.
--logfile FILE, --log-file FILE
--logfile, --log-file FILE
Log to the file specified. Special values are:
'syslog', 'journald'. See the documentation for more
details.
-V, --version show program's version number and exit
-c PATH, --config PATH
Specify configuration file (default:
-c, --config PATH Specify configuration file (default:
`userdir/config.json` or `config.json` whichever
exists). Multiple --config options may be used. Can be
set to `-` to read config from stdin.
-d PATH, --datadir PATH, --data-dir PATH
-d, --datadir, --data-dir PATH
Path to the base directory of the exchange with
historical backtesting data. To see futures data, use
trading-mode additionally.
--userdir PATH, --user-data-dir PATH
--userdir, --user-data-dir PATH
Path to userdata directory.
```

View File

@@ -1,32 +1,34 @@
```
``` output
usage: freqtrade list-timeframes [-h] [-v] [--no-color] [--logfile FILE] [-V]
[-c PATH] [-d PATH] [--userdir PATH]
[--exchange EXCHANGE] [-1]
[--trading-mode {spot,margin,futures}]
options:
-h, --help show this help message and exit
--exchange EXCHANGE Exchange name. Only valid if no config is provided.
-1, --one-column Print output in one column.
--trading-mode, --tradingmode {spot,margin,futures}
Select Trading mode
Common arguments:
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
--no-color Disable colorization of hyperopt results. May be
useful if you are redirecting output to a file.
--logfile FILE, --log-file FILE
--logfile, --log-file FILE
Log to the file specified. Special values are:
'syslog', 'journald'. See the documentation for more
details.
-V, --version show program's version number and exit
-c PATH, --config PATH
Specify configuration file (default:
-c, --config PATH Specify configuration file (default:
`userdir/config.json` or `config.json` whichever
exists). Multiple --config options may be used. Can be
set to `-` to read config from stdin.
-d PATH, --datadir PATH, --data-dir PATH
-d, --datadir, --data-dir PATH
Path to the base directory of the exchange with
historical backtesting data. To see futures data, use
trading-mode additionally.
--userdir PATH, --user-data-dir PATH
--userdir, --user-data-dir PATH
Path to userdata directory.
```

View File

@@ -1,4 +1,4 @@
```
``` output
usage: freqtrade lookahead-analysis [-h] [-v] [--no-color] [--logfile FILE]
[-V] [-c PATH] [-d PATH] [--userdir PATH]
[-s NAME] [--strategy-path PATH]
@@ -26,7 +26,7 @@ usage: freqtrade lookahead-analysis [-h] [-v] [--no-color] [--logfile FILE]
options:
-h, --help show this help message and exit
-i TIMEFRAME, --timeframe TIMEFRAME
-i, --timeframe TIMEFRAME
Specify timeframe (`1m`, `5m`, `30m`, `1h`, `1d`).
--timerange TIMERANGE
Specify what timerange of data to use.
@@ -41,7 +41,7 @@ options:
setting.
--fee FLOAT Specify fee ratio. Will be applied twice (on trade
entry and exit).
-p PAIRS [PAIRS ...], --pairs PAIRS [PAIRS ...]
-p, --pairs PAIRS [PAIRS ...]
Limit command to these pairs. Pairs are space-
separated.
--enable-protections, --enableprotections
@@ -53,7 +53,7 @@ options:
pairlist will be generated for each new candle if
you're using a pairlist handler that supports this
feature, for example, ShuffleFilter.
--dry-run-wallet DRY_RUN_WALLET, --starting-balance DRY_RUN_WALLET
--dry-run-wallet, --starting-balance DRY_RUN_WALLET
Starting balance, used for backtesting / hyperopt and
dry-runs.
--timeframe-detail TIMEFRAME_DETAIL
@@ -68,13 +68,13 @@ options:
becomes `backtest-data-SampleStrategy.json`
--export {none,trades,signals}
Export backtest results (default: trades).
--backtest-filename PATH, --export-filename PATH
--backtest-filename, --export-filename PATH
Use this filename for backtest results.Example:
`--backtest-
filename=backtest_results_2020-09-27_16-20-48.json`.
Assumes either `user_data/backtest_results/` or
`--export-directory` as base directory.
--backtest-directory PATH, --export-directory PATH
--backtest-directory, --export-directory PATH
Directory to use for backtest results. Example:
`--export-directory=user_data/backtest_results/`.
--freqai-backtest-live-models
@@ -93,26 +93,24 @@ Common arguments:
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
--no-color Disable colorization of hyperopt results. May be
useful if you are redirecting output to a file.
--logfile FILE, --log-file FILE
--logfile, --log-file FILE
Log to the file specified. Special values are:
'syslog', 'journald'. See the documentation for more
details.
-V, --version show program's version number and exit
-c PATH, --config PATH
Specify configuration file (default:
-c, --config PATH Specify configuration file (default:
`userdir/config.json` or `config.json` whichever
exists). Multiple --config options may be used. Can be
set to `-` to read config from stdin.
-d PATH, --datadir PATH, --data-dir PATH
-d, --datadir, --data-dir PATH
Path to the base directory of the exchange with
historical backtesting data. To see futures data, use
trading-mode additionally.
--userdir PATH, --user-data-dir PATH
--userdir, --user-data-dir PATH
Path to userdata directory.
Strategy arguments:
-s NAME, --strategy NAME
Specify strategy class name which will be used by the
-s, --strategy NAME Specify strategy class name which will be used by the
bot.
--strategy-path PATH Specify additional strategy lookup path.
--recursive-strategy-search

View File

@@ -1,7 +1,6 @@
```
``` output
usage: freqtrade [-h] [-V]
{trade,create-userdir,new-config,show-config,new-strategy,download-data,convert-data,convert-trade-data,trades-to-ohlcv,list-data,backtesting,backtesting-show,backtesting-analysis,edge,hyperopt,hyperopt-list,hyperopt-show,list-exchanges,list-markets,list-pairs,list-strategies,list-hyperoptloss,list-freqaimodels,list-timeframes,show-trades,test-pairlist,convert-db,install-ui,plot-dataframe,plot-profit,webserver,strategy-updater,lookahead-analysis,recursive-analysis}
...
{trade,create-userdir,new-config,show-config,new-strategy,download-data,convert-data,convert-trade-data,trades-to-ohlcv,list-data,backtesting,backtesting-show,backtesting-analysis,edge,hyperopt,hyperopt-list,hyperopt-show,list-exchanges,list-markets,list-pairs,list-strategies,list-hyperoptloss,list-freqaimodels,list-timeframes,show-trades,test-pairlist,convert-db,install-ui,plot-dataframe,plot-profit,webserver,strategy-updater,lookahead-analysis,recursive-analysis} ...
Free, open source crypto trading bot

View File

@@ -1,12 +1,11 @@
```
``` output
usage: freqtrade new-config [-h] [-c PATH]
options:
-h, --help show this help message and exit
-c PATH, --config PATH
Specify configuration file (default:
`userdir/config.json` or `config.json` whichever
exists). Multiple --config options may be used. Can be
set to `-` to read config from stdin.
-h, --help show this help message and exit
-c, --config PATH Specify configuration file (default:
`userdir/config.json` or `config.json` whichever exists).
Multiple --config options may be used. Can be set to `-`
to read config from stdin.
```

View File

@@ -1,14 +1,13 @@
```
``` output
usage: freqtrade new-strategy [-h] [--userdir PATH] [-s NAME]
[--strategy-path PATH]
[--template {full,minimal,advanced}]
options:
-h, --help show this help message and exit
--userdir PATH, --user-data-dir PATH
--userdir, --user-data-dir PATH
Path to userdata directory.
-s NAME, --strategy NAME
Specify strategy class name which will be used by the
-s, --strategy NAME Specify strategy class name which will be used by the
bot.
--strategy-path PATH Specify additional strategy lookup path.
--template {full,minimal,advanced}

View File

@@ -1,4 +1,4 @@
```
``` output
usage: freqtrade plot-dataframe [-h] [-v] [--no-color] [--logfile FILE] [-V]
[-c PATH] [-d PATH] [--userdir PATH] [-s NAME]
[--strategy-path PATH]
@@ -16,7 +16,7 @@ usage: freqtrade plot-dataframe [-h] [-v] [--no-color] [--logfile FILE] [-V]
options:
-h, --help show this help message and exit
-p PAIRS [PAIRS ...], --pairs PAIRS [PAIRS ...]
-p, --pairs PAIRS [PAIRS ...]
Limit command to these pairs. Pairs are space-
separated.
--indicators1 INDICATORS1 [INDICATORS1 ...]
@@ -38,7 +38,7 @@ options:
(backtest file)) Default: file
--export {none,trades,signals}
Export backtest results (default: trades).
--backtest-filename PATH, --export-filename PATH
--backtest-filename, --export-filename PATH
Use this filename for backtest results.Example:
`--backtest-
filename=backtest_results_2020-09-27_16-20-48.json`.
@@ -46,7 +46,7 @@ options:
`--export-directory` as base directory.
--timerange TIMERANGE
Specify what timerange of data to use.
-i TIMEFRAME, --timeframe TIMEFRAME
-i, --timeframe TIMEFRAME
Specify timeframe (`1m`, `5m`, `30m`, `1h`, `1d`).
--no-trades Skip using trades from backtesting file and DB.
@@ -54,26 +54,24 @@ Common arguments:
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
--no-color Disable colorization of hyperopt results. May be
useful if you are redirecting output to a file.
--logfile FILE, --log-file FILE
--logfile, --log-file FILE
Log to the file specified. Special values are:
'syslog', 'journald'. See the documentation for more
details.
-V, --version show program's version number and exit
-c PATH, --config PATH
Specify configuration file (default:
-c, --config PATH Specify configuration file (default:
`userdir/config.json` or `config.json` whichever
exists). Multiple --config options may be used. Can be
set to `-` to read config from stdin.
-d PATH, --datadir PATH, --data-dir PATH
-d, --datadir, --data-dir PATH
Path to the base directory of the exchange with
historical backtesting data. To see futures data, use
trading-mode additionally.
--userdir PATH, --user-data-dir PATH
--userdir, --user-data-dir PATH
Path to userdata directory.
Strategy arguments:
-s NAME, --strategy NAME
Specify strategy class name which will be used by the
-s, --strategy NAME Specify strategy class name which will be used by the
bot.
--strategy-path PATH Specify additional strategy lookup path.
--recursive-strategy-search

View File

@@ -1,4 +1,4 @@
```
``` output
usage: freqtrade plot-profit [-h] [-v] [--no-color] [--logfile FILE] [-V]
[-c PATH] [-d PATH] [--userdir PATH] [-s NAME]
[--strategy-path PATH]
@@ -12,14 +12,14 @@ usage: freqtrade plot-profit [-h] [-v] [--no-color] [--logfile FILE] [-V]
options:
-h, --help show this help message and exit
-p PAIRS [PAIRS ...], --pairs PAIRS [PAIRS ...]
-p, --pairs PAIRS [PAIRS ...]
Limit command to these pairs. Pairs are space-
separated.
--timerange TIMERANGE
Specify what timerange of data to use.
--export {none,trades,signals}
Export backtest results (default: trades).
--backtest-filename PATH, --export-filename PATH
--backtest-filename, --export-filename PATH
Use this filename for backtest results.Example:
`--backtest-
filename=backtest_results_2020-09-27_16-20-48.json`.
@@ -32,7 +32,7 @@ options:
--trade-source {DB,file}
Specify the source for trades (Can be DB or file
(backtest file)) Default: file
-i TIMEFRAME, --timeframe TIMEFRAME
-i, --timeframe TIMEFRAME
Specify timeframe (`1m`, `5m`, `30m`, `1h`, `1d`).
--auto-open Automatically open generated plot.
@@ -40,26 +40,24 @@ Common arguments:
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
--no-color Disable colorization of hyperopt results. May be
useful if you are redirecting output to a file.
--logfile FILE, --log-file FILE
--logfile, --log-file FILE
Log to the file specified. Special values are:
'syslog', 'journald'. See the documentation for more
details.
-V, --version show program's version number and exit
-c PATH, --config PATH
Specify configuration file (default:
-c, --config PATH Specify configuration file (default:
`userdir/config.json` or `config.json` whichever
exists). Multiple --config options may be used. Can be
set to `-` to read config from stdin.
-d PATH, --datadir PATH, --data-dir PATH
-d, --datadir, --data-dir PATH
Path to the base directory of the exchange with
historical backtesting data. To see futures data, use
trading-mode additionally.
--userdir PATH, --user-data-dir PATH
--userdir, --user-data-dir PATH
Path to userdata directory.
Strategy arguments:
-s NAME, --strategy NAME
Specify strategy class name which will be used by the
-s, --strategy NAME Specify strategy class name which will be used by the
bot.
--strategy-path PATH Specify additional strategy lookup path.
--recursive-strategy-search

View File

@@ -1,4 +1,4 @@
```
``` output
usage: freqtrade recursive-analysis [-h] [-v] [--no-color] [--logfile FILE]
[-V] [-c PATH] [-d PATH] [--userdir PATH]
[-s NAME] [--strategy-path PATH]
@@ -12,14 +12,14 @@ usage: freqtrade recursive-analysis [-h] [-v] [--no-color] [--logfile FILE]
options:
-h, --help show this help message and exit
-i TIMEFRAME, --timeframe TIMEFRAME
-i, --timeframe TIMEFRAME
Specify timeframe (`1m`, `5m`, `30m`, `1h`, `1d`).
--timerange TIMERANGE
Specify what timerange of data to use.
--data-format-ohlcv {json,jsongz,feather,parquet}
Storage format for downloaded candle (OHLCV) data.
(default: `feather`).
-p PAIRS [PAIRS ...], --pairs PAIRS [PAIRS ...]
-p, --pairs PAIRS [PAIRS ...]
Limit command to these pairs. Pairs are space-
separated.
--startup-candle STARTUP_CANDLE [STARTUP_CANDLE ...]
@@ -30,26 +30,24 @@ Common arguments:
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
--no-color Disable colorization of hyperopt results. May be
useful if you are redirecting output to a file.
--logfile FILE, --log-file FILE
--logfile, --log-file FILE
Log to the file specified. Special values are:
'syslog', 'journald'. See the documentation for more
details.
-V, --version show program's version number and exit
-c PATH, --config PATH
Specify configuration file (default:
-c, --config PATH Specify configuration file (default:
`userdir/config.json` or `config.json` whichever
exists). Multiple --config options may be used. Can be
set to `-` to read config from stdin.
-d PATH, --datadir PATH, --data-dir PATH
-d, --datadir, --data-dir PATH
Path to the base directory of the exchange with
historical backtesting data. To see futures data, use
trading-mode additionally.
--userdir PATH, --user-data-dir PATH
--userdir, --user-data-dir PATH
Path to userdata directory.
Strategy arguments:
-s NAME, --strategy NAME
Specify strategy class name which will be used by the
-s, --strategy NAME Specify strategy class name which will be used by the
bot.
--strategy-path PATH Specify additional strategy lookup path.
--recursive-strategy-search

View File

@@ -1,13 +1,12 @@
```
``` output
usage: freqtrade show-config [-h] [--userdir PATH] [-c PATH]
[--show-sensitive]
options:
-h, --help show this help message and exit
--userdir PATH, --user-data-dir PATH
--userdir, --user-data-dir PATH
Path to userdata directory.
-c PATH, --config PATH
Specify configuration file (default:
-c, --config PATH Specify configuration file (default:
`userdir/config.json` or `config.json` whichever
exists). Multiple --config options may be used. Can be
set to `-` to read config from stdin.

View File

@@ -1,4 +1,4 @@
```
``` output
usage: freqtrade show-trades [-h] [-v] [--no-color] [--logfile FILE] [-V]
[-c PATH] [-d PATH] [--userdir PATH]
[--db-url PATH]
@@ -19,21 +19,20 @@ Common arguments:
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
--no-color Disable colorization of hyperopt results. May be
useful if you are redirecting output to a file.
--logfile FILE, --log-file FILE
--logfile, --log-file FILE
Log to the file specified. Special values are:
'syslog', 'journald'. See the documentation for more
details.
-V, --version show program's version number and exit
-c PATH, --config PATH
Specify configuration file (default:
-c, --config PATH Specify configuration file (default:
`userdir/config.json` or `config.json` whichever
exists). Multiple --config options may be used. Can be
set to `-` to read config from stdin.
-d PATH, --datadir PATH, --data-dir PATH
-d, --datadir, --data-dir PATH
Path to the base directory of the exchange with
historical backtesting data. To see futures data, use
trading-mode additionally.
--userdir PATH, --user-data-dir PATH
--userdir, --user-data-dir PATH
Path to userdata directory.
```

View File

@@ -1,4 +1,4 @@
```
``` output
usage: freqtrade strategy-updater [-h] [-v] [--no-color] [--logfile FILE] [-V]
[-c PATH] [-d PATH] [--userdir PATH]
[--strategy-list STRATEGY_LIST [STRATEGY_LIST ...]]
@@ -23,21 +23,20 @@ Common arguments:
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
--no-color Disable colorization of hyperopt results. May be
useful if you are redirecting output to a file.
--logfile FILE, --log-file FILE
--logfile, --log-file FILE
Log to the file specified. Special values are:
'syslog', 'journald'. See the documentation for more
details.
-V, --version show program's version number and exit
-c PATH, --config PATH
Specify configuration file (default:
-c, --config PATH Specify configuration file (default:
`userdir/config.json` or `config.json` whichever
exists). Multiple --config options may be used. Can be
set to `-` to read config from stdin.
-d PATH, --datadir PATH, --data-dir PATH
-d, --datadir, --data-dir PATH
Path to the base directory of the exchange with
historical backtesting data. To see futures data, use
trading-mode additionally.
--userdir PATH, --user-data-dir PATH
--userdir, --user-data-dir PATH
Path to userdata directory.
```

View File

@@ -1,15 +1,14 @@
```
``` output
usage: freqtrade test-pairlist [-h] [--userdir PATH] [-v] [-c PATH]
[--quote QUOTE_CURRENCY [QUOTE_CURRENCY ...]]
[-1] [--print-json] [--exchange EXCHANGE]
options:
-h, --help show this help message and exit
--userdir PATH, --user-data-dir PATH
--userdir, --user-data-dir PATH
Path to userdata directory.
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
-c PATH, --config PATH
Specify configuration file (default:
-c, --config PATH Specify configuration file (default:
`userdir/config.json` or `config.json` whichever
exists). Multiple --config options may be used. Can be
set to `-` to read config from stdin.

View File

@@ -1,4 +1,4 @@
```
``` output
usage: freqtrade trade [-h] [-v] [--no-color] [--logfile FILE] [-V] [-c PATH]
[-d PATH] [--userdir PATH] [-s NAME]
[--strategy-path PATH] [--recursive-strategy-search]
@@ -15,7 +15,7 @@ options:
--sd-notify Notify systemd service manager.
--dry-run Enforce dry-run for trading (removes Exchange secrets
and simulates trades).
--dry-run-wallet DRY_RUN_WALLET, --starting-balance DRY_RUN_WALLET
--dry-run-wallet, --starting-balance DRY_RUN_WALLET
Starting balance, used for backtesting / hyperopt and
dry-runs.
--fee FLOAT Specify fee ratio. Will be applied twice (on trade
@@ -25,26 +25,24 @@ Common arguments:
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
--no-color Disable colorization of hyperopt results. May be
useful if you are redirecting output to a file.
--logfile FILE, --log-file FILE
--logfile, --log-file FILE
Log to the file specified. Special values are:
'syslog', 'journald'. See the documentation for more
details.
-V, --version show program's version number and exit
-c PATH, --config PATH
Specify configuration file (default:
-c, --config PATH Specify configuration file (default:
`userdir/config.json` or `config.json` whichever
exists). Multiple --config options may be used. Can be
set to `-` to read config from stdin.
-d PATH, --datadir PATH, --data-dir PATH
-d, --datadir, --data-dir PATH
Path to the base directory of the exchange with
historical backtesting data. To see futures data, use
trading-mode additionally.
--userdir PATH, --user-data-dir PATH
--userdir, --user-data-dir PATH
Path to userdata directory.
Strategy arguments:
-s NAME, --strategy NAME
Specify strategy class name which will be used by the
-s, --strategy NAME Specify strategy class name which will be used by the
bot.
--strategy-path PATH Specify additional strategy lookup path.
--recursive-strategy-search

View File

@@ -1,4 +1,4 @@
```
``` output
usage: freqtrade trades-to-ohlcv [-h] [-v] [--no-color] [--logfile FILE] [-V]
[-c PATH] [-d PATH] [--userdir PATH]
[-p PAIRS [PAIRS ...]]
@@ -10,10 +10,10 @@ usage: freqtrade trades-to-ohlcv [-h] [-v] [--no-color] [--logfile FILE] [-V]
options:
-h, --help show this help message and exit
-p PAIRS [PAIRS ...], --pairs PAIRS [PAIRS ...]
-p, --pairs PAIRS [PAIRS ...]
Limit command to these pairs. Pairs are space-
separated.
-t TIMEFRAMES [TIMEFRAMES ...], --timeframes TIMEFRAMES [TIMEFRAMES ...]
-t, --timeframes TIMEFRAMES [TIMEFRAMES ...]
Specify which tickers to download. Space-separated
list. Default: `1m 5m`.
--exchange EXCHANGE Exchange name. Only valid if no config is provided.
@@ -23,28 +23,27 @@ options:
--data-format-trades {json,jsongz,feather,parquet}
Storage format for downloaded trades data. (default:
`feather`).
--trading-mode {spot,margin,futures}, --tradingmode {spot,margin,futures}
--trading-mode, --tradingmode {spot,margin,futures}
Select Trading mode
Common arguments:
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
--no-color Disable colorization of hyperopt results. May be
useful if you are redirecting output to a file.
--logfile FILE, --log-file FILE
--logfile, --log-file FILE
Log to the file specified. Special values are:
'syslog', 'journald'. See the documentation for more
details.
-V, --version show program's version number and exit
-c PATH, --config PATH
Specify configuration file (default:
-c, --config PATH Specify configuration file (default:
`userdir/config.json` or `config.json` whichever
exists). Multiple --config options may be used. Can be
set to `-` to read config from stdin.
-d PATH, --datadir PATH, --data-dir PATH
-d, --datadir, --data-dir PATH
Path to the base directory of the exchange with
historical backtesting data. To see futures data, use
trading-mode additionally.
--userdir PATH, --user-data-dir PATH
--userdir, --user-data-dir PATH
Path to userdata directory.
```

View File

@@ -1,4 +1,4 @@
```
``` output
usage: freqtrade webserver [-h] [-v] [--no-color] [--logfile FILE] [-V]
[-c PATH] [-d PATH] [--userdir PATH]
@@ -9,21 +9,20 @@ Common arguments:
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
--no-color Disable colorization of hyperopt results. May be
useful if you are redirecting output to a file.
--logfile FILE, --log-file FILE
--logfile, --log-file FILE
Log to the file specified. Special values are:
'syslog', 'journald'. See the documentation for more
details.
-V, --version show program's version number and exit
-c PATH, --config PATH
Specify configuration file (default:
-c, --config PATH Specify configuration file (default:
`userdir/config.json` or `config.json` whichever
exists). Multiple --config options may be used. Can be
set to `-` to read config from stdin.
-d PATH, --datadir PATH, --data-dir PATH
-d, --datadir, --data-dir PATH
Path to the base directory of the exchange with
historical backtesting data. To see futures data, use
trading-mode additionally.
--userdir PATH, --user-data-dir PATH
--userdir, --user-data-dir PATH
Path to userdata directory.
```

View File

@@ -675,7 +675,7 @@ Should you experience problems you suspect are caused by websockets, you can dis
Should you be required to use a proxy, please refer to the [proxy section](#using-a-proxy-with-freqtrade) for more information.
!!! Info "Rollout"
We're implementing this out slowly, ensuring stability of your bots.
We're rolling this out slowly, ensuring stability of your bots.
Currently, usage is limited to ohlcv data streams.
It's also limited to a few exchanges, with new exchanges being added on an ongoing basis.

View File

@@ -60,6 +60,7 @@ freqtrade download-data --exchange binance --pairs ".*/USDT"
* Given starting points are ignored if data is already available, downloading only missing data up to today.
* Use `--timeframes` to specify what timeframe download the historical candle (OHLCV) data for. Default is `--timeframes 1m 5m` which will download 1-minute and 5-minute data.
* To use exchange, timeframe and list of pairs as defined in your configuration file, use the `-c/--config` option. With this, the script uses the whitelist defined in the config as the list of currency pairs to download data for and does not require the pairs.json file. You can combine `-c/--config` with most other options.
* When downloading futures data (`--trading-mode futures` or a configuration specifying futures mode), freqtrade will automatically download the necessary candle types (e.g. `mark` and `funding_rate` candles) unless specified otherwise via `--candle-types`.
??? Note "Permission denied errors"
If your configuration directory `user_data` was made by docker, you may get the following error:

View File

@@ -98,3 +98,33 @@ Please use configuration based [log setup](advanced-setup.md#advanced-logging) i
The edge module has been deprecated in 2023.9 and removed in 2025.6.
All functionalities of edge have been removed, and having edge configured will result in an error.
## Adjustment to dynamic funding rate handling
With version 2025.12, the handling of dynamic funding rates has been adjusted to also support dynamic funding rates down to 1h funding intervals.
As a consequence, the mark and funding rate timeframes have been changed to 1h for every supported futures exchange.
As the timeframe for both mark and funding_fee candles has changed (usually from 8h to 1h) - already downloaded data will have to be adjusted or partially re-downloaded.
You can either re-download everything (`freqtrade download-data [...] --erase` - :warning: can take a long time) - or download the updated data selectively.
### Selective data re-download
The script below should serve as an example - you may need to adjust the timeframe and exchange to your needs!
``` bash
# Cleanup no longer needed data
rm user_data/data/<exchange>/futures/*-mark-*
rm user_data/data/<exchange>/futures/*-funding_rate-*
# download new data (only required once to fix the mark and funding fee data)
freqtrade download-data -t 1h --trading-mode futures --candle-types funding_rate mark [...] --timerange <full timerange you've got other data for>
```
The result of the above will be that your funding_rates and mark data will have the 1h timeframe.
you can verify this with `freqtrade list-data --exchange <yourexchange> --show`.
!!! Note "Additional arguments"
Additional arguments to the above commands may be necessary, like configuration files or explicit user_data if they deviate from the default.
**Hyperliquid** is a special case now - which will no longer require 1h mark data - but will use regular candles instead (this data never existed and is identical to 1h futures candles). As we don't support download-data for hyperliquid (they don't provide historic data) - there won't be actions necessary for hyperliquid users.

View File

@@ -26,10 +26,19 @@ Alternatively (e.g. if your system is not supported by the setup.sh script), fol
This will install all required tools for development, including `pytest`, `ruff`, `mypy`, and `coveralls`.
Then install the git hook scripts by running `pre-commit install`, so your changes will be verified locally before committing.
This avoids a lot of waiting for CI already, as some basic formatting checks are done locally on your machine.
Run the following command to install the git hook scripts:
Before opening a pull request, please familiarize yourself with our [Contributing Guidelines](https://github.com/freqtrade/freqtrade/blob/develop/CONTRIBUTING.md).
``` bash
pre-commit install
```
These pre-commit scripts check your changes automatically before each commit.
If any formatting issues are found, the commit will fail and will prompt for fixes.
This reduces unnecessary CI failures, reduces maintenance burden, and improves code quality.
You can run the checks manually when necessary with `pre-commit run -a`.
Before opening a pull request, please also familiarize yourself with our [Contributing Guidelines](https://github.com/freqtrade/freqtrade/blob/develop/CONTRIBUTING.md).
### Devcontainer setup

View File

@@ -407,11 +407,12 @@ To use these with Freqtrade, you will need to use the following configuration pa
``` json
"exchange": {
"name": "hyperliquid",
"walletAddress": "your_vault_address", // Vault or subaccount address
"privateKey": "your_api_private_key",
"walletAddress": "your_master_wallet_address", // Your master wallet address (not the API wallet address and not the vault/subaccount address).
"privateKey": "your_api_private_key", // API wallet private key (see https://app.hyperliquid.xyz/API). You'll only need the private key.
"ccxt_config": {
"options": {
"vaultAddress": "your_vault_address" // Optional, only if you want to use a vault or subaccount
"vaultAddress": "your_vault_address", // Optional, only if you want to use a vault ...
"subAccountAddress": "your_subaccount_address" // OR optional, only if you want to use a subaccount
}
},
// ...
@@ -420,6 +421,9 @@ To use these with Freqtrade, you will need to use the following configuration pa
Your balance and trades will now be used from your vault / subaccount - and no longer from your main account.
!!! Note
You can only use either a vault or a subaccount - not both at the same time.
### Historic Hyperliquid data
The Hyperliquid API does not provide historic data beyond the single call to fetch current data, so downloading data is not possible, as the downloaded data would not constitute proper historic data.

View File

@@ -46,10 +46,17 @@ Depending on the space you want to optimize, only some of the below are required
* define parameters with `space='buy'` - for entry signal optimization
* define parameters with `space='sell'` - for exit signal optimization
* define parameters with `space='enter'` - for entry signal optimization
* define parameters with `space='exit'` - for exit signal optimization
* define parameters with `space='protection'` - for protection optimization
* define parameters with `space='random_spacename'` - for better control over which parameters are optimized together
Pick the space name that suits the parameter best. We recommend to use either `buy` / `sell` or `enter` / `exit` for clarity (however there's no technical limitation in this regard).
!!! Note
`populate_indicators` needs to create all indicators any of the spaces may use, otherwise hyperopt will not work.
Rarely you may also need to create a [nested class](advanced-hyperopt.md#overriding-pre-defined-spaces) named `HyperOpt` and implement
* `roi_space` - for custom ROI optimization (if you need the ranges for the ROI parameters in the optimization hyperspace that differ from default)
@@ -79,15 +86,15 @@ Based on the loss function result, hyperopt will determine the next set of param
### Configure your Guards and Triggers
There are two places you need to change in your strategy file to add a new buy hyperopt for testing:
There are two places you need to change in your strategy file to add a new hyperopt parameter for optimization:
* Define the parameters at the class level hyperopt shall be optimizing.
* Within `populate_entry_trend()` - use defined parameter values instead of raw constants.
There you have two different types of indicators: 1. `guards` and 2. `triggers`.
1. Guards are conditions like "never buy if ADX < 10", or never buy if current price is over EMA10.
2. Triggers are ones that actually trigger buy in specific moment, like "buy when EMA5 crosses over EMA10" or "buy when close price touches lower Bollinger band".
1. Guards are conditions like "never enter if ADX < 10", or never enter if current price is over EMA10.
2. Triggers are ones that actually trigger entry in specific moment, like "enter when EMA5 crosses over EMA10" or "enter when close price touches lower Bollinger band".
!!! Hint "Guards and Triggers"
Technically, there is no difference between Guards and Triggers.
@@ -160,9 +167,11 @@ We use these to either enable or disable the ADX and RSI guards.
The last one we call `trigger` and use it to decide which buy trigger we want to use.
!!! Note "Parameter space assignment"
Parameters must either be assigned to a variable named `buy_*` or `sell_*` - or contain `space='buy'` | `space='sell'` to be assigned to a space correctly.
If no parameter is available for a space, you'll receive the error that no space was found when running hyperopt.
- Parameters must either be assigned to a variable named `buy_*`, `sell_*`, `enter_*` or `exit_*` or `protection_*` - or contain have a space assigned explicitly via parameter (`space='buy'`, `space='sell'`, `space='protection'`).
- Parameters with conflicting assignments (e.g. `buy_adx = IntParameter(4, 24, default=14, space='sell')`) will use the explicit space assignment.
- If no parameter is available for a space, you'll receive the error that no space was found when running hyperopt.
Parameters with unclear space (e.g. `adx_period = IntParameter(4, 24, default=14)` - no explicit nor implicit space) will not be detected and will therefore be ignored.
Spaces can also be custom named (e.g. `space='my_custom_space'`), with the only limitation that the space name cannot be `all`, `default` - and must result in a valid python identifier.
So let's write the buy strategy using these values:
@@ -520,21 +529,24 @@ freqtrade hyperopt --strategy <strategyname> --timerange 20210101-20210201
### Running Hyperopt with Smaller Search Space
Use the `--spaces` option to limit the search space used by hyperopt.
Letting Hyperopt optimize everything is a huuuuge search space.
Often it might make more sense to start by just searching for initial buy algorithm.
Or maybe you just want to optimize your stoploss or roi table for that awesome new buy strategy you have.
Letting Hyperopt optimize everything is often a huuuuge search space.
Often it might make more sense to start by just searching for initial entry algorithm.
Or maybe you just want to optimize your stoploss or roi table for that awesome new strategy you have.
Legal values are:
* `all`: optimize everything
* `all`: optimize everything (including custom spaces)
* `buy`: just search for a new buy strategy
* `sell`: just search for a new sell strategy
* `enter`: just search for a new entry logic
* `exit`: just search for a new entry logic
* `roi`: just optimize the minimal profit table for your strategy
* `stoploss`: search for the best stoploss value
* `trailing`: search for the best trailing stop values
* `trades`: search for the best max open trades values
* `protection`: search for the best protection parameters (read the [protections section](#optimizing-protections) on how to properly define these)
* `default`: `all` except `trailing`, `trades` and `protection`
* `custom_space_name`: any custom space used by any parameter in your strategy
* space-separated list of any of the above values for example `--spaces roi stoploss`
The default Hyperopt Search Space, used when no `--space` command line option is specified, does not include the `trailing` hyperspace. We recommend you to run optimization for the `trailing` hyperspace separately, when the best parameters for other hyperspaces were found, validated and pasted into your custom strategy.

View File

@@ -367,7 +367,7 @@ The optional `bearer_token` will be included in the requests Authorization Heade
#### MarketCapPairList
`MarketCapPairList` employs sorting/filtering of pairs by their marketcap rank based of CoinGecko. The returned pairlist will be sorted based of their marketcap ranks.
`MarketCapPairList` employs sorting/filtering of pairs by their marketcap rank based of CoinGecko. The returned pairlist will be sorted based of their marketcap ranks if used in whitelist `mode`.
```json
"pairlists": [
@@ -376,16 +376,21 @@ The optional `bearer_token` will be included in the requests Authorization Heade
"number_assets": 20,
"max_rank": 50,
"refresh_period": 86400,
"mode": "whitelist",
"categories": ["layer-1"]
}
]
```
`number_assets` defines the maximum number of pairs returned by the pairlist. `max_rank` will determine the maximum rank used in creating/filtering the pairlist. It's expected that some coins within the top `max_rank` marketcap will not be included in the resulting pairlist since not all pairs will have active trading pairs in your preferred market/stake/exchange combination.
`number_assets` defines the maximum number of pairs returned by the pairlist if used in whitelist `mode`. In blacklist `mode`, this setting will be ignored.
`max_rank` will determine the maximum rank used in creating/filtering the pairlist. It's expected that some coins within the top `max_rank` marketcap will not be included in the resulting pairlist since not all pairs will have active trading pairs in your preferred market/stake/exchange combination.
While using a `max_rank` bigger than 250 is supported, it's not recommended, as it'll cause multiple API calls to CoinGecko, which can lead to rate limit issues.
The `refresh_period` setting defines the interval (in seconds) at which the marketcap rank data will be refreshed. The default is 86,400 seconds (1 day). The pairlist cache (`refresh_period`) applies to both generating pairlists (when in the first position in the list) and filtering instances (when not in the first position in the list).
The `mode` setting defines whether the plugin will filters in (whitelist `mode`) or filters out (blacklist `mode`) top marketcap ranked coins. By default, the plugin will be in whitelist mode.
The `categories` setting specifies the [coingecko categories](https://www.coingecko.com/en/categories) from which to select coins from. The default is an empty list `[]`, meaning no category filtering is applied.
If an incorrect category string is chosen, the plugin will print the available categories from CoinGecko and fail. The category should be the ID of the category, for example, for `https://www.coingecko.com/en/categories/layer-1`, the category ID would be `layer-1`. You can pass multiple categories such as `["layer-1", "meme-token"]` to select from several categories.
@@ -412,7 +417,7 @@ This filter allows freqtrade to ignore pairs until they have been listed for at
Removes pairs that will be delisted on the exchange maximum `max_days_from_now` days from now (defaults to `0` which remove all future delisted pairs no matter how far from now). Currently this filter only supports following exchanges:
!!! Note "Available exchanges"
Delist filter is only available on Binance, where Binance Futures will work for both dry and live modes, while Binance Spot is limited to live mode (for technical reasons).
Delist filter is available on Bybit Futures, Bitget Futures and Binance, where Binance Futures will work for both dry and live modes, while Binance Spot is limited to live mode (for technical reasons).
!!! Warning "Backtesting"
`DelistFilter` does not support backtesting mode.

View File

@@ -1,6 +1,6 @@
![freqtrade](assets/freqtrade_poweredby.svg)
[![Freqtrade CI](https://github.com/freqtrade/freqtrade/actions/workflows/ci.yml/badge.svg?branch=develop)](https://github.com/freqtrade/freqtrade/actions/)
[![Freqtrade CI](https://github.com/freqtrade/freqtrade/actions/workflows/ci.yml/badge.svg?branch=develop)](https://github.com/freqtrade/freqtrade/actions/workflows/ci.yml)
[![DOI](https://joss.theoj.org/papers/10.21105/joss.04864/status.svg)](https://doi.org/10.21105/joss.04864)
[![Coverage Status](https://coveralls.io/repos/github/freqtrade/freqtrade/badge.svg?branch=develop&service=github)](https://coveralls.io/github/freqtrade/freqtrade?branch=develop)

View File

@@ -1,7 +1,7 @@
markdown==3.9
markdown==3.10
mkdocs==1.6.1
mkdocs-material==9.6.22
mkdocs-material==9.7.0
mdx_truly_sane_lists==1.3
pymdown-extensions==10.16.1
pymdown-extensions==10.17.2
jinja2==3.1.6
mike==2.1.3

View File

@@ -150,184 +150,16 @@ This method will work for all arguments - check the "show" command for a list of
For a full list of available commands, please refer to the list below.
#### Freqtrade client- available commands
Possible commands can be listed from the rest-client script using the `help` command.
``` bash
freqtrade-client help
```
``` output
Possible commands:
--8<-- "commands/freqtrade-client.md"
available_pairs
Return available pair (backtest data) based on timeframe / stake_currency selection
:param timeframe: Only pairs with this timeframe available.
:param stake_currency: Only pairs that include this timeframe
balance
Get the account balance.
blacklist
Show the current blacklist.
:param add: List of coins to add (example: "BNB/BTC")
cancel_open_order
Cancel open order for trade.
:param trade_id: Cancels open orders for this trade.
count
Return the amount of open trades.
daily
Return the profits for each day, and amount of trades.
delete_lock
Delete (disable) lock from the database.
:param lock_id: ID for the lock to delete
delete_trade
Delete trade from the database.
Tries to close open orders. Requires manual handling of this asset on the exchange.
:param trade_id: Deletes the trade with this ID from the database.
forcebuy
Buy an asset.
:param pair: Pair to buy (ETH/BTC)
:param price: Optional - price to buy
forceenter
Force entering a trade
:param pair: Pair to buy (ETH/BTC)
:param side: 'long' or 'short'
:param price: Optional - price to buy
forceexit
Force-exit a trade.
:param tradeid: Id of the trade (can be received via status command)
:param ordertype: Order type to use (must be market or limit)
:param amount: Amount to sell. Full sell if not given
health
Provides a quick health check of the running bot.
lock_add
Manually lock a specific pair
:param pair: Pair to lock
:param until: Lock until this date (format "2024-03-30 16:00:00Z")
:param side: Side to lock (long, short, *)
:param reason: Reason for the lock
locks
Return current locks
logs
Show latest logs.
:param limit: Limits log messages to the last <limit> logs. No limit to get the entire log.
pair_candles
Return live dataframe for <pair><timeframe>.
:param pair: Pair to get data for
:param timeframe: Only pairs with this timeframe available.
:param limit: Limit result to the last n candles.
pair_history
Return historic, analyzed dataframe
:param pair: Pair to get data for
:param timeframe: Only pairs with this timeframe available.
:param strategy: Strategy to analyze and get values for
:param timerange: Timerange to get data for (same format than --timerange endpoints)
performance
Return the performance of the different coins.
ping
simple ping
plot_config
Return plot configuration if the strategy defines one.
profit
Return the profit summary.
reload_config
Reload configuration.
show_config
Returns part of the configuration, relevant for trading operations.
start
Start the bot if it's in the stopped state.
pause
Pause the bot if it's in the running state. If triggered on stopped state will handle open positions.
stats
Return the stats report (durations, sell-reasons).
status
Get the status of open trades.
stop
Stop the bot. Use `start` to restart.
stopbuy
Stop buying (but handle sells gracefully). Use `reload_config` to reset.
strategies
Lists available strategies
strategy
Get strategy details
:param strategy: Strategy class name
sysinfo
Provides system information (CPU, RAM usage)
trade
Return specific trade
:param trade_id: Specify which trade to get.
trades
Return trades history, sorted by id
:param limit: Limits trades to the X last trades. Max 500 trades.
:param offset: Offset by this amount of trades.
list_open_trades_custom_data
Return a dict containing open trades custom-datas
:param key: str, optional - Key of the custom-data
:param limit: Limits trades to X trades.
:param offset: Offset by this amount of trades.
list_custom_data
Return a dict containing custom-datas of a specified trade
:param trade_id: int - ID of the trade
:param key: str, optional - Key of the custom-data
version
Return the version of the bot.
whitelist
Show the current whitelist.
```
### Available endpoints
@@ -359,7 +191,7 @@ All endpoints in the below table need to be prefixed with the base URL of the AP
| `/locks/<lockid>` | DELETE | Deletes (disables) the lock by id.<br/>*Params:*<br/>- `lockid` (`int`)
| `/profit` | GET | Display a summary of your profit/loss from close trades and some stats about your performance.
| `/forceexit` | POST | Instantly exits the given trade (ignoring `minimum_roi`), using the given order type ("market" or "limit", uses your config setting if not specified), and the chosen amount (full sell if not specified). If `all` is supplied as the `tradeid`, then all currently open trades will be forced to exit.<br/>*Params:*<br/>- `<tradeid>` (`int` or `str`)<br/>- `<ordertype>` (`str`)<br/>- `[amount]` (`float`)
| `/forceenter` | POST | Instantly enters the given pair. Side is optional and is either `long` or `short` (default is `long`). Rate is optional. (`force_entry_enable` must be set to True)<br/>*Params:*<br/>- `<pair>` (`str`)<br/>- `<side>` (`str`)<br/>- `[rate]` (`float`)
| `/forceenter` | POST | Instantly enters the given pair. Side is optional and is either `long` or `short` (default is `long`). Price, stake amount, entry tag and leverage are optional. Order type is optional and is either `market` or `long` (default using the value set in config). (`force_entry_enable` must be set to True)<br/>*Params:*<br/>- `<pair>` (`str`)<br/>- `<side>` (`str`)<br/>- `[price]` (`float`)<br/>- `[ordertype]` (`str`)<br/>- `[stakeamount]` (`float`)<br/>- `[entry_tag]` (`str`)<br/>- `[leverage]` (`float`)
| `/performance` | GET | Show performance of each finished trade grouped by pair.
| `/balance` | GET | Show account balance per currency.
| `/daily` | GET | Shows profit or loss per day, over the last n days (n defaults to 7).<br/>*Params:*<br/>- `timescale` (`int`)

View File

@@ -634,7 +634,7 @@ class AwesomeStrategy(IStrategy):
## Custom order price rules
By default, freqtrade use the orderbook to automatically set an order price([Relevant documentation](configuration.md#prices-used-for-orders)), you also have the option to create custom order prices based on your strategy.
By default, freqtrade use the orderbook to automatically set an order price ([Relevant documentation](configuration.md#prices-used-for-orders)), you also have the option to create custom order prices based on your strategy.
You can use this feature by creating a `custom_entry_price()` function in your strategy file to customize entry prices and `custom_exit_price()` for exits.

View File

@@ -1,6 +1,6 @@
"""Freqtrade bot"""
__version__ = "2025.10"
__version__ = "2025.12-dev"
if "dev" in __version__:
from pathlib import Path

View File

@@ -3,6 +3,7 @@ This module contains the argument manager class
"""
from argparse import ArgumentParser, Namespace, _ArgumentGroup
from copy import deepcopy
from functools import partial
from pathlib import Path
from typing import Any
@@ -104,7 +105,7 @@ ARGS_BACKTEST_SHOW = [
ARGS_LIST_EXCHANGES = ["print_one_column", "list_exchanges_all", "trading_mode", "dex_exchanges"]
ARGS_LIST_TIMEFRAMES = ["exchange", "print_one_column"]
ARGS_LIST_TIMEFRAMES = ["exchange", "print_one_column", "trading_mode"]
ARGS_LIST_PAIRS = [
"exchange",
@@ -174,6 +175,7 @@ ARGS_DOWNLOAD_DATA = [
"dataformat_ohlcv",
"dataformat_trades",
"trading_mode",
"candle_types",
"prepend_data",
]
@@ -348,7 +350,11 @@ class Arguments:
def _build_args(self, optionlist: list[str], parser: ArgumentParser | _ArgumentGroup) -> None:
for val in optionlist:
opt = AVAILABLE_CLI_OPTIONS[val]
parser.add_argument(*opt.cli, dest=val, **opt.kwargs)
options = deepcopy(opt.kwargs)
help_text = options.pop("help", None)
if opt.fthelp and isinstance(opt.fthelp, dict) and hasattr(parser, "prog"):
help_text = opt.fthelp.get(parser.prog, help_text)
parser.add_argument(*opt.cli, dest=val, help=help_text, **options)
def _build_subcommands(self) -> None:
"""

View File

@@ -5,7 +5,10 @@ Definition of cli arguments used in arguments.py
from argparse import ArgumentTypeError
from freqtrade import constants
from freqtrade.constants import HYPEROPT_LOSS_BUILTIN
from freqtrade.constants import (
HYPEROPT_BUILTIN_SPACE_OPTIONS,
HYPEROPT_LOSS_BUILTIN,
)
from freqtrade.enums import CandleType
@@ -35,8 +38,14 @@ def check_int_nonzero(value: str) -> int:
class Arg:
# Optional CLI arguments
def __init__(self, *args, **kwargs):
def __init__(self, *args, fthelp: dict[str, str] | None = None, **kwargs):
"""
CLI Arguments - used to build subcommand parsers consistently.
:param fthelp: dict - fthelp per command - should be "freqtrade <command>": help_text
If not provided or not found, 'help' from kwargs is used instead.
"""
self.cli = args
self.fthelp = fthelp
self.kwargs = kwargs
@@ -278,26 +287,18 @@ AVAILABLE_CLI_OPTIONS = {
),
"spaces": Arg(
"--spaces",
help="Specify which parameters to hyperopt. Space-separated list.",
choices=[
"all",
"buy",
"sell",
"roi",
"stoploss",
"trailing",
"protection",
"trades",
"default",
],
help=(
"Specify which parameters to hyperopt. Space-separated list. "
"Available builtin options (custom spaces will not be listed here): "
f"{', '.join(HYPEROPT_BUILTIN_SPACE_OPTIONS)}. Default: `default` - "
"which includes all spaces except for 'trailing', 'protection', and 'trades'."
),
nargs="+",
default="default",
),
"analyze_per_epoch": Arg(
"--analyze-per-epoch",
help="Run populate_indicators once per epoch.",
action="store_true",
default=False,
),
"print_all": Arg(
"--print-all",
@@ -427,6 +428,14 @@ AVAILABLE_CLI_OPTIONS = {
),
"candle_types": Arg(
"--candle-types",
fthelp={
"freqtrade download-data": (
"Select candle type to download. "
"Defaults to the necessary candles for the selected trading mode "
"(e.g. 'spot' or ('futures', 'funding_rate' and 'mark') for futures)."
),
"_": "Select candle type to convert. Defaults to all available types.",
},
help="Select candle type to convert. Defaults to all available types.",
choices=[c.value for c in CandleType],
nargs="+",

View File

@@ -101,7 +101,7 @@ def _print_objs_tabular(objs: list, print_colorized: bool) -> None:
names = [s["name"] for s in objs]
objs_to_print: list[dict[str, Text | str]] = [
{
"name": Text(s["name"] if s["name"] else "--"),
"Strategy name": Text(s["name"] if s["name"] else "--"),
"location": s["location_rel"],
"status": (
Text("LOAD FAILED", style="bold red")
@@ -115,11 +115,19 @@ def _print_objs_tabular(objs: list, print_colorized: bool) -> None:
]
for idx, s in enumerate(objs):
if "hyperoptable" in s:
custom_params = [
f"{space}: {len(params)}"
for space, params in s["hyperoptable"].items()
if space not in ["buy", "sell", "protection"]
]
hyp = s["hyperoptable"]
objs_to_print[idx].update(
{
"hyperoptable": "Yes" if s["hyperoptable"]["count"] > 0 else "No",
"buy-Params": str(len(s["hyperoptable"].get("buy", []))),
"sell-Params": str(len(s["hyperoptable"].get("sell", []))),
"hyperoptable": "Yes" if len(hyp) > 0 else "No",
"buy-Params": str(len(hyp.get("buy", []))),
"sell-Params": str(len(hyp.get("sell", []))),
"protection-Params": str(len(hyp.get("protection", []))),
"custom-Params": ", ".join(custom_params) if custom_params else "",
}
)
table = Table()
@@ -140,6 +148,7 @@ def start_list_strategies(args: dict[str, Any]) -> None:
"""
from freqtrade.configuration import setup_utils_configuration
from freqtrade.resolvers import StrategyResolver
from freqtrade.strategy.hyper import detect_all_parameters
config = setup_utils_configuration(args, RunMode.UTIL_NO_EXCHANGE)
@@ -153,9 +162,9 @@ def start_list_strategies(args: dict[str, Any]) -> None:
strategy_objs = sorted(strategy_objs, key=lambda x: x["name"])
for obj in strategy_objs:
if obj["class"]:
obj["hyperoptable"] = obj["class"].detect_all_parameters()
obj["hyperoptable"] = detect_all_parameters(obj["class"])
else:
obj["hyperoptable"] = {"count": 0}
obj["hyperoptable"] = {}
if args["print_one_column"]:
print("\n".join([s["name"] for s in strategy_objs]))

View File

@@ -1,11 +1,14 @@
# Required json-schema for user specified config
from freqtrade.constants import (
AVAILABLE_DATAHANDLERS,
AVAILABLE_PAIRLISTS,
BACKTEST_BREAKDOWNS,
BACKTEST_CACHE_AGE,
DRY_RUN_WALLET,
EXPORT_OPTIONS,
HYPEROPT_LOSS_BUILTIN,
MARGIN_MODES,
ORDERTIF_POSSIBILITIES,
ORDERTYPE_POSSIBILITIES,
@@ -228,6 +231,76 @@ CONF_SCHEMA = {
"type": "array",
"items": {"type": "string", "enum": BACKTEST_BREAKDOWNS},
},
"backtest_cache": {
"description": "Load a cached backtest result no older than specified age.",
"type": "string",
"enum": BACKTEST_CACHE_AGE,
},
# Hyperopt
"hyperopt_path": {
"description": "Specify additional lookup path for Hyperopt Loss functions.",
"type": "string",
},
"epochs": {
"description": "Number of training epochs for Hyperopt.",
"type": "integer",
"minimum": 1,
},
"early_stop": {
"description": (
"Early stop hyperopt if no improvement after <epochs>. Set to 0 to disable."
),
"type": "integer",
"minimum": 0,
},
"spaces": {
"description": (
"Hyperopt parameter spaces to optimize. Default is the default set and"
"includes all spaces except for 'trailing', 'protection', and 'trades'."
),
"type": "array",
"items": {"type": "string"},
"default": ["default"],
},
"analyze_per_epoch": {
"description": "Perform analysis after each epoch in Hyperopt.",
"type": "boolean",
},
"print_all": {
"description": "Print all hyperopt trials, not just the best ones.",
"type": "boolean",
"default": False,
},
"hyperopt_jobs": {
"description": (
"The number of concurrently running jobs for hyperoptimization "
"(hyperopt worker processes). "
"If -1 (default), all CPUs are used, for -2, all CPUs but one are used, etc. "
"If 1 is given, no parallel computing is used."
),
"type": "integer",
"default": -1,
},
"hyperopt_random_state": {
"description": "Random state for hyperopt trials.",
"type": "integer",
"minimum": 0,
},
"hyperopt_min_trades": {
"description": "Minimum number of trades per epoch for hyperopt.",
"type": "integer",
"minimum": 0,
},
"hyperopt_loss": {
"description": (
"The class name of the hyperopt loss function class (IHyperOptLoss). "
"Different functions can generate completely different results, "
"since the target for optimization is different. "
f"Built-in Hyperopt-loss-functions are: {', '.join(HYPEROPT_LOSS_BUILTIN)}"
),
"type": "string",
},
# end hyperopt
"bot_name": {
"description": "Name of the trading bot. Passed via API to a client.",
"type": "string",

View File

@@ -41,6 +41,19 @@ HYPEROPT_LOSS_BUILTIN = [
"ProfitDrawDownHyperOptLoss",
"MultiMetricHyperOptLoss",
]
HYPEROPT_BUILTIN_SPACES = [
"buy",
"sell",
"enter",
"exit",
"roi",
"stoploss",
"trailing",
"protection",
"trades",
]
HYPEROPT_BUILTIN_SPACE_OPTIONS = ["default", "all"] + HYPEROPT_BUILTIN_SPACES
AVAILABLE_PAIRLISTS = [
"StaticPairList",
"VolumePairList",

View File

@@ -38,7 +38,8 @@ def ohlcv_to_dataframe(
cols = DEFAULT_DATAFRAME_COLUMNS
df = DataFrame(ohlcv, columns=cols)
df["date"] = to_datetime(df["date"], unit="ms", utc=True)
# Floor date to seconds to account for exchange imprecisions
df["date"] = to_datetime(df["date"], unit="ms", utc=True).dt.floor("s")
# Some exchanges return int values for Volume and even for OHLC.
# Convert them since TA-LIB indicators used in the strategy assume floats

View File

@@ -348,6 +348,22 @@ class DataProvider:
)
return total_candles
def __fix_funding_rate_timeframe(
self, pair: str, timeframe: str | None, candle_type: str
) -> str | None:
if (
candle_type == CandleType.FUNDING_RATE
and (ff_tf := self.get_funding_rate_timeframe()) != timeframe
):
# TODO: does this message make sense? might be pointless as funding fees don't
# have a timeframe
logger.warning(
f"{pair}, {timeframe} requested - funding rate timeframe not matching {ff_tf}."
)
return ff_tf
return timeframe
def get_pair_dataframe(
self, pair: str, timeframe: str | None = None, candle_type: str = ""
) -> DataFrame:
@@ -361,6 +377,7 @@ class DataProvider:
:return: Dataframe for this pair
:param candle_type: '', mark, index, premiumIndex, or funding_rate
"""
timeframe = self.__fix_funding_rate_timeframe(pair, timeframe, candle_type)
if self.runmode in (RunMode.DRY_RUN, RunMode.LIVE):
# Get live OHLCV data.
data = self.ohlcv(pair=pair, timeframe=timeframe, candle_type=candle_type)
@@ -620,3 +637,12 @@ class DataProvider:
except ExchangeError:
logger.warning(f"Could not fetch market data for {pair}. Assuming no delisting.")
return None
def get_funding_rate_timeframe(self) -> str:
"""
Get the funding rate timeframe from exchange options
:return: Timeframe string
"""
if self._exchange is None:
raise OperationalException(NO_EXCHANGE_EXCEPTION)
return self._exchange.get_option("funding_fee_timeframe")

View File

@@ -397,6 +397,9 @@ class IDataHandler(ABC):
pairdf = self._ohlcv_load(
pair, timeframe, timerange=timerange_startup, candle_type=candle_type
)
if not pairdf.empty and candle_type == CandleType.FUNDING_RATE:
# Funding rate data is sometimes off by a couple of ms - floor to seconds
pairdf["date"] = pairdf["date"].dt.floor("s")
if self._check_empty_df(pairdf, pair, timeframe, candle_type, warn_no_data):
return pairdf
else:
@@ -508,8 +511,15 @@ class IDataHandler(ABC):
Applies to bybit and okx, where funding-fee and mark candles have different timeframes.
"""
paircombs = self.ohlcv_get_available_data(self._datadir, TradingMode.FUTURES)
ff_timeframe_s = timeframe_to_seconds(ff_timeframe)
funding_rate_combs = [
f for f in paircombs if f[2] == CandleType.FUNDING_RATE and f[1] != ff_timeframe
f
for f in paircombs
if f[2] == CandleType.FUNDING_RATE
and f[1] != ff_timeframe
# Only allow smaller timeframes to move from smaller to larger timeframes
and timeframe_to_seconds(f[1]) < ff_timeframe_s
]
if funding_rate_combs:

View File

@@ -308,11 +308,15 @@ def _download_pair_history(
candle_type=candle_type,
until_ms=until_ms if until_ms else None,
)
logger.info(f"Downloaded data for {pair} with length {len(new_dataframe)}.")
logger.info(
f"Downloaded data for {pair}, {timeframe}, {candle_type} with length "
f"{len(new_dataframe)}."
)
else:
new_dataframe = pair_candles
logger.info(
f"Downloaded data for {pair} with length {len(new_dataframe)}. Parallel Method."
f"Downloaded data for {pair}, {timeframe}, {candle_type} with length "
f"{len(new_dataframe)}. Parallel Method."
)
if data.empty:
@@ -349,6 +353,7 @@ def _download_pair_history(
def refresh_backtest_ohlcv_data(
exchange: Exchange,
*,
pairs: list[str],
timeframes: list[str],
datadir: Path,
@@ -359,6 +364,7 @@ def refresh_backtest_ohlcv_data(
data_format: str | None = None,
prepend: bool = False,
progress_tracker: CustomProgress | None = None,
candle_types: list[CandleType] | None = None,
no_parallel_download: bool = False,
) -> list[str]:
"""
@@ -371,10 +377,44 @@ def refresh_backtest_ohlcv_data(
pairs_not_available = []
fast_candles: dict[PairWithTimeframe, DataFrame] = {}
data_handler = get_datahandler(datadir, data_format)
candle_type = CandleType.get_default(trading_mode)
def_candletype = CandleType.SPOT if trading_mode != "futures" else CandleType.FUTURES
if trading_mode != "futures":
# Ignore user passed candle types for non-futures trading
timeframes_with_candletype = [(tf, def_candletype) for tf in timeframes]
else:
# Filter out SPOT candle type for futures trading
candle_types = (
[ct for ct in candle_types if ct != CandleType.SPOT] if candle_types else None
)
fr_candle_type = CandleType.from_string(exchange.get_option("mark_ohlcv_price"))
tf_funding_rate = exchange.get_option("funding_fee_timeframe")
tf_mark = exchange.get_option("mark_ohlcv_timeframe")
if candle_types:
for ct in candle_types:
exchange.verify_candle_type_support(ct)
timeframes_with_candletype = [
(tf, ct)
for ct in candle_types
for tf in timeframes
if ct != CandleType.FUNDING_RATE
]
else:
# Default behavior
timeframes_with_candletype = [(tf, def_candletype) for tf in timeframes]
timeframes_with_candletype.append((tf_mark, fr_candle_type))
if not candle_types or CandleType.FUNDING_RATE in candle_types:
# All exchanges need FundingRate for futures trading.
# The timeframe is aligned to the mark-price timeframe.
timeframes_with_candletype.append((tf_funding_rate, CandleType.FUNDING_RATE))
# Deduplicate list ...
timeframes_with_candletype = list(dict.fromkeys(timeframes_with_candletype))
logger.debug(
"Downloading %s.", ", ".join(f'"{tf} {ct}"' for tf, ct in timeframes_with_candletype)
)
with progress_tracker as progress:
tf_length = len(timeframes) if trading_mode != "futures" else len(timeframes) + 2
timeframe_task = progress.add_task("Timeframe", total=tf_length)
timeframe_task = progress.add_task("Timeframe", total=len(timeframes_with_candletype))
pair_task = progress.add_task("Downloading data...", total=len(pairs))
for pair in pairs:
@@ -385,11 +425,13 @@ def refresh_backtest_ohlcv_data(
pairs_not_available.append(f"{pair}: Pair not available on exchange.")
logger.info(f"Skipping pair {pair}...")
continue
for timeframe in timeframes:
for timeframe, candle_type in timeframes_with_candletype:
# Get fast candles via parallel method on first loop through per timeframe
# and candle type. Downloads all the pairs in the list and stores them.
# Also skips if only 1 pair/timeframe combination is scheduled for download.
if (
not no_parallel_download
and (len(pairs) + len(timeframes)) > 2
and exchange.get_option("download_data_parallel_quick", True)
and (
((pair, timeframe, candle_type) not in fast_candles)
@@ -410,7 +452,7 @@ def refresh_backtest_ohlcv_data(
# get the already downloaded pair candles if they exist
pair_candles = fast_candles.pop((pair, timeframe, candle_type), None)
progress.update(timeframe_task, description=f"Timeframe {timeframe}")
progress.update(timeframe_task, description=f"Timeframe {timeframe} {candle_type}")
logger.debug(f"Downloading pair {pair}, {candle_type}, interval {timeframe}.")
_download_pair_history(
pair=pair,
@@ -426,33 +468,6 @@ def refresh_backtest_ohlcv_data(
pair_candles=pair_candles, # optional pass of dataframe of parallel candles
)
progress.update(timeframe_task, advance=1)
if trading_mode == "futures":
# Predefined candletype (and timeframe) depending on exchange
# Downloads what is necessary to backtest based on futures data.
tf_mark = exchange.get_option("mark_ohlcv_timeframe")
tf_funding_rate = exchange.get_option("funding_fee_timeframe")
fr_candle_type = CandleType.from_string(exchange.get_option("mark_ohlcv_price"))
# All exchanges need FundingRate for futures trading.
# The timeframe is aligned to the mark-price timeframe.
combs = ((CandleType.FUNDING_RATE, tf_funding_rate), (fr_candle_type, tf_mark))
for candle_type_f, tf in combs:
logger.debug(f"Downloading pair {pair}, {candle_type_f}, interval {tf}.")
_download_pair_history(
pair=pair,
datadir=datadir,
exchange=exchange,
timerange=timerange,
data_handler=data_handler,
timeframe=str(tf),
new_pairs_days=new_pairs_days,
candle_type=candle_type_f,
erase=erase,
prepend=prepend,
)
progress.update(
timeframe_task, advance=1, description=f"Timeframe {candle_type_f}, {tf}"
)
progress.update(pair_task, advance=1)
progress.update(timeframe_task, description="Timeframe")
@@ -474,7 +489,7 @@ def _download_all_pairs_history_parallel(
:return: Candle pairs with timeframes
"""
candles: dict[PairWithTimeframe, DataFrame] = {}
since = 0
since: int | None = None
if timerange:
if timerange.starttype == "date":
since = timerange.startts * 1000
@@ -482,10 +497,12 @@ def _download_all_pairs_history_parallel(
candle_limit = exchange.ohlcv_candle_limit(timeframe, candle_type)
one_call_min_time_dt = dt_ts(date_minus_candles(timeframe, candle_limit))
# check if we can get all candles in one go, if so then we can download them in parallel
if since > one_call_min_time_dt:
if since is None or since > one_call_min_time_dt:
logger.info(
f"Downloading parallel candles for {timeframe} for all pairs "
f"since {format_ms_time(since)}"
f"Downloading parallel candles for {timeframe} for all pairs"
f" since {format_ms_time(since)}"
if since
else "."
)
needed_pairs: ListPairsWithTimeframes = [
(p, timeframe, candle_type) for p in [p for p in pairs]
@@ -693,6 +710,9 @@ def download_data(
"""
Download data function. Used from both cli and API.
"""
exchange.validate_trading_mode_and_margin_mode(
config.get("trading_mode", TradingMode.SPOT), None, allow_none_margin_mode=True
)
timerange = TimeRange()
if "days" in config and config["days"] is not None:
time_since = (datetime.now() - timedelta(days=config["days"])).strftime("%Y%m%d")
@@ -793,6 +813,7 @@ def download_data(
trading_mode=config.get("trading_mode", "spot"),
prepend=config.get("prepend_data", False),
progress_tracker=progress_tracker,
candle_types=config.get("candle_types"),
no_parallel_download=config.get("no_parallel_download", False),
)
finally:

View File

@@ -74,9 +74,10 @@ def combined_dataframes_with_rel_mean(
df_comb = combine_dataframes_by_column(data, column)
# Trim dataframes to the given timeframe
df_comb = df_comb.iloc[(df_comb.index >= fromdt) & (df_comb.index < todt)]
rel_mean = df_comb.pct_change().mean(axis=1).fillna(0).cumsum()
df_comb["count"] = df_comb.count(axis=1)
df_comb["mean"] = df_comb.mean(axis=1)
df_comb["rel_mean"] = df_comb["mean"].pct_change().fillna(0).cumsum()
df_comb["rel_mean"] = rel_mean
return df_comb[["mean", "rel_mean", "count"]]
@@ -143,6 +144,20 @@ def _calc_drawdown_series(
max_drawdown_df["drawdown_relative"] = (
max_drawdown_df["high_value"] - max_drawdown_df["cumulative"]
) / max_drawdown_df["high_value"]
# Add zero row at start to account for edge-cases with no winning / losing trades - so high/low
# will be 0.0 in such cases.
zero_row = pd.DataFrame(
{
"cumulative": [0.0],
"high_value": [0.0],
"drawdown": [0.0],
"drawdown_relative": [0.0],
"date": [profit_results.loc[0, date_col]],
}
)
max_drawdown_df = pd.concat([zero_row, max_drawdown_df], ignore_index=True)
return max_drawdown_df
@@ -215,6 +230,7 @@ def calculate_max_drawdown(
max_drawdown_df = _calc_drawdown_series(
profit_results, date_col=date_col, value_col=value_col, starting_balance=starting_balance
)
# max_drawdown_df has an extra zero row at the start
# Calculate maximum drawdown
idxmin = (
@@ -223,15 +239,15 @@ def calculate_max_drawdown(
else max_drawdown_df["drawdown"].idxmin()
)
high_idx = max_drawdown_df.iloc[: idxmin + 1]["high_value"].idxmax()
high_date = profit_results.loc[high_idx, date_col]
low_date = profit_results.loc[idxmin, date_col]
high_val = max_drawdown_df.loc[high_idx, "cumulative"]
low_val = max_drawdown_df.loc[idxmin, "cumulative"]
max_drawdown_rel = max_drawdown_df.loc[idxmin, "drawdown_relative"]
high_date = profit_results.at[max(high_idx - 1, 0), date_col]
low_date = profit_results.at[max(idxmin - 1, 0), date_col]
high_val = max_drawdown_df.at[high_idx, "cumulative"]
low_val = max_drawdown_df.at[idxmin, "cumulative"]
max_drawdown_rel = max_drawdown_df.at[idxmin, "drawdown_relative"]
# Calculate current drawdown
current_high_idx = max_drawdown_df["high_value"].iloc[:-1].idxmax()
current_high_date = profit_results.loc[current_high_idx, date_col]
current_high_date = profit_results.at[max(current_high_idx - 1, 0), date_col]
current_high_value = max_drawdown_df.iloc[-1]["high_value"]
current_cumulative = max_drawdown_df.iloc[-1]["cumulative"]
current_drawdown_abs = current_high_value - current_cumulative

View File

@@ -5,7 +5,6 @@ from datetime import UTC, datetime
from pathlib import Path
import ccxt
from cachetools import TTLCache
from pandas import DataFrame
from freqtrade.constants import DEFAULT_DATAFRAME_COLUMNS
@@ -21,6 +20,7 @@ from freqtrade.exchange.common import retrier
from freqtrade.exchange.exchange_types import FtHas, Tickers
from freqtrade.exchange.exchange_utils_timeframe import timeframe_to_msecs
from freqtrade.misc import deep_merge_dicts, json_load
from freqtrade.util import FtTTLCache
from freqtrade.util.datetime_helpers import dt_from_ts, dt_ts
@@ -76,7 +76,7 @@ class Binance(Exchange):
def __init__(self, *args, **kwargs) -> None:
super().__init__(*args, **kwargs)
self._spot_delist_schedule_cache: TTLCache = TTLCache(maxsize=100, ttl=300)
self._spot_delist_schedule_cache: FtTTLCache = FtTTLCache(maxsize=100, ttl=300)
def get_proxy_coin(self) -> str:
"""

File diff suppressed because it is too large Load Diff

View File

@@ -1,10 +1,10 @@
import logging
from datetime import timedelta
from datetime import datetime, timedelta
import ccxt
from freqtrade.constants import BuySell
from freqtrade.enums import CandleType, MarginMode, TradingMode
from freqtrade.enums import OPTIMIZE_MODES, CandleType, MarginMode, TradingMode
from freqtrade.exceptions import (
DDosProtection,
OperationalException,
@@ -14,7 +14,7 @@ from freqtrade.exceptions import (
from freqtrade.exchange import Exchange
from freqtrade.exchange.common import API_RETRY_COUNT, retrier
from freqtrade.exchange.exchange_types import CcxtOrder, FtHas
from freqtrade.util.datetime_helpers import dt_now, dt_ts
from freqtrade.util import dt_from_ts, dt_now, dt_ts
logger = logging.getLogger(__name__)
@@ -35,8 +35,8 @@ class Bitget(Exchange):
"order_time_in_force": ["GTC", "FOK", "IOC", "PO"],
}
_ft_has_futures: FtHas = {
"mark_ohlcv_timeframe": "4h",
"funding_fee_candle_limit": 100,
"has_delisting": True,
}
_supported_trading_mode_margin_pairs: list[tuple[TradingMode, MarginMode]] = [
@@ -236,3 +236,35 @@ class Bitget(Exchange):
raise OperationalException(
"Freqtrade currently only supports isolated futures for bitget"
)
def check_delisting_time(self, pair: str) -> datetime | None:
"""
Check if the pair gonna be delisted.
By default, it returns None.
:param pair: Market symbol
:return: Datetime if the pair gonna be delisted, None otherwise
"""
if self._config["runmode"] in OPTIMIZE_MODES:
return None
if self.trading_mode == TradingMode.FUTURES:
return self._check_delisting_futures(pair)
return None
def _check_delisting_futures(self, pair: str) -> datetime | None:
delivery_time = self.markets.get(pair, {}).get("info", {}).get("limitOpenTime", None)
if delivery_time:
if isinstance(delivery_time, str) and (delivery_time != ""):
delivery_time = int(delivery_time)
if not isinstance(delivery_time, int) or delivery_time <= 0:
return None
max_delivery = dt_ts() + (
14 * 24 * 60 * 60 * 1000
) # Assume exchange don't announce delisting more than 14 days in advance
if delivery_time < max_delivery:
return dt_from_ts(delivery_time)
return None

View File

@@ -4,12 +4,13 @@ from datetime import datetime, timedelta
import ccxt
from freqtrade.constants import BuySell
from freqtrade.enums import MarginMode, PriceType, TradingMode
from freqtrade.enums import OPTIMIZE_MODES, MarginMode, PriceType, TradingMode
from freqtrade.exceptions import DDosProtection, ExchangeError, OperationalException, TemporaryError
from freqtrade.exchange import Exchange
from freqtrade.exchange.common import retrier
from freqtrade.exchange.exchange_types import CcxtOrder, FtHas
from freqtrade.misc import deep_merge_dicts
from freqtrade.util import dt_from_ts, dt_ts
logger = logging.getLogger(__name__)
@@ -37,8 +38,6 @@ class Bybit(Exchange):
}
_ft_has_futures: FtHas = {
"ohlcv_has_history": True,
"mark_ohlcv_timeframe": "4h",
"funding_fee_timeframe": "8h",
"funding_fee_candle_limit": 200,
"stoploss_on_exchange": True,
"stoploss_order_types": {"limit": "limit", "market": "market"},
@@ -54,6 +53,7 @@ class Bybit(Exchange):
"exchange_has_overrides": {
"fetchOrder": True,
},
"has_delisting": True,
}
_supported_trading_mode_margin_pairs: list[tuple[TradingMode, MarginMode]] = [
@@ -294,3 +294,35 @@ class Bybit(Exchange):
self.cache_leverage_tiers(tiers, self._config["stake_currency"])
return tiers
def check_delisting_time(self, pair: str) -> datetime | None:
"""
Check if the pair gonna be delisted.
By default, it returns None.
:param pair: Market symbol
:return: Datetime if the pair gonna be delisted, None otherwise
"""
if self._config["runmode"] in OPTIMIZE_MODES:
return None
if self.trading_mode == TradingMode.FUTURES:
return self._check_delisting_futures(pair)
return None
def _check_delisting_futures(self, pair: str) -> datetime | None:
delivery_time = self.markets.get(pair, {}).get("info", {}).get("deliveryTime", 0)
if delivery_time:
if isinstance(delivery_time, str) and (delivery_time != ""):
delivery_time = int(delivery_time)
if not isinstance(delivery_time, int) or delivery_time <= 0:
return None
max_delivery = dt_ts() + (
14 * 24 * 60 * 60 * 1000
) # Assume exchange don't announce delisting more than 14 days in advance
if delivery_time < max_delivery:
return dt_from_ts(delivery_time)
return None

View File

@@ -97,6 +97,9 @@ EXCHANGE_HAS_OPTIONAL = [
# 'fetchLeverageTiers', # Futures initialization
# 'fetchMarketLeverageTiers', # Futures initialization
# 'fetchOpenOrders', 'fetchClosedOrders', # 'fetchOrders', # Refinding balance...
# "fetchPremiumIndexOHLCV", # Futures additional data
# "fetchMarkOHLCV", # Futures additional data
# "fetchIndexOHLCV", # Futures additional data
# ccxt.pro
"watchOHLCV",
]

View File

@@ -16,7 +16,6 @@ from typing import Any, Literal, TypeGuard, TypeVar
import ccxt
import ccxt.pro as ccxt_pro
from cachetools import TTLCache
from ccxt import TICK_SIZE
from dateutil import parser
from pandas import DataFrame, concat
@@ -105,11 +104,11 @@ from freqtrade.misc import (
deep_merge_dicts,
file_dump_json,
file_load_json,
safe_value_fallback,
safe_value_fallback2,
)
from freqtrade.util import dt_from_ts, dt_now
from freqtrade.util import FtTTLCache, PeriodicCache, dt_from_ts, dt_now
from freqtrade.util.datetime_helpers import dt_humanize_delta, dt_ts, format_ms_time
from freqtrade.util.periodic_cache import PeriodicCache
logger = logging.getLogger(__name__)
@@ -154,8 +153,8 @@ class Exchange:
"l2_limit_range_required": True, # Allow Empty L2 limit (kucoin)
"l2_limit_upper": None, # Upper limit for L2 limit
"mark_ohlcv_price": "mark",
"mark_ohlcv_timeframe": "8h",
"funding_fee_timeframe": "8h",
"mark_ohlcv_timeframe": "1h",
"funding_fee_timeframe": "1h",
"ccxt_futures_name": "swap",
"needs_trading_fees": False, # use fetch_trading_fees to cache fees
"order_props_in_contracts": ["amount", "filled", "remaining"],
@@ -230,13 +229,13 @@ class Exchange:
self._cache_lock = Lock()
# Cache for 10 minutes ...
self._fetch_tickers_cache: TTLCache = TTLCache(maxsize=4, ttl=60 * 10)
self._fetch_tickers_cache: FtTTLCache = FtTTLCache(maxsize=4, ttl=60 * 10)
# Cache values for 300 to avoid frequent polling of the exchange for prices
# Caching only applies to RPC methods, so prices for open trades are still
# refreshed once every iteration.
# Shouldn't be too high either, as it'll freeze UI updates in case of open orders.
self._exit_rate_cache: TTLCache = TTLCache(maxsize=100, ttl=300)
self._entry_rate_cache: TTLCache = TTLCache(maxsize=100, ttl=300)
self._exit_rate_cache: FtTTLCache = FtTTLCache(maxsize=100, ttl=300)
self._entry_rate_cache: FtTTLCache = FtTTLCache(maxsize=100, ttl=300)
# Holds candles
self._klines: dict[PairWithTimeframe, DataFrame] = {}
@@ -430,7 +429,15 @@ class Exchange:
@property
def timeframes(self) -> list[str]:
return list((self._api.timeframes or {}).keys())
market_type = (
"spot"
if self.trading_mode != TradingMode.FUTURES
else self._ft_has["ccxt_futures_name"]
)
timeframes = self._api.options.get("timeframes", {}).get(market_type)
if timeframes is None:
timeframes = self._api.timeframes
return list((timeframes or {}).keys())
@property
def markets(self) -> dict[str, Any]:
@@ -891,6 +898,7 @@ class Exchange:
self,
trading_mode: TradingMode,
margin_mode: MarginMode | None, # Only None when trading_mode = TradingMode.SPOT
allow_none_margin_mode: bool = False,
):
"""
Checks if freqtrade can perform trades using the configured
@@ -898,7 +906,18 @@ class Exchange:
Throws OperationalException:
If the trading_mode/margin_mode type are not supported by freqtrade on this exchange
"""
if trading_mode != TradingMode.SPOT and (
if trading_mode == TradingMode.SPOT:
return
if allow_none_margin_mode and margin_mode is None:
# Verify trading mode independent of margin mode
if not any(
trading_mode == pair[0] for pair in self._supported_trading_mode_margin_pairs
):
raise ConfigurationError(
f"Freqtrade does not support '{trading_mode}' on {self.name}."
)
if not allow_none_margin_mode and (
(trading_mode, margin_mode) not in self._supported_trading_mode_margin_pairs
):
mm_value = margin_mode and margin_mode.value
@@ -1101,6 +1120,7 @@ class Exchange:
leverage: float,
params: dict | None = None,
stop_loss: bool = False,
stop_price: float | None = None,
) -> CcxtOrder:
now = dt_now()
order_id = f"dry_run_{side}_{pair}_{now.timestamp()}"
@@ -1127,7 +1147,7 @@ class Exchange:
}
if stop_loss:
dry_order["info"] = {"stopPrice": dry_order["price"]}
dry_order[self._ft_has["stop_price_prop"]] = dry_order["price"]
dry_order[self._ft_has["stop_price_prop"]] = stop_price or dry_order["price"]
# Workaround to avoid filling stoploss orders immediately
dry_order["ft_order_type"] = "stoploss"
orderbook: OrderBook | None = None
@@ -1145,7 +1165,11 @@ class Exchange:
if dry_order["type"] == "market" and not dry_order.get("ft_order_type"):
# Update market order pricing
average = self.get_dry_market_fill_price(pair, side, amount, rate, orderbook)
slippage = 0.05
worst_rate = rate * ((1 + slippage) if side == "buy" else (1 - slippage))
average = self.get_dry_market_fill_price(
pair, side, amount, rate, worst_rate, orderbook
)
dry_order.update(
{
"average": average,
@@ -1185,7 +1209,13 @@ class Exchange:
return dry_order
def get_dry_market_fill_price(
self, pair: str, side: str, amount: float, rate: float, orderbook: OrderBook | None
self,
pair: str,
side: str,
amount: float,
rate: float,
worst_rate: float,
orderbook: OrderBook | None,
) -> float:
"""
Get the market order fill price based on orderbook interpolation
@@ -1194,8 +1224,6 @@ class Exchange:
if not orderbook:
orderbook = self.fetch_l2_order_book(pair, 20)
ob_type: OBLiteral = "asks" if side == "buy" else "bids"
slippage = 0.05
max_slippage_val = rate * ((1 + slippage) if side == "buy" else (1 - slippage))
remaining_amount = amount
filled_value = 0.0
@@ -1219,11 +1247,10 @@ class Exchange:
forecast_avg_filled_price = max(filled_value, 0) / amount
# Limit max. slippage to specified value
if side == "buy":
forecast_avg_filled_price = min(forecast_avg_filled_price, max_slippage_val)
forecast_avg_filled_price = min(forecast_avg_filled_price, worst_rate)
else:
forecast_avg_filled_price = max(forecast_avg_filled_price, max_slippage_val)
forecast_avg_filled_price = max(forecast_avg_filled_price, worst_rate)
return self.price_to_precision(pair, forecast_avg_filled_price)
return rate
@@ -1235,13 +1262,15 @@ class Exchange:
limit: float,
orderbook: OrderBook | None = None,
offset: float = 0.0,
is_stop: bool = False,
) -> bool:
if not self.exchange_has("fetchL2OrderBook"):
return True
# True unless checking a stoploss order
return not is_stop
if not orderbook:
orderbook = self.fetch_l2_order_book(pair, 1)
try:
if side == "buy":
if (side == "buy" and not is_stop) or (side == "sell" and is_stop):
price = orderbook["asks"][0][0]
if limit * (1 - offset) >= price:
return True
@@ -1260,6 +1289,38 @@ class Exchange:
"""
Check dry-run limit order fill and update fee (if it filled).
"""
if order["status"] != "closed" and order.get("ft_order_type") == "stoploss":
pair = order["symbol"]
if not orderbook and self.exchange_has("fetchL2OrderBook"):
orderbook = self.fetch_l2_order_book(pair, 20)
price = safe_value_fallback(order, self._ft_has["stop_price_prop"], "price")
crossed = self._dry_is_price_crossed(
pair, order["side"], price, orderbook, is_stop=True
)
if crossed:
average = self.get_dry_market_fill_price(
pair,
order["side"],
order["amount"],
price,
worst_rate=order["price"],
orderbook=orderbook,
)
order.update(
{
"status": "closed",
"filled": order["amount"],
"remaining": 0,
"average": average,
"cost": order["amount"] * average,
}
)
self.add_dry_order_fee(
pair,
order,
"taker" if immediate else "maker",
)
return order
if (
order["status"] != "closed"
and order["type"] in ["limit"]
@@ -1283,7 +1344,7 @@ class Exchange:
return order
def fetch_dry_run_order(self, order_id) -> CcxtOrder:
def fetch_dry_run_order(self, order_id: str) -> CcxtOrder:
"""
Return dry-run order
Only call if running in dry-run mode.
@@ -1295,11 +1356,12 @@ class Exchange:
except KeyError as e:
from freqtrade.persistence import Order
order = Order.order_by_id(order_id)
if order:
ccxt_order = order.to_ccxt_object(self._ft_has["stop_price_prop"])
self._dry_run_open_orders[order_id] = ccxt_order
return ccxt_order
order_obj = Order.order_by_id(order_id)
if order_obj:
order = order_obj.to_ccxt_object(self._ft_has["stop_price_prop"])
order = self.check_dry_limit_order_filled(order)
self._dry_run_open_orders[order_id] = order
return order
# Gracefully handle errors with dry-run orders.
raise InvalidOrderException(
f"Tried to get an invalid dry-run-order (id: {order_id}). Message: {e}"
@@ -1498,8 +1560,9 @@ class Exchange:
ordertype,
side,
amount,
stop_price_norm,
limit_rate or stop_price_norm,
stop_loss=True,
stop_price=stop_price_norm,
leverage=leverage,
)
return dry_order
@@ -1750,7 +1813,7 @@ class Exchange:
balances.pop("total", None)
balances.pop("used", None)
self._log_exchange_response("fetch_balances", balances)
self._log_exchange_response("fetch_balance", balances)
return balances
except ccxt.DDoSProtection as e:
raise DDosProtection(e) from e
@@ -2143,7 +2206,9 @@ class Exchange:
name = side.capitalize()
strat_name = "entry_pricing" if side == "entry" else "exit_pricing"
cache_rate: TTLCache = self._entry_rate_cache if side == "entry" else self._exit_rate_cache
cache_rate: FtTTLCache = (
self._entry_rate_cache if side == "entry" else self._exit_rate_cache
)
if not refresh:
with self._cache_lock:
rate = cache_rate.get(pair)
@@ -2625,24 +2690,25 @@ class Exchange:
input_coroutines: list[Coroutine[Any, Any, OHLCVResponse]] = []
cached_pairs = []
for pair, timeframe, candle_type in set(pair_list):
invalid_funding = (
candle_type == CandleType.FUNDING_RATE
and timeframe != self.get_option("funding_fee_timeframe")
)
if candle_type == CandleType.FUNDING_RATE and timeframe != (
ff_tf := self.get_option("funding_fee_timeframe")
):
# TODO: does this message make sense? would docs be better?
# if any, this should be cached to avoid log spam!
logger.warning(
f"Wrong funding rate timeframe {timeframe} for pair {pair}, "
f"downloading {ff_tf} instead."
)
timeframe = ff_tf
invalid_timeframe = timeframe not in self.timeframes and candle_type in (
CandleType.SPOT,
CandleType.FUTURES,
)
if invalid_timeframe or invalid_funding:
timeframes_ = (
", ".join(self.timeframes)
if candle_type != CandleType.FUNDING_RATE
else self.get_option("funding_fee_timeframe")
)
if invalid_timeframe:
logger.warning(
f"Cannot download ({pair}, {timeframe}, {candle_type}) combination as this "
f"timeframe is not available on {self.name}. Available timeframes are "
f"{timeframes_}."
f"{', '.join(self.timeframes)}."
)
continue
@@ -2679,7 +2745,11 @@ class Exchange:
has_cache = cache and (pair, timeframe, c_type) in self._klines
# in case of existing cache, fill_missing happens after concatenation
ohlcv_df = ohlcv_to_dataframe(
ticks, timeframe, pair=pair, fill_missing=not has_cache, drop_incomplete=drop_incomplete
ticks,
timeframe,
pair=pair,
fill_missing=not has_cache and c_type != CandleType.FUNDING_RATE,
drop_incomplete=drop_incomplete,
)
# keeping parsed dataframe in cache
if cache:
@@ -2690,7 +2760,7 @@ class Exchange:
concat([old, ohlcv_df], axis=0),
timeframe,
pair,
fill_missing=True,
fill_missing=c_type != CandleType.FUNDING_RATE,
drop_incomplete=False,
)
candle_limit = self.ohlcv_candle_limit(timeframe, self._config["candle_type_def"])
@@ -2825,9 +2895,10 @@ class Exchange:
timeframe, candle_type=candle_type, since_ms=since_ms
)
if candle_type and candle_type not in (CandleType.SPOT, CandleType.FUTURES):
params.update({"price": candle_type.value})
if candle_type != CandleType.FUNDING_RATE:
if candle_type and candle_type not in (CandleType.SPOT, CandleType.FUTURES):
self.verify_candle_type_support(candle_type)
params.update({"price": str(candle_type)})
data = await self._api_async.fetch_ohlcv(
pair, timeframe=timeframe, since=since_ms, limit=candle_limit, params=params
)
@@ -2892,6 +2963,38 @@ class Exchange:
data = [[x["timestamp"], x["fundingRate"], 0, 0, 0, 0] for x in data]
return data
def check_candle_type_support(self, candle_type: CandleType) -> bool:
"""
Check that the exchange supports the given candle type.
:param candle_type: CandleType to verify
:return: True if supported, False otherwise
"""
if candle_type == CandleType.FUNDING_RATE:
if not self.exchange_has("fetchFundingRateHistory"):
return False
elif candle_type not in (CandleType.SPOT, CandleType.FUTURES):
mapping = {
CandleType.MARK: "fetchMarkOHLCV",
CandleType.INDEX: "fetchIndexOHLCV",
CandleType.PREMIUMINDEX: "fetchPremiumIndexOHLCV",
CandleType.FUNDING_RATE: "fetchFundingRateHistory",
}
_method = mapping.get(candle_type, "fetchOHLCV")
if not self.exchange_has(_method):
return False
return True
def verify_candle_type_support(self, candle_type: CandleType) -> None:
"""
Verify that the exchange supports the given candle type.
:param candle_type: CandleType to verify
:raises OperationalException: if the candle type is not supported
"""
if not self.check_candle_type_support(candle_type):
raise OperationalException(
f"Exchange {self._api.name} does not support fetching {candle_type} candles."
)
# fetch Trade data stuff
def needed_candle_for_trades_ms(self, timeframe: str, candle_type: CandleType) -> int:
@@ -3719,10 +3822,11 @@ class Exchange:
:param mark_rates: Dataframe containing Mark rates (Type mark_ohlcv_price)
:param futures_funding_rate: Fake funding rate to use if funding_rates are not available
"""
relevant_cols = ["date", "open_mark", "open_fund"]
if futures_funding_rate is None:
return mark_rates.merge(
funding_rates, on="date", how="inner", suffixes=["_mark", "_fund"]
)
)[relevant_cols]
else:
if len(funding_rates) == 0:
# No funding rate candles - full fillup with fallback variable
@@ -3735,15 +3839,23 @@ class Exchange:
"low": "low_mark",
"volume": "volume_mark",
}
)
)[relevant_cols]
else:
# Fill up missing funding_rate candles with fallback value
combined = mark_rates.merge(
funding_rates, on="date", how="left", suffixes=["_mark", "_fund"]
)
combined["open_fund"] = combined["open_fund"].fillna(futures_funding_rate)
return combined
# Fill only leading missing funding rates so gaps stay untouched
first_valid_idx = combined["open_fund"].first_valid_index()
if first_valid_idx is None:
combined["open_fund"] = futures_funding_rate
else:
is_leading_na = (combined.index <= first_valid_idx) & combined[
"open_fund"
].isna()
combined.loc[is_leading_na, "open_fund"] = futures_funding_rate
return combined[relevant_cols].dropna()
def calculate_funding_fees(
self,

View File

@@ -3,6 +3,7 @@
import logging
from copy import deepcopy
from datetime import datetime
from typing import Any
from freqtrade.constants import BuySell
from freqtrade.enums import MarginMode, TradingMode
@@ -36,9 +37,9 @@ class Hyperliquid(Exchange):
"stoploss_order_types": {"limit": "limit"},
"stoploss_blocks_assets": False,
"stop_price_prop": "stopPrice",
"funding_fee_timeframe": "1h",
"funding_fee_candle_limit": 500,
"uses_leverage_tiers": False,
"mark_ohlcv_price": "futures",
}
_supported_trading_mode_margin_pairs: list[tuple[TradingMode, MarginMode]] = [
@@ -56,6 +57,13 @@ class Hyperliquid(Exchange):
config.update(super()._ccxt_config)
return config
def market_is_tradable(self, market: dict[str, Any]) -> bool:
parent_check = super().market_is_tradable(market)
# Exclude hip3 markets for now - which have the format XYZ:GOOGL/USDT:USDT -
# and XYZ:GOOGL as base
return parent_check and ":" not in market["base"]
def get_max_leverage(self, pair: str, stake_amount: float | None) -> float:
# There are no leverage tiers
if self.trading_mode == TradingMode.FUTURES:

View File

@@ -35,7 +35,6 @@ class Kraken(Exchange):
"trades_pagination_arg": "since",
"trades_pagination_overlap": False,
"trades_has_history": True,
"mark_ohlcv_timeframe": "4h",
}
_supported_trading_mode_margin_pairs: list[tuple[TradingMode, MarginMode]] = [
@@ -82,7 +81,7 @@ class Kraken(Exchange):
balances.pop("free", None)
balances.pop("total", None)
balances.pop("used", None)
self._log_exchange_response("fetch_balances", balances)
self._log_exchange_response("fetch_balance", balances)
# Consolidate balances
balances = self.consolidate_balances(balances)
@@ -104,7 +103,7 @@ class Kraken(Exchange):
balances[bal]["used"] = sum(order[1] for order in order_list if order[0] == bal)
balances[bal]["free"] = balances[bal]["total"] - balances[bal]["used"]
self._log_exchange_response("fetch_balances2", balances)
self._log_exchange_response("fetch_balance2", balances)
return balances
except ccxt.DDoSProtection as e:
raise DDosProtection(e) from e

View File

@@ -29,8 +29,6 @@ class Okx(Exchange):
_ft_has: FtHas = {
"ohlcv_candle_limit": 100, # Warning, special case with data prior to X months
"mark_ohlcv_timeframe": "4h",
"funding_fee_timeframe": "8h",
"stoploss_order_types": {"limit": "limit"},
"stoploss_on_exchange": True,
"trades_has_history": False, # Endpoint doesn't have a "since" parameter
@@ -41,8 +39,8 @@ class Okx(Exchange):
"stop_price_type_field": "slTriggerPxType",
"stop_price_type_value_mapping": {
PriceType.LAST: "last",
PriceType.MARK: "index",
PriceType.INDEX: "mark",
PriceType.MARK: "mark",
PriceType.INDEX: "index",
},
"stoploss_blocks_assets": False,
"ws_enabled": True,

View File

@@ -1,5 +1,5 @@
"""
Freqtrade is the main module of this bot. It contains the class Freqtrade()
Freqtrade is the main module of this bot. It contains the FreqtradeBot class.
"""
import logging
@@ -63,7 +63,7 @@ from freqtrade.rpc.rpc_types import (
from freqtrade.strategy.interface import IStrategy
from freqtrade.strategy.strategy_wrapper import strategy_safe_wrapper
from freqtrade.util import FtPrecise, MeasureTime, PeriodicCache, dt_from_ts, dt_now
from freqtrade.util.migrations.binance_mig import migrate_binance_futures_names
from freqtrade.util.migrations import migrate_live_content
from freqtrade.wallets import Wallets
@@ -229,7 +229,7 @@ class FreqtradeBot(LoggingMixin):
Called on startup and after reloading the bot - triggers notifications and
performs startup tasks
"""
migrate_binance_futures_names(self.config)
migrate_live_content(self.config, self.exchange)
set_startup_time()
self.rpc.startup_messages(self.config, self.pairlists, self.protections)
@@ -1063,7 +1063,16 @@ class FreqtradeBot(LoggingMixin):
return True
def cancel_stoploss_on_exchange(self, trade: Trade) -> Trade:
def cancel_stoploss_on_exchange(self, trade: Trade, allow_nonblocking: bool = False) -> Trade:
"""
Cancels on exchange stoploss orders for the given trade.
:param trade: Trade for which to cancel stoploss order
:param allow_nonblocking: If True, will skip cancelling stoploss on exchange
if the exchange supports blocking stoploss orders.
"""
if allow_nonblocking and not self.exchange.get_option("stoploss_blocks_assets", True):
logger.info(f"Skipping cancelling stoploss on exchange for {trade}.")
return trade
# First cancelling stoploss on exchange ...
for oslo in trade.open_sl_orders:
try:
@@ -2088,7 +2097,7 @@ class FreqtradeBot(LoggingMixin):
limit = self.get_valid_price(custom_exit_price, proposed_limit_rate)
# First cancelling stoploss on exchange ...
trade = self.cancel_stoploss_on_exchange(trade)
trade = self.cancel_stoploss_on_exchange(trade, allow_nonblocking=True)
order_type = ordertype or self.strategy.order_types[exit_type]
if exit_check.exit_type == ExitType.EMERGENCY_EXIT:
@@ -2378,6 +2387,8 @@ class FreqtradeBot(LoggingMixin):
self.strategy.ft_stoploss_adjust(
current_rate, trade, datetime.now(UTC), profit, 0, after_fill=True
)
if not trade.is_open:
self.cancel_stoploss_on_exchange(trade)
# Updating wallets when order is closed
self.wallets.update()
return trade

View File

@@ -1,6 +1,8 @@
from collections.abc import Callable
from cachetools import TTLCache, cached
from cachetools import cached
from freqtrade.util import FtTTLCache
class LoggingMixin:
@@ -18,7 +20,7 @@ class LoggingMixin:
"""
self.logger = logger
self.refresh_period = refresh_period
self._log_cache: TTLCache = TTLCache(maxsize=1024, ttl=self.refresh_period)
self._log_cache: FtTTLCache = FtTTLCache(maxsize=1024, ttl=self.refresh_period)
def log_once(self, message: str, logmethod: Callable, force_show: bool = False) -> None:
"""

View File

@@ -39,6 +39,7 @@ class RecursiveAnalysis(BaseAnalysis):
self.dict_recursive: dict[str, Any] = dict()
self.pair_to_used: str | None = None
self._strat_scc: int | None = None
# For recursive bias check
# analyzes two data frames with processed indicators and shows differences between them.
@@ -151,7 +152,8 @@ class RecursiveAnalysis(BaseAnalysis):
backtesting._set_strategy(backtesting.strategylist[0])
strat = backtesting.strategy
self._strat_scc = strat.startup_candle_count
if self._strat_scc is None:
self._strat_scc = strat.startup_candle_count
if self._strat_scc < 1:
raise ConfigurationError(

View File

@@ -126,6 +126,7 @@ class Backtesting:
self.config["dry_run"] = True
self.price_pair_prec: dict[str, Series] = {}
self.available_pairs: list[str] = []
self.run_ids: dict[str, str] = {}
self.strategylist: list[IStrategy] = []
self.all_bt_content: dict[str, BacktestContentType] = {}
@@ -176,7 +177,8 @@ class Backtesting:
self._validate_pairlists_for_backtesting()
self.dataprovider.add_pairlisthandler(self.pairlists)
self.pairlists.refresh_pairlist()
self.dynamic_pairlist: bool = self.config.get("enable_dynamic_pairlist", False)
self.pairlists.refresh_pairlist(only_first=self.dynamic_pairlist)
if len(self.pairlists.whitelist) == 0:
raise OperationalException("No pair in whitelist.")
@@ -211,7 +213,6 @@ class Backtesting:
self._can_short = self.trading_mode != TradingMode.SPOT
self._position_stacking: bool = self.config.get("position_stacking", False)
self.enable_protections: bool = self.config.get("enable_protections", False)
self.dynamic_pairlist: bool = self.config.get("enable_dynamic_pairlist", False)
migrate_data(config, self.exchange)
self.init_backtest()
@@ -335,10 +336,12 @@ class Backtesting:
self.progress.set_new_value(1)
self._load_bt_data_detail()
self.price_pair_prec = {}
for pair in self.pairlists.whitelist:
if pair in data:
# Load price precision logic
self.price_pair_prec[pair] = get_tick_size_over_time(data[pair])
self.available_pairs.append(pair)
return data, self.timerange
def _load_bt_data_detail(self) -> None:
@@ -371,6 +374,7 @@ class Backtesting:
timerange=self.timerange,
startup_candles=0,
fail_without_data=True,
fill_up_missing=False,
data_format=self.config["dataformat_ohlcv"],
candle_type=CandleType.FUNDING_RATE,
)
@@ -1587,7 +1591,7 @@ class Backtesting:
self.check_abort()
if self.dynamic_pairlist and self.pairlists:
self.pairlists.refresh_pairlist()
self.pairlists.refresh_pairlist(pairs=self.available_pairs)
pairs = self.pairlists.whitelist
# Reset open trade count for this candle

View File

@@ -7,6 +7,7 @@ This module implements a convenience auto-hyperopt class, which can be used toge
import logging
from collections.abc import Callable
from contextlib import suppress
from typing import Literal
from freqtrade.exceptions import OperationalException
@@ -37,10 +38,17 @@ def _format_exception_message(space: str, ignore_missing_space: bool) -> None:
class HyperOptAuto(IHyperOpt):
"""
This class delegates functionality to Strategy(IHyperStrategy) and Strategy.HyperOpt classes.
Most of the time Strategy.HyperOpt class would only implement indicator_space and
sell_indicator_space methods, but other hyperopt methods can be overridden as well.
Most of the time Strategy.HyperOpt class would only implement indicator_space and
sell_indicator_space methods, but other hyperopt methods can be overridden as well.
"""
def get_available_spaces(self) -> list[str]:
"""
Get list of available spaces defined in strategy.
:return: list of available spaces.
"""
return list(self.strategy._ft_hyper_params)
def _get_func(self, name) -> Callable:
"""
Return a function defined in Strategy.HyperOpt class, or one defined in super() class.
@@ -54,31 +62,26 @@ class HyperOptAuto(IHyperOpt):
else:
return default_func
def _generate_indicator_space(self, category):
for attr_name, attr in self.strategy.enumerate_parameters(category):
if attr.optimize:
yield attr.get_space(attr_name)
def _get_indicator_space(self, category) -> list:
# TODO: is this necessary, or can we call "generate_space" directly?
indicator_space = list(self._generate_indicator_space(category))
def get_indicator_space(
self, space: Literal["buy", "sell", "enter", "exit", "protection"] | str
) -> list:
"""
Get indicator space for a given space.
:param space: parameter space to get.
"""
indicator_space = [
attr.get_space(attr_name)
for attr_name, attr in self.strategy.enumerate_parameters(space)
if attr.optimize
]
if len(indicator_space) > 0:
return indicator_space
else:
_format_exception_message(
category, self.config.get("hyperopt_ignore_missing_space", False)
space, self.config.get("hyperopt_ignore_missing_space", False)
)
return []
def buy_indicator_space(self) -> list["Dimension"]:
return self._get_indicator_space("buy")
def sell_indicator_space(self) -> list["Dimension"]:
return self._get_indicator_space("sell")
def protection_space(self) -> list["Dimension"]:
return self._get_indicator_space("protection")
def generate_roi_table(self, params: dict) -> dict[int, float]:
return self._get_func("generate_roi_table")(params)

View File

@@ -70,13 +70,7 @@ class HyperOptimizer:
"""
def __init__(self, config: Config, data_pickle_file: Path) -> None:
self.buy_space: list[DimensionProtocol] = []
self.sell_space: list[DimensionProtocol] = []
self.protection_space: list[DimensionProtocol] = []
self.roi_space: list[DimensionProtocol] = []
self.stoploss_space: list[DimensionProtocol] = []
self.trailing_space: list[DimensionProtocol] = []
self.max_open_trades_space: list[DimensionProtocol] = []
self.spaces: dict[str, list[DimensionProtocol]] = {}
self.dimensions: list[DimensionProtocol] = []
self.o_dimensions: dict = {}
@@ -167,37 +161,39 @@ class HyperOptimizer:
"""
result: dict = {}
if HyperoptTools.has_space(self.config, "buy"):
result["buy"] = round_dict({p.name: params.get(p.name) for p in self.buy_space}, 13)
if HyperoptTools.has_space(self.config, "sell"):
result["sell"] = round_dict({p.name: params.get(p.name) for p in self.sell_space}, 13)
if HyperoptTools.has_space(self.config, "protection"):
result["protection"] = round_dict(
{p.name: params.get(p.name) for p in self.protection_space}, 13
)
if HyperoptTools.has_space(self.config, "roi"):
result["roi"] = round_dict(
{str(k): v for k, v in self.custom_hyperopt.generate_roi_table(params).items()}, 13
)
if HyperoptTools.has_space(self.config, "stoploss"):
result["stoploss"] = round_dict(
{p.name: params.get(p.name) for p in self.stoploss_space}, 13
)
if HyperoptTools.has_space(self.config, "trailing"):
result["trailing"] = round_dict(
self.custom_hyperopt.generate_trailing_params(params), 13
)
if HyperoptTools.has_space(self.config, "trades"):
result["max_open_trades"] = round_dict(
{
"max_open_trades": (
self.backtesting.strategy.max_open_trades
if self.backtesting.strategy.max_open_trades != float("inf")
else -1
)
},
13,
)
for space in self.spaces.keys():
if space == "protection":
result["protection"] = round_dict(
{p.name: params.get(p.name) for p in self.spaces[space]}, 13
)
elif space == "roi":
result["roi"] = round_dict(
{str(k): v for k, v in self.custom_hyperopt.generate_roi_table(params).items()},
13,
)
elif space == "stoploss":
result["stoploss"] = round_dict(
{p.name: params.get(p.name) for p in self.spaces[space]}, 13
)
elif space == "trailing":
result["trailing"] = round_dict(
self.custom_hyperopt.generate_trailing_params(params), 13
)
elif space == "trades":
result["max_open_trades"] = round_dict(
{
"max_open_trades": (
self.backtesting.strategy.max_open_trades
if self.backtesting.strategy.max_open_trades != float("inf")
else -1
)
},
13,
)
else:
result[space] = round_dict(
{p.name: params.get(p.name) for p in self.spaces[space]}, 13
)
return result
@@ -226,56 +222,39 @@ class HyperOptimizer:
"""
Assign the dimensions in the hyperoptimization space.
"""
if HyperoptTools.has_space(self.config, "protection"):
# Protections can only be optimized when using the Parameter interface
logger.debug("Hyperopt has 'protection' space")
# Enable Protections if protection space is selected.
self.config["enable_protections"] = True
self.backtesting.enable_protections = True
self.protection_space = self.custom_hyperopt.protection_space()
spaces = ["buy", "sell", "protection", "roi", "stoploss", "trailing", "trades"]
spaces += [s for s in self.custom_hyperopt.get_available_spaces() if s not in spaces]
if HyperoptTools.has_space(self.config, "buy"):
logger.debug("Hyperopt has 'buy' space")
self.buy_space = self.custom_hyperopt.buy_indicator_space()
for space in spaces:
if not HyperoptTools.has_space(self.config, space):
continue
logger.debug(f"Hyperopt has '{space}' space")
if space == "protection":
# Protections can only be optimized when using the Parameter interface
# Enable Protections if protection space is selected.
self.config["enable_protections"] = True
self.backtesting.enable_protections = True
self.spaces[space] = self.custom_hyperopt.get_indicator_space(space)
elif space == "roi":
self.spaces[space] = self.custom_hyperopt.roi_space()
elif space == "stoploss":
self.spaces[space] = self.custom_hyperopt.stoploss_space()
elif space == "trailing":
self.spaces[space] = self.custom_hyperopt.trailing_space()
elif space == "trades":
self.spaces[space] = self.custom_hyperopt.max_open_trades_space()
else:
self.spaces[space] = self.custom_hyperopt.get_indicator_space(space)
if HyperoptTools.has_space(self.config, "sell"):
logger.debug("Hyperopt has 'sell' space")
self.sell_space = self.custom_hyperopt.sell_indicator_space()
if HyperoptTools.has_space(self.config, "roi"):
logger.debug("Hyperopt has 'roi' space")
self.roi_space = self.custom_hyperopt.roi_space()
if HyperoptTools.has_space(self.config, "stoploss"):
logger.debug("Hyperopt has 'stoploss' space")
self.stoploss_space = self.custom_hyperopt.stoploss_space()
if HyperoptTools.has_space(self.config, "trailing"):
logger.debug("Hyperopt has 'trailing' space")
self.trailing_space = self.custom_hyperopt.trailing_space()
if HyperoptTools.has_space(self.config, "trades"):
logger.debug("Hyperopt has 'trades' space")
self.max_open_trades_space = self.custom_hyperopt.max_open_trades_space()
self.dimensions = (
self.buy_space
+ self.sell_space
+ self.protection_space
+ self.roi_space
+ self.stoploss_space
+ self.trailing_space
+ self.max_open_trades_space
)
def assign_params(self, params_dict: dict[str, Any], category: str) -> None:
"""
Assign hyperoptable parameters
"""
for attr_name, attr in self.backtesting.strategy.enumerate_parameters(category):
if attr.optimize:
# noinspection PyProtectedMember
attr.value = params_dict[attr_name]
self.dimensions = [s for space in self.spaces.values() for s in space]
if len(self.dimensions) == 0:
raise OperationalException(
"No hyperopt parameters found to optimize."
f"Available spaces: {', '.join(spaces)}. "
"Check your strategy's parameter definitions or verify the configured spaces "
"in your command."
)
self.o_dimensions = self.convert_dimensions_to_optuna_space(self.dimensions)
@delayed
@wrap_non_picklable_objects
@@ -292,15 +271,9 @@ class HyperOptimizer:
HyperoptStateContainer.set_state(HyperoptState.OPTIMIZE)
backtest_start_time = datetime.now(UTC)
# Apply parameters
if HyperoptTools.has_space(self.config, "buy"):
self.assign_params(params_dict, "buy")
if HyperoptTools.has_space(self.config, "sell"):
self.assign_params(params_dict, "sell")
if HyperoptTools.has_space(self.config, "protection"):
self.assign_params(params_dict, "protection")
for attr_name, attr in self.backtesting.strategy.enumerate_parameters():
if attr.in_space and attr.optimize:
attr.value = params_dict[attr_name]
if HyperoptTools.has_space(self.config, "roi"):
self.backtesting.strategy.minimal_roi = self.custom_hyperopt.generate_roi_table(
@@ -436,7 +409,6 @@ class HyperOptimizer:
o_sampler = self.custom_hyperopt.generate_estimator(
dimensions=self.dimensions, random_state=random_state
)
self.o_dimensions = self.convert_dimensions_to_optuna_space(self.dimensions)
if isinstance(o_sampler, str):
if o_sampler not in optuna_samplers_dict.keys():

View File

@@ -9,7 +9,7 @@ import numpy as np
import rapidjson
from pandas import isna, json_normalize
from freqtrade.constants import FTHYPT_FILEVERSION, Config
from freqtrade.constants import FTHYPT_FILEVERSION, HYPEROPT_BUILTIN_SPACES, Config
from freqtrade.enums import HyperoptState
from freqtrade.exceptions import OperationalException
from freqtrade.misc import deep_merge_dicts, round_dict, safe_value_fallback2
@@ -219,21 +219,22 @@ class HyperoptTools:
print(rapidjson.dumps(result_dict, default=str, number_mode=HYPER_PARAMS_FILE_FORMAT))
else:
HyperoptTools._params_pretty_print(
params, "buy", "Buy hyperspace params:", non_optimized
)
HyperoptTools._params_pretty_print(
params, "sell", "Sell hyperspace params:", non_optimized
)
HyperoptTools._params_pretty_print(
params, "protection", "Protection hyperspace params:", non_optimized
)
HyperoptTools._params_pretty_print(params, "roi", "ROI table:", non_optimized)
HyperoptTools._params_pretty_print(params, "stoploss", "Stoploss:", non_optimized)
HyperoptTools._params_pretty_print(params, "trailing", "Trailing stop:", non_optimized)
HyperoptTools._params_pretty_print(
params, "max_open_trades", "Max Open Trades:", non_optimized
)
all_spaces = list(params.keys() | non_optimized.keys())
# Explicitly listed to keep original sort order
spaces = ["buy", "sell", "protection", "roi", "stoploss", "trailing", "max_open_trades"]
spaces += [s for s in all_spaces if s not in spaces]
lookup = {
"roi": "ROI",
"trailing": "Trailing stop",
}
for space in spaces:
name = lookup.get(
space, space.capitalize() if space in HYPEROPT_BUILTIN_SPACES else space
)
HyperoptTools._params_pretty_print(
params, space, f"{name} parameters:", non_optimized
)
@staticmethod
def _params_update_for_json(result_dict, params, non_optimized, space: str) -> None:

View File

@@ -48,7 +48,7 @@ from freqtrade.leverage import interest
from freqtrade.misc import safe_value_fallback
from freqtrade.persistence.base import ModelBase, SessionType
from freqtrade.persistence.custom_data import CustomDataWrapper, _CustomData
from freqtrade.util import FtPrecise, dt_from_ts, dt_now, dt_ts, dt_ts_none
from freqtrade.util import FtPrecise, dt_from_ts, dt_now, dt_ts, dt_ts_none, round_value
logger = logging.getLogger(__name__)
@@ -654,9 +654,10 @@ class LocalTrade:
)
return (
f"Trade(id={self.id}, pair={self.pair}, amount={self.amount:.8f}, "
f"is_short={self.is_short or False}, leverage={self.leverage or 1.0}, "
f"open_rate={self.open_rate:.8f}, open_since={open_since})"
f"Trade(id={self.id}, pair={self.pair}, amount={round_value(self.amount, 8)}, "
f"is_short={self.is_short or False}, "
f"leverage={round_value(self.leverage or 1.0, 1)}, "
f"open_rate={round_value(self.open_rate, 8)}, open_since={open_since})"
)
def to_json(self, minified: bool = False) -> dict[str, Any]:
@@ -755,6 +756,8 @@ class LocalTrade:
"precision_mode": self.precision_mode,
"precision_mode_price": self.precision_mode_price,
"contract_size": self.contract_size,
"nr_of_successful_entries": self.nr_of_successful_entries,
"nr_of_successful_exits": self.nr_of_successful_exits,
"has_open_orders": self.has_open_orders,
"orders": orders_json,
}

View File

@@ -75,11 +75,11 @@ def init_plotscript(config, markets: list, startup_candles: int = 0):
)
no_trades = False
filename = config.get("exportfilename")
filename = config.get("exportfilename") or config.get("exportdirectory")
if config.get("no_trades", False):
no_trades = True
elif config["trade_source"] == "file":
if not filename.is_dir() and not filename.is_file():
if not filename or (not filename.is_dir() and not filename.is_file()):
logger.warning("Backtest file is missing skipping trades.")
no_trades = True
try:

View File

@@ -7,11 +7,10 @@ Provides dynamic pair list based on Market Cap
import logging
import math
from cachetools import TTLCache
from freqtrade.exceptions import OperationalException
from freqtrade.exchange.exchange_types import Tickers
from freqtrade.plugins.pairlist.IPairList import IPairList, PairlistParameter, SupportsBacktesting
from freqtrade.util import FtTTLCache
from freqtrade.util.coin_gecko import FtCoinGeckoApi
@@ -25,18 +24,20 @@ class MarketCapPairList(IPairList):
def __init__(self, *args, **kwargs) -> None:
super().__init__(*args, **kwargs)
if "number_assets" not in self._pairlistconfig:
self._mode = self._pairlistconfig.get("mode", "whitelist")
if (self._mode == "whitelist") and ("number_assets" not in self._pairlistconfig):
raise OperationalException(
"`number_assets` not specified. Please check your configuration "
'for "pairlist.config.number_assets"'
)
self._stake_currency = self._config["stake_currency"]
self._number_assets = self._pairlistconfig["number_assets"]
self._number_assets = self._pairlistconfig.get("number_assets", 30)
self._max_rank = self._pairlistconfig.get("max_rank", 30)
self._refresh_period = self._pairlistconfig.get("refresh_period", 86400)
self._categories = self._pairlistconfig.get("categories", [])
self._marketcap_cache: TTLCache = TTLCache(maxsize=1, ttl=self._refresh_period)
self._marketcap_cache: FtTTLCache = FtTTLCache(maxsize=1, ttl=self._refresh_period)
_coingecko_config = self._config.get("coingecko", {})
@@ -78,7 +79,9 @@ class MarketCapPairList(IPairList):
"""
num = self._number_assets
rank = self._max_rank
msg = f"{self.name} - {num} pairs placed within top {rank} market cap."
mode = self._mode
pair_text = num if (mode == "whitelist") else "blacklisting"
msg = f"{self.name} - {pair_text} pairs placed within top {rank} market cap."
return msg
@staticmethod
@@ -115,6 +118,13 @@ class MarketCapPairList(IPairList):
"description": "Refresh period",
"help": "Refresh period in seconds",
},
"mode": {
"type": "option",
"default": "whitelist",
"options": ["whitelist", "blacklist"],
"description": "Mode of operation",
"help": "Mode of operation (whitelist/blacklist)",
},
}
def get_markets_exchange(self):
@@ -186,6 +196,9 @@ class MarketCapPairList(IPairList):
:return: new whitelist
"""
marketcap_list = self._marketcap_cache.get("marketcap")
mode = self._mode
is_whitelist_mode = mode == "whitelist"
filtered_pairlist: list[str] = []
default_kwargs = {
"vs_currency": "usd",
@@ -219,12 +232,10 @@ class MarketCapPairList(IPairList):
self._marketcap_cache["marketcap"] = marketcap_list
if marketcap_list:
filtered_pairlist: list[str] = []
market = self._exchange._config["trading_mode"]
pair_format = f"{self._stake_currency.upper()}"
if market == "futures":
pair_format += f":{self._stake_currency.upper()}"
pair_format = f"{self._stake_currency.upper()}" + (
f":{self._stake_currency.upper()}" if market == "futures" else ""
)
top_marketcap = marketcap_list[: self._max_rank :]
markets = self.get_markets_exchange()
@@ -234,13 +245,16 @@ class MarketCapPairList(IPairList):
resolved = self.resolve_marketcap_pair(pair, pairlist, markets, filtered_pairlist)
if resolved:
if not is_whitelist_mode:
pairlist.remove(resolved)
continue
filtered_pairlist.append(resolved)
if len(filtered_pairlist) == self._number_assets:
break
if len(filtered_pairlist) == self._number_assets:
break
if len(filtered_pairlist) > 0:
return filtered_pairlist
if not is_whitelist_mode:
return pairlist
# If no pairs are found, return the original pairlist
return []
return filtered_pairlist

View File

@@ -10,7 +10,6 @@ import logging
from datetime import timedelta
from typing import TypedDict
from cachetools import TTLCache
from pandas import DataFrame
from freqtrade.constants import ListPairsWithTimeframes, PairWithTimeframe
@@ -18,7 +17,7 @@ from freqtrade.exceptions import OperationalException
from freqtrade.exchange import timeframe_to_minutes, timeframe_to_prev_date
from freqtrade.exchange.exchange_types import Ticker, Tickers
from freqtrade.plugins.pairlist.IPairList import IPairList, PairlistParameter, SupportsBacktesting
from freqtrade.util import dt_now, format_ms_time
from freqtrade.util import FtTTLCache, dt_now, format_ms_time
logger = logging.getLogger(__name__)
@@ -47,7 +46,7 @@ class PercentChangePairList(IPairList):
self._min_value = self._pairlistconfig.get("min_value", None)
self._max_value = self._pairlistconfig.get("max_value", None)
self._refresh_period = self._pairlistconfig.get("refresh_period", 1800)
self._pair_cache: TTLCache = TTLCache(maxsize=1, ttl=self._refresh_period)
self._pair_cache: FtTTLCache = FtTTLCache(maxsize=1, ttl=self._refresh_period)
self._lookback_days = self._pairlistconfig.get("lookback_days", 0)
self._lookback_timeframe = self._pairlistconfig.get("lookback_timeframe", "1d")
self._lookback_period = self._pairlistconfig.get("lookback_period", 0)

View File

@@ -10,7 +10,6 @@ from typing import Any
import rapidjson
import requests
from cachetools import TTLCache
from freqtrade import __version__
from freqtrade.configuration.load_config import CONFIG_PARSE_MODE
@@ -18,6 +17,7 @@ from freqtrade.exceptions import OperationalException
from freqtrade.exchange.exchange_types import Tickers
from freqtrade.plugins.pairlist.IPairList import IPairList, PairlistParameter, SupportsBacktesting
from freqtrade.plugins.pairlist.pairlist_helpers import expand_pairlist
from freqtrade.util import FtTTLCache
logger = logging.getLogger(__name__)
@@ -48,7 +48,7 @@ class RemotePairList(IPairList):
self._number_pairs = self._pairlistconfig["number_assets"]
self._refresh_period: int = self._pairlistconfig.get("refresh_period", 1800)
self._keep_pairlist_on_failure = self._pairlistconfig.get("keep_pairlist_on_failure", True)
self._pair_cache: TTLCache = TTLCache(maxsize=1, ttl=self._refresh_period)
self._pair_cache: FtTTLCache = FtTTLCache(maxsize=1, ttl=self._refresh_period)
self._pairlist_url = self._pairlistconfig.get("pairlist_url", "")
self._read_timeout = self._pairlistconfig.get("read_timeout", 60)
self._bearer_token = self._pairlistconfig.get("bearer_token", "")
@@ -159,7 +159,7 @@ class RemotePairList(IPairList):
)
self._refresh_period = remote_refresh_period
self._pair_cache = TTLCache(maxsize=1, ttl=remote_refresh_period)
self._pair_cache = FtTTLCache(maxsize=1, ttl=remote_refresh_period)
self._init_done = True

View File

@@ -7,7 +7,6 @@ import sys
from datetime import timedelta
import numpy as np
from cachetools import TTLCache
from pandas import DataFrame
from freqtrade.constants import ListPairsWithTimeframes
@@ -15,7 +14,7 @@ from freqtrade.exceptions import OperationalException
from freqtrade.exchange.exchange_types import Tickers
from freqtrade.misc import plural
from freqtrade.plugins.pairlist.IPairList import IPairList, PairlistParameter, SupportsBacktesting
from freqtrade.util import dt_floor_day, dt_now, dt_ts
from freqtrade.util import FtTTLCache, dt_floor_day, dt_now, dt_ts
logger = logging.getLogger(__name__)
@@ -38,7 +37,7 @@ class VolatilityFilter(IPairList):
self._def_candletype = self._config["candle_type_def"]
self._sort_direction: str | None = self._pairlistconfig.get("sort_direction", None)
self._pair_cache: TTLCache = TTLCache(maxsize=1000, ttl=self._refresh_period)
self._pair_cache: FtTTLCache = FtTTLCache(maxsize=1000, ttl=self._refresh_period)
candle_limit = self._exchange.ohlcv_candle_limit("1d", self._def_candletype)
if self._days < 1:

View File

@@ -8,14 +8,12 @@ import logging
from datetime import timedelta
from typing import Any, Literal
from cachetools import TTLCache
from freqtrade.constants import ListPairsWithTimeframes
from freqtrade.exceptions import OperationalException
from freqtrade.exchange import timeframe_to_minutes, timeframe_to_prev_date
from freqtrade.exchange.exchange_types import Tickers
from freqtrade.plugins.pairlist.IPairList import IPairList, PairlistParameter, SupportsBacktesting
from freqtrade.util import dt_now, format_ms_time
from freqtrade.util import FtTTLCache, dt_now, format_ms_time
logger = logging.getLogger(__name__)
@@ -43,7 +41,7 @@ class VolumePairList(IPairList):
self._min_value = self._pairlistconfig.get("min_value", 0)
self._max_value = self._pairlistconfig.get("max_value", None)
self._refresh_period = self._pairlistconfig.get("refresh_period", 1800)
self._pair_cache: TTLCache = TTLCache(maxsize=1, ttl=self._refresh_period)
self._pair_cache: FtTTLCache = FtTTLCache(maxsize=1, ttl=self._refresh_period)
self._lookback_days = self._pairlistconfig.get("lookback_days", 0)
self._lookback_timeframe = self._pairlistconfig.get("lookback_timeframe", "1d")
self._lookback_period = self._pairlistconfig.get("lookback_period", 0)

View File

@@ -5,7 +5,6 @@ Rate of change pairlist filter
import logging
from datetime import timedelta
from cachetools import TTLCache
from pandas import DataFrame
from freqtrade.constants import ListPairsWithTimeframes
@@ -13,7 +12,7 @@ from freqtrade.exceptions import OperationalException
from freqtrade.exchange.exchange_types import Tickers
from freqtrade.misc import plural
from freqtrade.plugins.pairlist.IPairList import IPairList, PairlistParameter, SupportsBacktesting
from freqtrade.util import dt_floor_day, dt_now, dt_ts
from freqtrade.util import FtTTLCache, dt_floor_day, dt_now, dt_ts
logger = logging.getLogger(__name__)
@@ -32,7 +31,7 @@ class RangeStabilityFilter(IPairList):
self._def_candletype = self._config["candle_type_def"]
self._sort_direction: str | None = self._pairlistconfig.get("sort_direction", None)
self._pair_cache: TTLCache = TTLCache(maxsize=1000, ttl=self._refresh_period)
self._pair_cache: FtTTLCache = FtTTLCache(maxsize=1000, ttl=self._refresh_period)
candle_limit = self._exchange.ohlcv_candle_limit("1d", self._def_candletype)
if self._days < 1:

View File

@@ -5,7 +5,7 @@ PairList manager class
import logging
from functools import partial
from cachetools import LRUCache, TTLCache, cached
from cachetools import LRUCache, cached
from freqtrade.constants import Config, ListPairsWithTimeframes
from freqtrade.data.dataprovider import DataProvider
@@ -17,6 +17,7 @@ from freqtrade.mixins import LoggingMixin
from freqtrade.plugins.pairlist.IPairList import IPairList, SupportsBacktesting
from freqtrade.plugins.pairlist.pairlist_helpers import expand_pairlist
from freqtrade.resolvers import PairListResolver
from freqtrade.util import FtTTLCache
logger = logging.getLogger(__name__)
@@ -129,12 +130,24 @@ class PairListManager(LoggingMixin):
"""List of short_desc for each Pairlist Handler"""
return [{p.name: p.short_desc()} for p in self._pairlist_handlers]
@cached(TTLCache(maxsize=1, ttl=1800))
@cached(FtTTLCache(maxsize=1, ttl=1800))
def _get_cached_tickers(self) -> Tickers:
return self._exchange.get_tickers()
def refresh_pairlist(self) -> None:
"""Run pairlist through all configured Pairlist Handlers."""
def refresh_pairlist(self, only_first: bool = False, pairs: list[str] | None = None) -> None:
"""
Run pairlist through all configured Pairlist Handlers.
:param only_first: If True, only run the first PairList handler (the generator)
and skip all subsequent filters. Used during backtesting startup to ensure
historic data is loaded for the complete universe of pairs that the
generator can produce (even if later filters would reduce the list size).
Prevents missing data when a filter returns a variable number of pairs
across refresh cycles.
:param pairs: Optional list of pairs to intersect with the generated pairlist.
Only pairs present both in the generated list and this parameter are kept.
Used in backtesting to filter out pairs with no available data.
"""
# Tickers should be cached to avoid calling the exchange on each call.
tickers: dict = {}
if self._tickers_needed:
@@ -143,10 +156,15 @@ class PairListManager(LoggingMixin):
# Generate the pairlist with first Pairlist Handler in the chain
pairlist = self._pairlist_handlers[0].gen_pairlist(tickers)
# Process all Pairlist Handlers in the chain
# except for the first one, which is the generator.
for pairlist_handler in self._pairlist_handlers[1:]:
pairlist = pairlist_handler.filter_pairlist(pairlist, tickers)
# Optional intersection with an explicit list of pairs (used in backtesting)
if pairs is not None:
pairlist = [p for p in pairlist if p in pairs]
if not only_first:
# Process all Pairlist Handlers in the chain
# except for the first one, which is the generator.
for pairlist_handler in self._pairlist_handlers[1:]:
pairlist = pairlist_handler.filter_pairlist(pairlist, tickers)
# Validation against blacklist happens after the chain of Pairlist Handlers
# to ensure blacklist is respected.

View File

@@ -148,6 +148,9 @@ class IResolver:
logger.debug("Ignoring broken symlink %s", entry)
continue
module_path = entry.resolve()
if entry.read_text().find(f"class {object_name}(") == -1:
logger.debug(f"Skipping {module_path} as it does not contain class {object_name}.")
continue
if obj := next(cls._get_valid_object(module_path, object_name), None):
obj[0].__file__ = str(entry)

View File

@@ -340,6 +340,8 @@ class TradeSchema(BaseModel):
min_rate: float | None = None
max_rate: float | None = None
nr_of_successful_entries: int
nr_of_successful_exits: int
has_open_orders: bool
orders: list[OrderSchema]

View File

@@ -37,7 +37,7 @@ class ApiBG:
# Generic background jobs
# TODO: Change this to TTLCache
# TODO: Change this to FtTTLCache
jobs: dict[str, JobsContainer] = {}
# Pairlist evaluate things
pairlist_running: bool = False

Some files were not shown because too many files have changed in this diff Show More