feat: implement aggregate_history_prices function to calculate hourly price averages

This commit is contained in:
2025-10-01 23:51:10 +02:00
parent 59a38c6e32
commit 3ede7ba3f0
2 changed files with 29 additions and 17 deletions

View File

@@ -94,7 +94,7 @@ class TestMarketDataAggregator:
assert len(aggregated) == 2
assert aggregated[0].timestamp_ms == 1685577600000
assert aggregated[0].high == pytest.approx(50050.0, rel=1e-3)
assert aggregated[0].low == pytest.approx(49500.0, rel=1e-3)
assert aggregated[0].low == pytest.approx(49550.0, rel=1e-3)
assert aggregated[1].timestamp_ms == 1685581200000
assert aggregated[1].high == pytest.approx(50250.0, rel=1e-3)
assert aggregated[1].low == pytest.approx(49800.0, rel=1e-3)
assert aggregated[1].low == pytest.approx(49850.0, rel=1e-3)