UNPKG

polygon.io

Version:

Isomorphic Javascript client for Polygon.io Stocks, Forex, and Crypto APIs

27 lines (24 loc) 640 B
// CF: https://polygon.io/docs/#!/Reference/get_v2_reference_splits_symbol import { get } from "../transport/request"; export interface IStockDividend { symbol: string; type: string; exDate: string; paymentDate?: string; recordDate?: string; declaredDate?: string; amount: number; qualified?: string; flag?: string; } export interface IStockDividendsResults { status?: string; count?: number; results?: IStockDividend[]; } export const stockDividends = async ( apiKey: string, apiBase: string, symbol: string ): Promise<IStockDividendsResults> => get(`/v2/reference/dividends/${symbol}`, apiKey, apiBase);