feat(portfolio): metodi Cerbero v2 (get_historical_v2, get_instruments, get_ticker_batch)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-29 15:47:10 +02:00
parent 753d786bb5
commit ea04dcd9d1
4 changed files with 41 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
import pytest
from src.live.cerbero_client import CerberoClient
@pytest.mark.network
def test_get_historical_v2_shape():
cli = CerberoClient()
candles = cli.get_historical_v2("BTC-PERPETUAL", "2026-05-25", "2026-05-27", "1h")
assert len(candles) > 0
c0 = candles[0]
assert {"timestamp", "open", "high", "low", "close", "volume"} <= set(c0)
@pytest.mark.network
def test_get_instruments_returns_list():
cli = CerberoClient()
inst = cli.get_instruments("ETH", "future")
assert isinstance(inst, list) and len(inst) > 0