Skip to main content

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

Project description

tradedesk-dukascopy

CI Build PyPI Version

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.2.tar.gz (25.1 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.2-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

Details for the file tradedesk_dukascopy-0.1.2.tar.gz.

File metadata

  • Download URL: tradedesk_dukascopy-0.1.2.tar.gz
  • Upload date:
  • Size: 25.1 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.2.tar.gz
Algorithm Hash digest
SHA256 033b7e3c3cd152997fcc0490a4f6c6ff8e51e804893e70a4c577e6aa2d0279fc
MD5 c95d9e1ab53253f833aa3d030678c836
BLAKE2b-256 3eda2fe93eb42bf43ad6e77aac321b7b17ebd2825b0e5e597b78152947c15800

See more details on using hashes here.

Provenance

The following attestation bundles were made for tradedesk_dukascopy-0.1.2.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.2-py3-none-any.whl.

File metadata

File hashes

Hashes for tradedesk_dukascopy-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c42e374b81d97fd3abbae0606579be5a6e176408927fd43c3a69c50b98b31f49
MD5 fe03eb28b0d8d63c564151eb9e2966da
BLAKE2b-256 9dec2b22c6818d2995e0adbe780dd871fe01e7f3fdf3cdb77f1cafe043edd713

See more details on using hashes here.

Provenance

The following attestation bundles were made for tradedesk_dukascopy-0.1.2-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