Leo4815162342 / dukascopy-node

✨ Download historical price tick data for Crypto, Stocks, ETFs, CFDs, Forex via CLI and Node.js ✨
https://dukascopy-node.app
MIT License
350 stars 66 forks source link

[BUG] The connection interrupts when downloading large dataset #146

Closed Vasile-Peste closed 1 year ago

Vasile-Peste commented 1 year ago

Hello, I have a good and stable connection, but when I download large tick datasets (for example 1yr) the connection interrupts randomly during the process

Screenshot 2023-06-25 at 20 46 00

Do you have any idea?

Leo4815162342 commented 1 year ago

@Vasile-Peste

In case of downloading a large data set of ticks, I'd recommend adding --cache, --retries, --retry-on-empty and --no-fail-after-retries in order to make the download process as optimal as possible.

The command would look like this:

npx dukascopy-node -i xauusd -from 2016-01-01 -to 2017-01-01 -t tick -f csv --cache --retries 10 --retry-on-empty --no-fail-after-retries

At least with this approach ^, if something fails, you will not need to re-download all the data from scratch, it will continue where it left.


Detailed info on caching: https://www.dukascopy-node.app/using-cache

Detailed info on retry mechanism: https://www.dukascopy-node.app/errors-and-empty-data