feat(stocks): Add unified stock data API (getData) with historical/OHLCV support, smart caching and provider enhancements

This commit is contained in:
2025-10-31 14:00:59 +00:00
parent 28ae2bd737
commit 8632f0e94b
9 changed files with 879 additions and 76 deletions

View File

@@ -52,7 +52,9 @@ export class YahooFinanceProvider implements IStockProvider {
provider: this.name,
marketState: this.determineMarketState(meta),
exchange: meta.exchange,
exchangeName: meta.exchangeName
exchangeName: meta.exchangeName,
dataType: 'live', // Yahoo provides real-time/near real-time data
fetchedAt: new Date()
};
return stockPrice;
@@ -101,7 +103,9 @@ export class YahooFinanceProvider implements IStockProvider {
provider: this.name,
marketState: sparkData.marketState || 'REGULAR',
exchange: sparkData.exchange,
exchangeName: sparkData.exchangeName
exchangeName: sparkData.exchangeName,
dataType: 'live', // Yahoo provides real-time/near real-time data
fetchedAt: new Date()
});
}