@stoqey/finnhub
Version:
NodeJS Finhubb wrapper
65 lines (64 loc) • 3.23 kB
TypeScript
import FinnhubAPI from "../";
import { BasicFinancials, BasicFinancialsRequest, CompanyNews, CompanyNewsRequest, CompanyProfile2, CompanyProfile2Request, InsiderTransaction, InsiderTransactionRequest, MarketNews, MarketNewsRequest, NewsSentiment, SymbolLookup } from "./interface";
declare class Fundamentals {
ctx: FinnhubAPI;
constructor(context: FinnhubAPI);
/**
* Symbol Lookup - https://finnhub.io/docs/api/symbol-search
* Search for best-matching symbols based on your query. You can input anything from symbol, security's name to ISIN and Cusip.
* @param query Query text can be symbol, name, isin, or cusip.
* @returns {SymbolLookup | null}
*/
symbolLookup: (query?: string | undefined) => Promise<SymbolLookup | null>;
/**
* Company Profile 2 - https://finnhub.io/docs/api/company-profile2
* Get general information of a company. You can query by symbol, ISIN or CUSIP. This is the free version of Company Profile.
* @param args @type {CompanyProfile2Request}
* @returns {CompanyProfile2 | null}
*/
companyProfile2: (args: CompanyProfile2Request) => Promise<CompanyProfile2 | null>;
/**
* Market News - https://finnhub.io/docs/api/market-news
* Get latest market news.
* @param args @type {MarketNewsRequest}
* @returns {MarketNews | null}
*/
marketNews: (args: MarketNewsRequest) => Promise<MarketNews[] | null>;
/**
* Company News - https://finnhub.io/docs/api/company-news
* List latest company news by symbol. This endpoint is only available for North American companies.
* @param args @type {CompanyNewsRequest}
* @returns {CompanyNews | null}
*/
companyNews: (args: CompanyNewsRequest) => Promise<CompanyNews[] | null>;
/**
* News Sentiment - https://finnhub.io/docs/api/news-sentiment
* Get company's news sentiment and statistics. This endpoint is only available for US companies.
* @param symbol
* @returns {NewsSentiment | null}
*/
newsSentiment: (symbol: string) => Promise<NewsSentiment | null>;
/**
* Peers - https://finnhub.io/docs/api/company-peers
* Get company peers. Return a list of peers in the same country and GICS sub-industry
* @param symbol Symbol of the company
* @returns Array of peers' symbol.
*/
peers: (symbol: string) => Promise<string[] | null>;
/**
* Basic Financials - https://finnhub.io/docs/api/company-basic-financials
* Get company basic financials such as margin, P/E ratio, 52-week high/low etc.
* @param args @type {BasicFinancialsRequest}
* @returns {BasicFinancials}
*/
basicFinancials: (args: BasicFinancialsRequest) => Promise<BasicFinancials | null>;
/**
* Insider Transactions - https://finnhub.io/docs/api/insider-transactions
* Company insider transactions data sourced from Form 3,4,5. This endpoint only covers US companies at the moment.
* Limit to 100 transactions per API call.
* @param args @type {InsiderTransactionRequest}
* @returns {InsiderTransaction}
*/
insiderTransactions: (args: InsiderTransactionRequest) => Promise<InsiderTransaction | null>;
}
export default Fundamentals;