You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
571 B
Python

"""Earnings surprise Oracle service — actual vs estimated EPS."""
from __future__ import annotations
from typing import Any
from libs.oracle_client.client import OracleClient
class EarningsSurpriseService:
def __init__(self, client: OracleClient) -> None:
self._client = client
async def get_surprise(self, symbol: str) -> list[dict[str, Any]]:
"""GET /api/v1/earnings/surprise/{symbol} → list of quarterly surprises."""
data = await self._client.get(f"/api/v1/earnings/surprise/{symbol}")
return data.get("quarters", [])