Dukascopy tick downloader and candle/tick exporter for backtesting workflows.
Project description
tradedesk-dukascopy
Dukascopy tick downloader and candle exporter for use in backtesting your trading strategies.
This tool downloads raw tick data from Dukascopy, converts it into clean, deterministic CSV candle files, and writes a metadata sidecar describing exactly how the data was produced.
It is designed to be run once per dataset, not repeatedly during backtests.
Quick start
Install:
pip install tradedesk-dukascopy
Export 5-minute candles for EURUSD:
tradedesk-dc-export --symbol EURUSD \
--from 2025-01-01 --to 2025-01-31 \
--out data \
--price-divisor 1000
This produces:
data/
EURUSD_5MIN.csv
EURUSD_5MIN.csv.meta.json
You can now point your backtest engine at the CSV file directly.
Output files
Candle CSV
The CSV file contains OHLCV candles with timestamps in UTC (ISO-8601):
timestamp,open,high,low,close,volume
2025-01-01T00:00:00+00:00,1.10342,1.10361,1.10311,1.10355,1234.0
- Timestamps are always UTC
- Prices are floats after applying the price divisor
- Volume is derived from tick volume (bid / ask / mid, depending on settings)
Metadata sidecar (.meta.json)
Every CSV is accompanied by a metadata file describing how it was generated:
{
"schema_version": "1",
"source": "dukascopy",
"symbol": "EURUSD",
"data_type": "candles",
"timestamp_format": "iso8601_utc",
"price_divisor": 100000.0,
"generated_at": "2026-01-03T12:34:56Z",
"params": {
"resample": "5min",
"side": "bid",
"date_from": "2025-01-01",
"date_to": "2025-01-31"
}
}
This ensures datasets are self-describing and reproducible, even months later.
Price scaling (--price-divisor)
Dukascopy tick prices are stored as integers or scaled values depending on the instrument.
This tool applies price scaling once, at export time, using --price-divisor.
Examples:
| Instrument | Typical divisor |
|---|---|
| EURUSD | 1000 |
| USDJPY | 100000 |
| Indices | 1 or 10 |
If unsure, use probe mode:
tradedesk-dc-export --symbol GBPSEK \
--from 2025-07-01 --to 2025-07-01 \
--probe
Probe mode prints sample ticks at different divisors without writing files.
Intended workflow
This tool is intended to be used as a data preparation step, not as part of your backtest runtime loop:
- Download and export historical data once
- Commit or archive the CSV + metadata
- Run fast, deterministic backtests against local files
Requirements
- Python 3.11+
- Internet access to Dukascopy datafeed
License
Licensed under the Apache License, Version 2.0. See: https://www.apache.org/licenses/LICENSE-2.0
Copyright 2026 Radius Red Ltd.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tradedesk_dukascopy-0.1.0.tar.gz.
File metadata
- Download URL: tradedesk_dukascopy-0.1.0.tar.gz
- Upload date:
- Size: 103.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43a02aa9bfde1e44304a5f695f26efc5acee87832a714d13b31419841e352792
|
|
| MD5 |
865ad34b6b728ca60ea1881e376d927c
|
|
| BLAKE2b-256 |
6cd1e26b6eafa0a68823b090f8a55a38c30a4bb7e68eaddcb8cd721366d1941f
|
Provenance
The following attestation bundles were made for tradedesk_dukascopy-0.1.0.tar.gz:
Publisher:
publish.yml on radiusred/tradedesk-dukascopy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tradedesk_dukascopy-0.1.0.tar.gz -
Subject digest:
43a02aa9bfde1e44304a5f695f26efc5acee87832a714d13b31419841e352792 - Sigstore transparency entry: 839468471
- Sigstore integration time:
-
Permalink:
radiusred/tradedesk-dukascopy@e451ec1eb9cec159b6b9ab0f427151a3c1f7c59e -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/radiusred
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e451ec1eb9cec159b6b9ab0f427151a3c1f7c59e -
Trigger Event:
release
-
Statement type:
File details
Details for the file tradedesk_dukascopy-0.1.0-py3-none-any.whl.
File metadata
- Download URL: tradedesk_dukascopy-0.1.0-py3-none-any.whl
- Upload date:
- Size: 18.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c229509e0727b58498435efd1c4556214ed81b1ca73018b6ee5ecf641c14770
|
|
| MD5 |
22e1cb474de1b4818f291170e6ebe98b
|
|
| BLAKE2b-256 |
335ad7b27b2834bfeb66a35640823841e8cab405e22fc8f37ea70b01fefe8b34
|
Provenance
The following attestation bundles were made for tradedesk_dukascopy-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on radiusred/tradedesk-dukascopy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tradedesk_dukascopy-0.1.0-py3-none-any.whl -
Subject digest:
1c229509e0727b58498435efd1c4556214ed81b1ca73018b6ee5ecf641c14770 - Sigstore transparency entry: 839468577
- Sigstore integration time:
-
Permalink:
radiusred/tradedesk-dukascopy@e451ec1eb9cec159b6b9ab0f427151a3c1f7c59e -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/radiusred
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e451ec1eb9cec159b6b9ab0f427151a3c1f7c59e -
Trigger Event:
release
-
Statement type: