UNPKG

fitr

Version:
22 lines (21 loc) 1.06 kB
import { PricePoint } from '../types'; /** * Get historical weekly price data for a symbol between two dates */ export declare function getHistoricalPrices(symbol: string, fromDate: string, toDate?: string, interval?: '1wk' | '1d'): Promise<PricePoint[]>; /** * Get the next occurrence of a specific day of the week after a given date * @param date The starting date * @param dayOfWeek The day of the week to find (0 = Sunday, 1 = Monday, etc.) * @returns The next occurrence of the specified day */ export declare function getNextDayOfWeek(date: Date, dayOfWeek: 0 | 1 | 2 | 3 | 4 | 5 | 6): Date; /** * Get weekly prices for a symbol since a given date * * @param symbol The stock/ETF symbol * @param sinceDate The date to start fetching prices from (exclusive) * @param weekStartsOn The day of the week to consider as the first day (0 = Sunday, 1 = Monday, etc.) * @returns Array of price points */ export declare function getWeeklyPrices(symbol: string, sinceDate: string, weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6): Promise<PricePoint[]>;