// https://www.alphavantage.co/documentation/#latestprice interface RawStockQuote { 'Global Quote': { '01. symbol': string; '02. open': string; '03. high': string; '04. low': string; '05. price': string; '06. volume': string; '07. latest trading day': string; '08. previous close': string; '09. change': string; '10. change percent': string; }; } // https://www.alphavantage.co/documentation/#dailyadj interface RawStockDailyAdjusted { 'Meta Data': { '1. Information': string; '2. Symbol': string; '3. Last Refreshed': string; '4. Output Size': string; '5. Time Zone': string; }; 'Time Series (Daily)': { [date: string]: | { '1. open': string; '2. high': string; '3. low': string; '4. close': string; '5. adjusted close': string; '6. volume': string; '7. dividend amount': string; '8. split coefficient': string; } | undefined; }; } // https://www.alphavantage.co/documentation/#symbolsearch interface RawStockSearch { bestMatches: { '1. symbol': string; '2. name': string; '3. type': string; '4. region': string; '5. marketOpen': string; '6. marketClose': string; '7. timezone': string; '8. currency': string; '9. matchScore': string; }[]; } declare function alpha(config?: { key: string; }): { util: { url: (params: any) => string; polish: (data: any) => T; fn: (type: string) => Function; }; data: { intraday: (symbol: string, outputsize?: string, datatype?: string, interval?: string) => Promise; daily: (symbol: string, outputsize?: string, datatype?: string, interval?: string) => Promise; daily_adjusted: ( symbol: string, outputsize?: string, datatype?: string, interval?: string ) => Promise; weekly: (symbol: string, outputsize?: string, datatype?: string, interval?: string) => Promise; weekly_adjusted: (symbol: string, outputsize?: string, datatype?: string, interval?: string) => Promise; monthly: (symbol: string, outputsize?: string, datatype?: string, interval?: string) => Promise; monthly_adjusted: ( symbol: string, outputsize?: string, datatype?: string, interval?: string ) => Promise; quote: (symbol: string, outputsize?: string, datatype?: string, interval?: string) => Promise; search: (keywords: string) => Promise; }; forex: { rate: (from_currency: string, to_currency: string) => Promise; intraday: (from_currency: string, to_currency: string, interval: string, outputsize: string) => Promise; daily: (from_currency: string, to_currency: string) => Promise; weekly: (from_currency: string, to_currency: string) => Promise; monthly: (from_currency: string, to_currency: string) => Promise; }; crypto: { daily: (symbol: string, market: string) => Promise; weekly: (symbol: string, market: string) => Promise; monthly: (symbol: string, market: string) => Promise; }; technical: { sma: (symbol: string, interval: string, time_period: any, series_type: string) => Promise; ema: (symbol: string, interval: string, time_period: any, series_type: string) => Promise; wma: (symbol: string, interval: string, time_period: any, series_type: string) => Promise; dema: (symbol: string, interval: string, time_period: any, series_type: string) => Promise; tema: (symbol: string, interval: string, time_period: any, series_type: string) => Promise; trima: (symbol: string, interval: string, time_period: any, series_type: string) => Promise; kama: (symbol: string, interval: string, time_period: any, series_type: string) => Promise; mama: ( symbol: string, interval: string, series_type: string, fastlimit: number, slowlimit: number ) => Promise; t3: (symbol: string, interval: string, time_period: any, series_type: string) => Promise; macd: ( symbol: string, interval: string, series_type: string, fastperiod: number, slowperiod: number, signalperiod: number, fastmatype: any, slowmatype: any, signalmatype: any ) => Promise; macdext: ( symbol: string, interval: string, series_type: string, fastperiod: number, slowperiod: number, signalperiod: number, fastmatype: any, slowmatype: any, signalmatype: any ) => Promise; stoch: ( symbol: string, interval: string, fastkperiod: any, slowkperiod: any, slowdperiod: any, slowkmatype: any, slowdmatype: any ) => Promise; stochf: ( symbol: string, interval: string, fastkperiod: any, fastdperiod: any, fastdmatype: any ) => Promise; rsi: (symbol: string, interval: string, time_period: any, series_type: string) => Promise; stochrsi: ( symbol: string, interval: string, time_period: any, series_type: any, fastkperiod: any, fastdperiod: any, fastdmatype: any ) => Promise; willr: (symbol: string, interval: string, time_period: any, series_type: string) => Promise; adx: (symbol: string, interval: string, time_period: any, series_type: string) => Promise; adxr: (symbol: string, interval: string, time_period: any, series_type: string) => Promise; apo: ( symbol: string, interval: string, series_type: string, fastperiod: any, slowperiod: any, matype: any ) => Promise; ppo: ( symbol: string, interval: string, series_type: string, fastperiod: any, slowperiod: number, matype: any ) => Promise; mom: (symbol: string, interval: string, time_period: any, series_type: string) => Promise; bop: (symbol: string, interval: string, time_period: any, series_type: string) => Promise; cci: (symbol: string, interval: string, time_period: any, series_type: string) => Promise; cmo: (symbol: string, interval: string, time_period: any, series_type: string) => Promise; roc: (symbol: string, interval: string, time_period: any, series_type: string) => Promise; rocr: (symbol: string, interval: string, time_period: any, series_type: string) => Promise; aroon: (symbol: string, interval: string, time_period: any, series_type: string) => Promise; aroonosc: (symbol: string, interval: string, time_period: any, series_type: string) => Promise; mfi: (symbol: string, interval: string, time_period: any, series_type: string) => Promise; trix: (symbol: string, interval: string, time_period: any, series_type: string) => Promise; ultosc: ( symbol: string, interval: string, timeperiod1: string, timeperiod2: any, timeperiod3: any ) => Promise; dx: (symbol: string, interval: string, time_period: any, series_type: string) => Promise; minus_di: (symbol: string, interval: string, time_period: any, series_type: string) => Promise; plus_di: (symbol: string, interval: string, time_period: any, series_type: string) => Promise; minus_dm: (symbol: string, interval: string, time_period: any, series_type: string) => Promise; plus_dm: (symbol: string, interval: string, time_period: any, series_type: string) => Promise; bbands: ( symbol: string, interval: string, time_period: any, series_type: string, nbdevup: any, nbdevdn: any, matype: any ) => Promise; midpoint: (symbol: string, interval: string, time_period: any, series_type: string) => Promise; midprice: (symbol: string, interval: string, time_period: any, series_type: string) => Promise; sar: (symbol: string, interval: string, acceleration: string, maximum: any) => Promise; trange: (symbol: string, interval: string, time_period: any, series_type: string) => Promise; atr: (symbol: string, interval: string, time_period: any, series_type: string) => Promise; natr: (symbol: string, interval: string, time_period: any, series_type: string) => Promise; ad: (symbol: string, interval: string, time_period: any, series_type: string) => Promise; adosc: (symbol: string, interval: string, fastperiod: any, slowperiod: any) => Promise; obv: (symbol: string, interval: string, time_period: any, series_type: string) => Promise; ht_trendline: (symbol: string, interval: string, series_type: string) => Promise; ht_sine: (symbol: string, interval: string, series_type: string) => Promise; ht_trendmode: (symbol: string, interval: string, series_type: string) => Promise; ht_dcperiod: (symbol: string, interval: string, series_type: string) => Promise; ht_dcphase: (symbol: string, interval: string, series_type: string) => Promise; ht_dcphasor: (symbol: string, interval: string, series_type: string) => Promise; }; performance: { sector: (params: any) => T; }; fundamental: { company_overview: (symbol: string) => Promise; income_statement: (symbol: string) => Promise; balance_sheet: (symbol: string) => Promise; cash_flow: (symbol: string) => Promise; }; }; declare namespace alpha { // Polished // https://www.alphavantage.co/documentation/#latestprice export interface StockQuote { data: { symbol: string; open: string; high: string; low: string; price: string; volume: string; latest_trading_day: string; prev_close: string; change: string; change_percent: string; }; } // https://www.alphavantage.co/documentation/#dailyadj export interface StockDailyAdjusted { meta: { information: string; symbol: string; updated: string; size: string; zone: string; }; data: { [date: string]: | { open: string; high: string; low: string; close: string; adjusted: string; volume: string; dividend: string; split: string; } | undefined; }; } // https://www.alphavantage.co/documentation/#symbolsearch export interface StockSearch { bestMatches: { [index: string]: | { symbol: string; name: string; type: string; region: string; market_open: string; market_close: string; zone: string; currency: string; match_score: string; } | undefined; }; } } export = alpha;