6471 Commits

Author SHA1 Message Date
Matthias 5e6d3e265b tests: rename mock helper function 2026-04-04 09:12:44 +02:00
Matthias 138b70a2bf test: add explicit test for prepare_balance_distribution 2026-04-04 09:12:44 +02:00
Matthias 4cac724709 test: update wallet capture test 2026-04-04 09:12:44 +02:00
Matthias f7ddf46b32 refactor: rename WalletHistory fieldname from price to rate 2026-04-04 09:12:44 +02:00
Matthias 1237bb798c test: fix backtest api wallets test 2026-04-04 09:12:44 +02:00
Matthias cb8d68f395 test: add test for record_wallet_state 2026-04-04 09:12:44 +02:00
Matthias 7dfcf846d0 test: add asserts for backtest wallet capturing 2026-04-04 09:12:44 +02:00
Matthias 4904c7b9fd refactor: split trade_parallelism trades into their own testfile 2026-04-04 09:12:44 +02:00
Matthias 27c7a37531 test: add test for balance_distribution_over_time 2026-04-04 09:12:44 +02:00
Matthias 1d7b1cd4ea test: improve test to make it more realistic 2026-04-04 09:12:44 +02:00
Matthias 03fd0575ce test: simplify imports 2026-04-04 09:12:44 +02:00
Matthias c12c2177cd test: add tests for wallets_migration 2026-04-04 09:12:44 +02:00
Matthias 51cf051fce test: add test for backtest/wallets endpoint 2026-04-04 09:12:44 +02:00
Matthias 4ddb7fd43f chore: clarify delist-filter exception 2026-04-04 09:02:52 +02:00
Matthias 326ef6d49b test: update krakenfutures "filled" test 2026-03-30 06:51:31 +02:00
Matthias c7dfd54eb3 test: stabilize time-dependant test after summer time switch 2026-03-29 13:33:56 +02:00
Matthias 3e40944b4e test: skip pygments vulnerability for now 2026-03-26 07:15:21 +01:00
Matthias 6e6082fa2b test: update test wording for stoploss price type 2026-03-26 07:08:44 +01:00
Matthias fd858b79af test: remove "ignore-vuln" from pip-audit tests
the vulnerability was fixed.
2026-03-25 10:58:39 +01:00
Matthias 724318c43e test(krakenfutures): Add canceled order test 2026-03-22 19:07:19 +01:00
matstedt eba9c24510 refactor(krakenfutures): drop resolved trigger price workaround 2026-03-22 19:07:19 +01:00
Matthias bd9697e6be test: fix krakenfutures tests 2026-03-22 19:07:19 +01:00
Matthias 200b9da2a2 test: remove unnecessary test
ccxt limit is tested as part of test_ohlcv_limit_futures in compat testing
2026-03-22 19:07:19 +01:00
Matthias 32fecd7b15 test(krakenfutures): improve _ft_has test 2026-03-22 19:07:19 +01:00
Matthias f8b99c6e66 test(krakenfutures): update stop strip test 2026-03-22 19:07:19 +01:00
Matthias 57c7edfe26 test: update krakenfutures live test 2026-03-22 19:07:19 +01:00
Matthias 437d0a264c test: Improve test sequence (simplifies analysis) 2026-03-22 19:07:19 +01:00
Matthias 3a28c91635 test: add regular market order 2026-03-22 19:07:19 +01:00
Matthias 1f4c188dbf test: add futures market-parsing test 2026-03-22 19:07:19 +01:00
matstedt bfd758d353 krakenfutures: recompute average and cost from fills for terminal orders 2026-03-22 19:07:19 +01:00
matstedt c533e48310 refactor: remove funding_fee_candle_limit override
Kraken Futures now provides 1 year of hourly funding rate history.
The previous limit of 700 candles (29 days) was a workaround for
limited API retention. Freqtrade paginates funding rate fetches
automatically, so the CCXT default (2000) works correctly.
2026-03-22 19:07:19 +01:00
matstedt a1e9b6bea8 fix: compute average price from trades and enrich fees for Kraken Futures
Kraken Futures' /orders/status returns limitPrice (not fill price) and
/fills omits fee amounts (only fillType). This adds:

