import type { HistoricalData, StockQuoteInput, StockQuoteResponse, StockQuotesInput, StockSearchResult } from './types.js'; import type { YahooClient } from './yahooFinanceClient.js'; /** * Service for fetching stock quotes from Yahoo Finance */ export declare class StockQuotesService { private readonly yahooClient; private readonly cache; /** * Create a new instance of the StockQuotesService */ constructor(yahooClient: YahooClient); /** * Fetch a stock quote for the given ticker symbol * @param input - The stock quote input containing the ticker and optional fields * @returns Promise - The stock quote data */ getQuote(input: StockQuoteInput): Promise; /** * Fetch multiple stock quotes for the given ticker symbols * @param input - The stock quotes input containing the tickers and optional fields * @returns Promise - The stock quote data for each ticker */ getQuotes(input: StockQuotesInput): Promise; /** * Prepares and transforms field requests for Yahoo Finance * @param fields - Optional list of fields requested by the client * @returns string[] | undefined - Transformed fields for Yahoo Finance */ private prepareFields; /** * Maps a YahooQuote to a StockQuoteResponse * @param quote - YahooQuote object * @param ticker - Ticker symbol * @param requestedFields - Optional list of fields requested by the client * @returns StockQuoteResponse */ private mapToStockQuoteResponse; /** * Fetch multiple stock quotes at once * @param tickers - Array of ticker symbols * @returns Promise> - Map of ticker to stock quote data */ getMultipleQuotes(tickers: string[]): Promise>; /** * Search for a company by name or ticker * @param query - Search query string * @returns Promise - Search results */ search(query: string): Promise; /** * Maps Yahoo chart quotes to historical data points * @param chart - YahooChartResponse * @param fields - Optional list of fields to return * @returns HistoricalData[] */ private mapToHistoricalData; /** * Fetches historical stock data for a given ticker, from a start date to an end date. * @param ticker - Stock ticker symbol (e.g., AAPL) * @param fromDate - Start date in 'YYYY-MM-DD' format * @param toDate - End date in 'YYYY-MM-DD' format * @param fields - Optional list of specific fields to return * @returns Promise - An array of historical data points. */ getHistoricalData(ticker: string, fromDate: string, toDate: string, fields?: string[]): Promise; /** * Validates the date range for historical data * @param fromDate - Start date * @param toDate - End date */ private validateHistoricalDataDates; } //# sourceMappingURL=stockQuotesService.d.ts.map