Skip to content

Latest commit

 

History

History
70 lines (54 loc) · 1.76 KB

autoc.md

File metadata and controls

70 lines (54 loc) · 1.76 KB

autoc (auto complete)

NB: Yahoo decomissioned their autoc server sometime before 20 Nov 2021 (issue #337). Use search instead (just like they do).

Usage:

import yahooFinance from 'yahoo-finance2';

const query = 'GOO';
const result = await yahooFinance.autoc(query, /* queryOptions */);

{
  Query: 'GOO',
  Result: [
    {
      symbol: 'GDRX',
      name: 'GoodRx Holdings, Inc.',
      exch: 'NMS',
      type: 'S',
      exchDisp: 'NASDAQ',
      typeDisp: 'Equity'
    },
    {
      symbol: 'GOOG',
      name: 'Alphabet Inc.',
      exch: 'NMS',
      type: 'S',
      exchDisp: 'NASDAQ',
      typeDisp: 'Equity'
    },
    {
      symbol: 'GOOGL',
      name: 'Alphabet Inc.',
      exch: 'NAS',
      type: 'S',
      exchDisp: 'NASDAQ',
      typeDisp: 'Equity'
    },
    // ....
}

Note: The example output above does not cover all possible return results, which can vary by asset type and even time of day (trading period). For an exhausting list of everything we cover and that you might get back, please see the TypeScript interface in https://github.com/gadicc/node-yahoo-finance2/blob/devel/src/modules/autoc.ts

See also: search.

API

await yahooFinance.autoc(query, queryOptions, moduleOptions);

Query term

Symbol, company name, SEDOL, etc.

Query Options

Name Type Default Description
region number 1
lang string "en"

Module Options

See Common Options.