- _adjust_krakenfutures_order: fetches trades for closed/filled orders
  with average=None and computes VWAP average price.
- get_trades_for_order override: enriches trades with calculated fees
  from the market's maker/taker fee schedule.

Tests: 7 new tests covering VWAP computation, fee enrichment with
maker/taker rates, and preservation of existing values.
2026-03-22 19:07:19 +01:00
matstedt 0dfd7324bd fix: extract triggerPrice from priceTriggerOptions for stoploss orders
CCXT's krakenfutures parse_order misses triggerPrice when the
/orders/status endpoint nests it inside priceTriggerOptions.
Override _order_contracts_to_amount to populate triggerPrice and
stopPrice from info.order.priceTriggerOptions.triggerPrice.
2026-03-22 19:07:19 +01:00
Matthias 3c4b07ce46 test: update krakenfutures_tests for usage of __name__ 2026-03-22 19:07:19 +01:00
Matthias 027ac3d66c test: simplify longrun tests 2026-03-22 19:07:19 +01:00
matstedt 8c1674b415 fix(tests): use CandleType.FUTURES in test_ohlcv_limit_futures
The futures_only ternary incorrectly used CandleType.SPOT for exchanges
that support both spot and futures (binance, gate), causing candle limit
mismatch against candle_count_futures.
2026-03-22 19:07:19 +01:00
matstedt eaa35d7b47 style: ruff format 2026-03-22 19:07:19 +01:00
matstedt 0dc26584cc krakenfutures: add funding_fee_candle_limit for limited history
Kraken Futures retains only ~29 days of hourly funding rate history.
Set funding_fee_candle_limit to 700 so ohlcv_candle_limit returns the
correct cap for CandleType.FUNDING_RATE instead of the general OHLCV
limit.
2026-03-22 19:07:19 +01:00
matstedt cb2e50abcf fix(tests): restore exchange_params return in get_futures_exchange 2026-03-22 19:07:19 +01:00
matstedt f0aedc8d23 test(krakenfutures): align tests with simplified stoploss handling
- Add test for stoploss_query_requires_stop_flag in _ft_has.
- Replace _fix_trigger_order_id tests with base class integration tests
  (verify stop=True is passed by fetch_stoploss_order/cancel_stoploss_order).
- Add tests for stop param flow: passed to history endpoints, stripped
  from open orders query.
- Remove obsolete cancel_stoploss_order/fetch_stoploss_order override tests.
2026-03-22 19:07:19 +01:00
Matthias 83c2ca5a90 test: krakenfutures has no websockets at the moment 2026-03-22 19:07:19 +01:00
Matthias b190079aa8 test: Simplify live test setup 2026-03-22 19:07:19 +01:00
matstedt bfbae5d040 fix(krakenfutures): re-introduce improved stoploss lookup for trigger orders 2026-03-22 19:07:19 +01:00
matstedt f81e335b27 krakenfutures: simplify order/balance handling and harden error mapping 2026-03-22 19:07:05 +01:00
matstedt 756f178ec3 exchange_utils: use ccxt exchange.has directly in capability checks 2026-03-22 19:07:05 +01:00
Matthias 712fd8ac14 chore: import formatting 2026-03-22 19:07:05 +01:00
matstedt 1c77bd6f5d krakenfutures: improve fetch_order fallback 2026-03-22 19:07:05 +01:00
Matthias 1d0bcbe234 test: remove no longer necessary test 2026-03-22 19:07:05 +01:00
matstedt a8d7a72cec tests: drop unused krakenfutures spot leverage flag 2026-03-22 19:07:04 +01:00
matstedt 6ed470884b krakenfutures: backfill leverage tier notionals 2026-03-22 19:07:04 +01:00