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

Uploaded Python 3

File details

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

File metadata

  • Download URL: tradedesk_dukascopy-0.1.3.tar.gz
  • Upload date:
  • Size: 85.4 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.3.tar.gz
Algorithm Hash digest
SHA256 290332afd6e3c6e8081f1892dd51bce5d9e8820afa9714b3427799516c174abe
MD5 80df71b5f0d9d4c5e24c096711f78e1b
BLAKE2b-256 872237e552db42b2d1bbebc72e2c22a7e576f404d9e30ef7aaa2885482296bf3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for tradedesk_dukascopy-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0052274e466448737dd56cf9d1176ebdf95c588a62aa977851a18ecbc27bea29
MD5 67cd919781bd9842ec16b4c0f3bddddc
BLAKE2b-256 185eea26af70febf24ea45dc1c91b437093fd55ef4f8ac093f3100b01fde440c

See more details on using hashes here.

Provenance

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