Skip to content

Latest commit

 

History

History
56 lines (42 loc) · 1.16 KB

recommendationsBySymbol.md

File metadata and controls

56 lines (42 loc) · 1.16 KB

recommendationsBySymbol

Usage:

import yahooFinance from 'yahoo-finance2';

// 1. Get recommended symbols for Apple
const searchSingle = await yahooFinance2.recommendationsBySymbol('AAPL');

{
  symbol: 'AAPL',
  recommendedSymbols: [
    { symbol: 'AMZN', score: 0.292276 },
    { symbol: 'FB', score: 0.274045 },
    { symbol: 'GOOG', score: 0.272778 },
    { symbol: 'TSLA', score: 0.270931 },
    { symbol: 'NFLX', score: 0.209186 }
  ]
}

// 2. Get recommended symbols for Apple and BMW
const searchMultiple = await yahooFinance2.recommendationsBySymbol([
'AAPL',
'BMW.DE',
]);

[
  {
    symbol: 'AAPL',
    recommendedSymbols: [ [Object], [Object], [Object], [Object], [Object] ]
  },
  {
    symbol: 'BMW.DE',
    recommendedSymbols: [ [Object], [Object], [Object], [Object], [Object] ]
  }
]

API

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

Query

You can pass a single symbol as a string, e.g AAPL or multiple symbols in an array, e.g ['AAPL', 'BMW.DE'].

Query Options

There are no query options for this module that we know of.

Module Options

See Common Options.