Leo4815162342 /dukascopy-node
✨ Download historical and real-time price tick data for Crypto, Stocks, ETFs, CFDs, Forex via CLI and Node.js ✨
★ 994⑂ 148👁 11⑃ 145● 104▤ 54
+2
Daily
994
stars
148
forks
11
watchers
145
prs
104
issues
54
releases
README
dukascopy-node
✨ Download free historical and real-time market price tick data ✨ Stocks • Crypto • Commodities • Bonds • Currencies • CFDs • ETFs via Node.js and CLI
📚 Documentation
MCP Docs (via Context7 MCP)
🚀 Installation
npm
yarn
pnpm
npm install dukascopy-node --save
yarn add dukascopy-node
pnpm add dukascopy-node
[!IMPORTANT]
Node.js 20 or higher is required.
Browser setup
Downloads may require Chromium or Google Chrome. If Chrome is not installed,
install Chromium once on Windows, macOS, or Linux:
sh
npx dukascopy-node --install-browser
For a project with the package already installed, use
npx dukascopy-node --install-browser. On Linux, add --with-deps to install
required system libraries. Run setup again if an upgrade asks for a newer browser.
The browser runs in the background.
HTTP 403 and browser challenges
An explicit AWS WAF challenge can start browser recovery. A 403 without a
challenge stops the download: no further requests, ordinary retries, or browser
recovery start for it. With the default failAfterRetryCount: true, it raises
DukascopyAccessDeniedError (code: 'DUKASCOPY_ACCESS_DENIED', status: 403,
url, and source, which is 'browser' when the headless browser was refused).
Cached tokens are kept, because a plain 403 does not show that a token is invalid.
The next getHistoricalRates call or CLI run starts fresh.
If this happens, check that Dukascopy's
historical data export page
works in a regular browser, and update dukascopy-node. Reinstalling Chromium or
deleting the token cache does not help with a plain 403. See
issue 264.
✨ Download Historical Price Data via CLI
bash
npx dukascopy-node -i btcusd -from 2019-01-13 -to 2019-01-14 -t tick -f csv
!dukascopy-node-1080p
🛠️ View full CLI specification
---
✨ Download Historical Price Data via Node.js
javascript
const { getHistoricalRates } = require('dukascopy-node');
(async () = {
try {
const data = await getHistoricalRates({
instrument: 'btcusd',
dates: {
from: new Date('2019-01-13'),
to: new Date('2019-01-14')
},
timeframe: 'tick',
format: 'json'
});
console.log(data);
} catch (error) {
console.log('error', error);
}
})();
🛠️ View full Node.js specification
✨ Download Real-Time Price Data via Node.js
javascript
const { getRealTimeRates } = require('dukascopy-node');
(async () = {
try {
const data = await getRealTimeRates({
instrument: 'eurusd',
timeframe: 'tick',
format: 'json'
});
console.log(data);
} catch (error) {
console.log('error', error);
}
})();
ℹ️ More Information
---
📖 Quick start
Basic usage of dukascopy-node
Downloading tick data
Date formatting and converting timezones
Dealing with empty data and errors
Downloading data with cache
DownloadinTop issues
#254Datafeed is timing out (no response)14 comments · 2026-07-07#264Historical data requests fail with HTTP 403 after AWS WAF challenge (v1.51.0)8 comments · 2026-10-27#166Configuration to set Day Start Time4 comments · 2024-02-20#147Feature request: FST and HXT output3 comments · 2023-07-04#137Downloading other timeframes (h2,h3) caused error3 comments · 2023-04-20#222Feature Request: Option to compress outputs2 comments · 2025-11-20#198Feedback on Docs (page`/config/node`)1 comments · 2024-11-04#268GBPUSD Error 4030 comments · 2026-11-25
Discussions
#255Fetch Failed, anyone can help me? thxu1 comments · 2026-07-07#220New Feature - Downloading Real Time Tick Data0 comments · 2025-10-23#215Frequent "Unknown error" with getHistoricalRates — need for better error handling and debugging0 comments · 2025-07-20#208Why candlesticks are being generated ?4 comments · 2025-03-26#197Importing data to mt41 comments · 2024-10-29#188Add support for SOCKS proxy0 comments · 2024-07-11#173Data downloaded, but file is 0kb.1 comments · 2024-04-26#148tickterial1 comments · 2023-07-19
Latest release
v1.51.1 v1.51.1 2026-10-28What's Changed fix: stop retries and browser recovery after plain HTTP 403 by @neodix42 in https://github.com/Leo4815162342/dukascopy-node/pull/265 fix: send export widget headers and tighten 403 handling by @Leo4815162342 in https://github.com/Leo4815162342/dukascopy-node/pull/266 New Contributors @neodix42 made their first contribution in https://github.com/Leo4815162342/dukascopy-node/pull/265 Full Changelog: https://github.com/Leo4815162342/dukascopy-node/compare/v1.51.0...v1.51.1