Skip to content
dukascopy-node

Debugging

Turn on dukascopy-node's debug logs to see the resolved config, every request, cache hits and rate limiting.

dukascopy-node logs through the debug package. Logs are off until you enable them.

Add -d (--debug). The progress bar is replaced by detailed logs:

Terminal window
npx dukascopy-node -i usdjpy -from 2022-03-21 -to 2022-03-22 -t m1 -d
Output
2026-10-24T18:49:10.230Z dukascopy-node:cli:version 1.51.0
2026-10-24T18:49:10.231Z dukascopy-node:cli:nodejs v24.15.0
2026-10-24T18:49:10.231Z dukascopy-node:cli:os Darwin, 25.5.0 (darwin)
2026-10-24T18:49:10.231Z dukascopy-node:cli:config {
input: {
instrument: 'usdjpy',
dates: { from: 2022-03-21T00:00:00.000Z, to: 2022-03-22T00:00:00.000Z },
timeframe: 'm1',
priceType: 'bid',
…
},
isValid: true,
validationErrors: []
}
2026-10-24T18:49:10.231Z dukascopy-node:cli:urls Generated 1 urls
2026-10-24T18:49:10.231Z dukascopy-node:cli:urls [ '…/v1/candles/minute/USD-JPY/BID/2022/3/21' ]

In an interactive terminal the lines are colour-coded and show the time since the previous message instead of a date.

You can also pick namespaces with the DEBUG environment variable. Setting it also replaces the progress bar:

Terminal window
DEBUG=dukascopy-node:cli:* npx dukascopy-node -i usdjpy -from 2022-03-21 -to 2022-03-22 -t m1

Set DEBUG when you start your script:

Terminal window
DEBUG=dukascopy-node:* node download.mjs

On Windows PowerShell, set it first with $env:DEBUG = 'dukascopy-node:*'.

Namespace What it logs
dukascopy-node:version, :nodejs, :os Package, Node.js and operating system versions.
dukascopy-node:config The validated config and any validation errors.
dukascopy-node:urls The planned requests.
dukascopy-node:fetcher Each response: size, and whether it came from the network or cache.
dukascopy-node:data The number of ticks or candles produced.
dukascopy-node:cache Cache hits and misses.
dukascopy-node:rate-limit HTTP 429 responses and the pause before retrying.

In the CLI, the version, config, URL and fetcher logs use dukascopy-node:cli:* instead. When you report an issue, include the debug output: it contains everything needed to reproduce a download.