Skip to content
dukascopy-node

Installation

Install dukascopy-node with npm, pnpm or yarn, then run the CLI once to check that everything works.

Add dukascopy-node to your project. The package includes both the Node.js library and the CLI:

Terminal window
npm install dukascopy-node
Terminal window
pnpm add dukascopy-node
Terminal window
yarn add dukascopy-node

It needs Node.js 20 or later; check your version with node --version. TypeScript types are included, so there is no separate @types package to install.

From your project folder, download a day of hourly EUR/USD candles with the CLI:

Terminal window
npx dukascopy-node -i eurusd -from 2024-01-02 -to 2024-01-03 -t h1 -f csv
Terminal window
pnpm exec dukascopy-node -i eurusd -from 2024-01-02 -to 2024-01-03 -t h1 -f csv
Terminal window
yarn dukascopy-node -i eurusd -from 2024-01-02 -to 2024-01-03 -t h1 -f csv

If the CLI ends with √ File saved: download/eurusd-h1-bid-2024-01-02-2024-01-03.csv and the file size, you are ready to go. See the CLI reference for every option.