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

intraday wrong data returns

Open my-trades-flow opened this issue 2 years ago • 0 comments

Bug Report

Describe the bug

in intraday interval get wrong data for example request data between periods the last date results returns with last trading datetime and out of the requested interval period interval between from: Friday, April 15, 2022 5:20:00 AM to: Thursday, May 12, 2022 4:30:00 PM

the issue is the last 2 objects one is with null data second is with last trading datetime (out of the requested range) Friday, September 9, 2022 5:00:00 PM

image

Minimal Reproduction

https://codesandbox.io/s/yahoo-finance2-312x2?file=/src/index.ts:97-300

replace in show function the current code

const result = await yahooFinance._chart("TSLA", { period1: 1650000000, period2: 1652373000, interval: '1h', includePrePost: false }, { validateResult: false });

my-trades-flow avatar Sep 11 '22 09:09 my-trades-flow