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:
@@ -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
|
||||
Reference in New Issue
Block a user