Missing data when end time in the CLI is not on the hour. #193
Description
If you download both of these on the CLI:
npx dukascopy-node -i bundtreur -from '2024-08-29 11:00:01+00:00' -to '2024-08-29 14:59:59+00:00' -t tick -f csv -r 0 -fr false -re true --date-format 'YYYY-MM-DD HH:mm:ssZ' --file-name "aa.csv"
npx dukascopy-node -i bundtreur -from '2024-08-29 11:00:01+00:00' -to '2024-08-29 15:00:00+00:00' -t tick -f csv -r 0 -fr false -re true --date-format 'YYYY-MM-DD HH:mm:ssZ' --file-name "bb.csv"
You can see that the first is missing all ticks after 2024-08-29 13:59:59+00:00 and before/including 2024-08-29 14:59:51+00:00. This seems like a bug to me in that in the first case it displays the following suggesting it should be downloading it:
Downloading historical price data for:
Instrument: Euro Bund
Timeframe: tick
From date: Aug 29, 2024, 11:00:01 AM
To date: Aug 29, 2024, 2:59:59 PM
In terms of fixing it I guess it would be best to make it download to the exact end time that you input (so an endtime of 2024-08-29 14:36:40+00:00' for instance will have a final tick of '2024-08-29 14:36:34+00:00' for bundtreur as that is last tick in the requested interval).
Or if that is not possible (if maybe dukascopy only releases the ticks on the hour?) then maybe the CLI should throw when times not on the hour are used? Or just change the printed message to reflect the interval of time that is accessible.
The start times do seem to work properly though. When I do the following I get the first tick at 2024-08-29 11:30:15+00:00
npx dukascopy-node -i bundtreur -from '2024-08-29 11:30:01+00:00' -to '2024-08-29 14:59:59+00:00' -t tick -f csv -r 0 -fr false -re true --date-format 'YYYY-MM-DD HH:mm:ssZ' --file-name "cc.csv"