From e9cc9bb38a006443e506048d9a0adfbf1aa846fe Mon Sep 17 00:00:00 2001 From: Matthias Date: Wed, 30 Jul 2025 07:13:35 +0200 Subject: [PATCH] test: add explaining comment about mark price test closes #12046 --- tests/exchange_online/test_ccxt_compat.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/exchange_online/test_ccxt_compat.py b/tests/exchange_online/test_ccxt_compat.py index c9c79b014..baab85bae 100644 --- a/tests/exchange_online/test_ccxt_compat.py +++ b/tests/exchange_online/test_ccxt_compat.py @@ -380,6 +380,10 @@ class TestCCXTExchange: this_hour = timeframe_to_prev_date(expected_tf) prev_hour = timeframe_to_prev_date(expected_tf, this_hour - timedelta(minutes=1)) + # Mark price must be available for the currently open candle (as well as older candles, + # even though the test only asserts the last two). + # This is a requirement to have funding fee calculations available correctly and timely + # right as the funding fee applies (e.g. at 08:00). assert mark_candles[mark_candles["date"] == prev_hour].iloc[0]["open"] != 0.0 assert mark_candles[mark_candles["date"] == this_hour].iloc[0]["open"] != 0.0