import yahooFinance from 'yahoo-finance2';
const query = 'GOO';
const result = await yahooFinance.search(query, /* queryOptions */);
{
explains: [],
count: 3,
quotes: [
{
exchange: 'NMS',
shortname: 'Alphabet Inc.',
quoteType: 'EQUITY',
symbol: 'GOOG',
index: 'quotes',
score: 597831,
typeDisp: 'Equity',
longname: 'Alphabet Inc.',
isYahooFinance: true
},
{
index: '5167b830a941ed08d275f74473d13e91',
name: 'Google for Startups',
permalink: 'google-for-entrepreneurs',
isYahooFinance: false
},
{
index: '26e6817312a98f234d2fcf80fa1abc1c',
name: 'Google Cloud Platform',
permalink: 'google-cloud-platform',
isYahooFinance: false
}
],
news: [],
nav: [],
lists: [],
researchReports: [],
totalTime: 20,
timeTakenForQuotes: 414,
timeTakenForNews: 0,
timeTakenForAlgowatchlist: 400,
timeTakenForPredefinedScreener: 400,
timeTakenForCrunchbase: 400,
timeTakenForNav: 400,
timeTakenForResearchReports: 0
}
See also: autoc (auto complete).
await yahooFinance.search(query, queryOptions, moduleOptions);
Anything you'd put in the search box at the top of https://finance.yahoo.com/. The text there is "Search for news, symbols, companies".
Useful things we've found include: listing SEDOL.
Name | Type | Default | Description |
---|---|---|---|
lang |
string | "en-US" | |
region |
string | "US" | |
quotesCount |
number | 6 | Max no. of quotes to return |
newsCount |
number | 4 | Max no. of news items to return |
enableFuzzyQuery |
boolean | false | |
quotesQueryId |
string | "tss_match_phrase_query" | |
multiQuoteQueryId |
string | "multi_quote_single_token_query" | |
newsQueryId |
string | "news_cie_vespa" | |
enableCb |
boolean | true, | |
enableNavLinks |
boolean | true, | |
enableEnhancedTrivialQuery |
boolean | true |
See Common Options.