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

Unknown error when using retryOnEmpty #201

Open
catamounttechnology opened this issue Dec 19, 2024 · 0 comments
Open

Unknown error when using retryOnEmpty #201

catamounttechnology opened this issue Dec 19, 2024 · 0 comments

Comments

@catamounttechnology
Copy link

const { getHistoricalRates } = require("dukascopy-node");

(async () => {
    const historicalRates = await getHistoricalRates({
        instrument: "eurusd",
        dates: {
            from: new Date("2017-10-06T00:00:00.000Z"),
            to: new Date("2017-10-07T00:00:00.000Z"),
        },
        timeframe: "tick",
        retryCount: 5,
        retryOnEmpty: true
    });

    console.log(historicalRates);
})();

node s2.js
(node:105348) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
(Use node --trace-deprecation ... to show where the warning was created)
C:\Users\franco.tiveron\AppData\Roaming\npm\node_modules\dukascopy-node\dist\index.js:14524
throw Error(errorMsg || "Unknown error");
^

Error: Unknown error
at BufferFetcher.fetchBuffer (C:\Users\franco.tiveron\AppData\Roaming\npm\node_modules\dukascopy-node\dist\index.js:14524:17)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async C:\Users\franco.tiveron\AppData\Roaming\npm\node_modules\dukascopy-node\dist\index.js:14430:18
at async Promise.all (index 1)
at async BufferFetcher.fetch (C:\Users\franco.tiveron\AppData\Roaming\npm\node_modules\dukascopy-node\dist\index.js:14468:20)
at async getHistoricalRates (C:\Users\franco.tiveron\AppData\Roaming\npm\node_modules\dukascopy-node\dist\index.js:15062:25)
at async C:\Root\Work\FrancoTiveron\QuanTive\src\Services\Provider\QuanTive.Duka\s2.js:5:29

Node.js v22.11.0

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