Skip to content

Unknown error when using retryOnEmpty #201

@catamounttechnology

Description

@catamounttechnology
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions