Skip to content

Commit e9cc9bb

Browse files
committed
test: add explaining comment about mark price test
closes freqtrade#12046
1 parent 3b6395d commit e9cc9bb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/exchange_online/test_ccxt_compat.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,10 @@ def test_ccxt_fetch_mark_price_history(self, exchange_futures: EXCHANGE_FIXTURE_
380380
this_hour = timeframe_to_prev_date(expected_tf)
381381
prev_hour = timeframe_to_prev_date(expected_tf, this_hour - timedelta(minutes=1))
382382

383+
# Mark price must be available for the currently open candle (as well as older candles,
384+
# even though the test only asserts the last two).
385+
# This is a requirement to have funding fee calculations available correctly and timely
386+
# right as the funding fee applies (e.g. at 08:00).
383387
assert mark_candles[mark_candles["date"] == prev_hour].iloc[0]["open"] != 0.0
384388
assert mark_candles[mark_candles["date"] == this_hour].iloc[0]["open"] != 0.0
385389

0 commit comments

Comments
 (0)