Closed ivnnv closed 10 months ago
@ivnnv 2019-06-09 (June 9th 2019) was Sunday which is not a trading day on forex markets. For that date, Dukascopy has data only after 2019-06-09 21:00 UTC.
This means that within range between 2019-06-09 08:24
and 2019-06-09 18:24
there is no data, that is why you are receiving an empty array.
However, when requesting data between 2019-06-09
and 2019-06-10
, dukascopy-node
will convert it to something likes this 2019-06-09 00:00
- 2019-06-10 00:00
, and since the only available starting point for this date is 21:00 , it will fetch the data for a range of 2019-06-09 21:00 - 2019-06-10 00:00 - which is 3 hours, or 180 minute candles, which is exactly the output you're getting.
Hi, sorry I didnt checked the date was indeed, Sunday, it works exactly as expected on date range:
2019-06-07 11:24
2019-06-07 11:26
and returns as expected, only two records.
Thanks for checking and the detailed explanation tho. 👍🏽
Hi, Im trying to fetch data from some timeranges that are not "full days" as all the examples shown, so something like this doesnt seems to work:
Link to runkit
Is this true? workaround seems to fetch the full days between the needed ranges but ideally this should be managed internally