Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Historical returns an extra row for LSE symbos with null prices (e.g. VOD.L) #64

Open
ChristianTreo opened this issue Jul 5, 2019 · 0 comments

Comments

@ChristianTreo
Copy link

ChristianTreo commented Jul 5, 2019

When running historical quotes on any LSE stock, (with the *.L notation), historical() returns an extra day with null prices - see example below.

You can change the symbol between a US Stock, such as AAPL, and you won't get the additional day. It may be that yahoo doesn't provide a price for the most recent date in some cases (and in this example). Perhaps your code is expecting a number of days, and adding in the extra one - just a thought.

var yahooFinance = require('yahoo-finance');

yahooFinance.historical({
  symbol: 'GLEN.L',
  from: '2019-07-03',
  to: '2019-07-05',
  // period: 'd'  // 'd' (daily), 'w' (weekly), 'm' (monthly), 'v' (dividends only)
}, function (err, quotes) {
    if (err) {
        console.log (err)
}
console.log (quotes)
  
});
/*

[ { date: Thu Jul 04 2019 05:00:00 GMT+0100 (British Summer Time), 
    open: 275.700012, 
    high: 276.5, 
    low: 271.600006, 
    close: 272.700012, 
    adjClose: 272.700012, 
    volume: 30167384, 
    symbol: 'GLEN.L' }, 
  { date: Wed Jul 03 2019 05:00:00 GMT+0100 (British Summer Time), 
    open: 277.899994, 
    high: 280.549988, 
    low: 275.700012, 
    close: 276.850006, 
    adjClose: 276.850006, 
    volume: 53012321, 
    symbol: 'GLEN.L' }, 
  { date: Tue Jul 02 2019 05:00:00 GMT+0100 (British Summer Time), 
    open: null, 
    high: null, 
    low: null, 
    close: null, 
    adjClose: null, 
    volume: null, 
    symbol: 'GLEN.L' } ] 
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant