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.
In the CLI
Section titled “In the CLI”Add -d (--debug). The progress bar is replaced by detailed logs:
npx dukascopy-node -i usdjpy -from 2022-03-21 -to 2022-03-22 -t m1 -d2026-10-24T18:49:10.230Z dukascopy-node:cli:version 1.51.02026-10-24T18:49:10.231Z dukascopy-node:cli:nodejs v24.15.02026-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 urls2026-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:
DEBUG=dukascopy-node:cli:* npx dukascopy-node -i usdjpy -from 2022-03-21 -to 2022-03-22 -t m1In Node.js
Section titled “In Node.js”Set DEBUG when you start your script:
DEBUG=dukascopy-node:* node download.mjsOn Windows PowerShell, set it first with $env:DEBUG = 'dukascopy-node:*'.
Namespaces
Section titled “Namespaces”| 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.