phase 6: financial statements

This commit is contained in:
shawnkim1997
2026-04-22 11:15:01 +01:00
parent b8602548f2
commit 553ec5347f
10 changed files with 300 additions and 1 deletions
+4
View File
@@ -24,6 +24,7 @@ class CachedGateway(DataGateway):
"quote": 30,
"profile": 86_400,
"fundamentals": 43_200,
"financials": 43_200,
"segments": 604_800,
"history": 300,
"news": 300,
@@ -64,6 +65,9 @@ class CachedGateway(DataGateway):
async def fundamentals(self, symbol: str, period: str = "annual") -> Fundamentals:
return await self._cached("fundamentals", (symbol, period), lambda: self.inner.fundamentals(symbol, period))
async def financials(self, symbol: str, statement: str = "income", period: str = "annual") -> dict[str, Any]:
return await self._cached("financials", (symbol, statement, period), lambda: self.inner.financials(symbol, statement, period))
async def history(self, symbol: str, range: str = "1y") -> OHLCV:
return await self._cached("history", (symbol, range), lambda: self.inner.history(symbol, range))