node-yahoo-finance2 icon indicating copy to clipboard operation
node-yahoo-finance2 copied to clipboard

Search for index funds, etfs, and crypto like tickers

Open bklynate opened this issue 1 year ago • 2 comments

Feature Request

Wanted Feature

I would like the ability to search for ETFs, index funds, and cryptocurrency tickers in the same way as stock tickers, such as SCHD or BTC. This feature would ideally return detailed information, similar to what is available when searching for stock tickers.

Use Cases

  • Investors who want to track their ETF, index fund, or cryptocurrency holdings and get in-depth information just like they do with stock tickers.

bklynate avatar Oct 06 '24 01:10 bklynate

Is that information that's actually available from the API, do you know?

arthurwolf avatar Sep 09 '25 01:09 arthurwolf

Sorry for the late reply everyone but hasn't this always been available?

$ yahoo-finance search "NASDAQ Composite"
{
  explains: [],
  count: 10,
  quotes: [
    {
      exchange: "NIM",
      shortname: "NASDAQ Composite",
      quoteType: "INDEX",
      symbol: "^IXIC",
      index: "quotes",
      score: 24767,
      typeDisp: "Index",
      longname: "NASDAQ Composite",
      exchDisp: "NASDAQ GIDS",
      isYahooFinance: true
    },
    // ...
  ],
  // ...
}
$ yahoo-finance quote ^IXIC
{
  language: "en-US",
  region: "US",
  quoteType: "INDEX",
  typeDisp: "Index",
  quoteSourceName: "Delayed Quote",
  triggerable: true,
  customPriceAlertConfidence: "HIGH",
  currency: "USD",
  shortName: "NASDAQ Composite",
  longName: "NASDAQ Composite",
  marketState: "PRE",
  regularMarketChangePercent: 0.4530359,
  regularMarketPrice: 21798.7,
  exchange: "NIM",
  messageBoardId: "finmb_INDEXIXIC",
  exchangeTimezoneName: "America/New_York",
  exchangeTimezoneShortName: "EDT",
  gmtOffSetMilliseconds: -14400000,
  market: "us_market",
  esgPopulated: false,
  corporateActions: [],
  regularMarketTime: 2025-09-08T21:15:59.000Z,
  hasPrePostMarketData: false,
  firstTradeDateMilliseconds: 1971-02-05T14:30:00.000Z,
  priceHint: 2,
  regularMarketChange: 98.31055,
  regularMarketDayHigh: 21885.621,
  regularMarketDayRange: { low: 21776.244, high: 21885.621 },
  regularMarketDayLow: 21776.244,
  regularMarketVolume: 7726830000,
  regularMarketPreviousClose: 21700.389,
  bid: 0,
  ask: 0,
  bidSize: 0,
  askSize: 0,
  fullExchangeName: "Nasdaq GIDS",
  regularMarketOpen: 21806.2,
  averageDailyVolume3Month: 9063738870,
  averageDailyVolume10Day: 8089758000,
  fiftyTwoWeekLowChange: 7014.669,
  fiftyTwoWeekLowChangePercent: 0.4744761,
  fiftyTwoWeekRange: { low: 14784.03, high: 21885.621 },
  fiftyTwoWeekHighChange: -86.921875,
  fiftyTwoWeekHighChangePercent: -0.0039716433,
  fiftyTwoWeekLow: 14784.03,
  fiftyTwoWeekHigh: 21885.621,
  fiftyTwoWeekChangePercent: 28.032732,
  fiftyDayAverage: 21099.008,
  fiftyDayAverageChange: 699.6914,
  fiftyDayAverageChangePercent: 0.03316229,
  twoHundredDayAverage: 19361.266,
  twoHundredDayAverageChange: 2437.4336,
  twoHundredDayAverageChangePercent: 0.12589227,
  sourceInterval: 15,
  exchangeDataDelayedBy: 0,
  tradeable: false,
  cryptoTradeable: false,
  symbol: "^IXIC"
}

What can you search for on Yahoo Finance that has results that you can't get with this library?

Maybe the only confusing thing is the symbol names, in which case, just use search first like I did above (or on Yahoo Finance website - it's the same thing). Although SOMETIMES the Yahoo symbol is the same as the common ticker you see everywhere, indexes usually start with a "^", Bitcoin USD Price is "BTC-USD", stocks / funds on e.g. the LSE end with ".L", etc. Invesco QQQ ETF on the NASDAQ is still just "QQQ".

gadicc avatar Sep 09 '25 11:09 gadicc