Skip to main content

Dukascopy tick downloader and candle/tick exporter for backtesting workflows.

Project description

tradedesk-dukascopy

CI Build

Dukascopy tick downloader and candle exporter for use in backtesting your trading strategies.

loop

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:

  1. Download and export historical data once
  2. Commit or archive the CSV + metadata
  3. 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

tradedesk_dukascopy-0.1.0.tar.gz (103.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tradedesk_dukascopy-0.1.0-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

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

Hashes for tradedesk_dukascopy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 43a02aa9bfde1e44304a5f695f26efc5acee87832a714d13b31419841e352792
MD5 865ad34b6b728ca60ea1881e376d927c
BLAKE2b-256 6cd1e26b6eafa0a68823b090f8a55a38c30a4bb7e68eaddcb8cd721366d1941f

See more details on using hashes here.

Provenance

The following attestation bundles were made for tradedesk_dukascopy-0.1.0.tar.gz:

Publisher: publish.yml on radiusred/tradedesk-dukascopy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tradedesk_dukascopy-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for tradedesk_dukascopy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1c229509e0727b58498435efd1c4556214ed81b1ca73018b6ee5ecf641c14770
MD5 22e1cb474de1b4818f291170e6ebe98b
BLAKE2b-256 335ad7b27b2834bfeb66a35640823841e8cab405e22fc8f37ea70b01fefe8b34

See more details on using hashes here.

Provenance

The following attestation bundles were made for tradedesk_dukascopy-0.1.0-py3-none-any.whl:

Publisher: publish.yml on radiusred/tradedesk-dukascopy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page