How giuse88/duka works
duka is a terminal downloader for Dukascopy historical Forex and related market data. A user supplies symbols, dates, and output options; the CLI validates them and hands the request to an application coordinator, which schedules per-symbol/day work, fetches hourly feed data, decodes it into ticks, optionally aggregates candles, and writes CSV files. The README also highlights concurrent downloads, multiple symbols, and progress estimates. Source excerpts show the fetch, processing, and output implementations; relationships to unsampled code are omitted.
Main entry points: app.py Download coordinator · main.py CLI entry · csv_dumper.py CSV dumper · fetch.py Hourly fetch
Components 13
CLI and coordination
- CLI entry
duka/main.py - Date and options
duka/core/utils.py - Download coordinator
duka/app/app.py - Progress estimates
duka/app/app.py
Download and decoding
- Hourly fetch
duka/core/fetch.py - Decode and normalize
duka/core/processor.py
Market data formatting
- Normalized ticks
duka/core/processor.py - Candle aggregation
duka/core/csv_dumper.py - Candle values
duka/core/candle.py
CSV output
- CSV dumper
duka/core/csv_dumper.py
Other components
- Terminal user
- Dukascopy feed
- Output folder
Connections 13
- Terminal user → CLI entry: supplies options
- CLI entry → Date and options: validates dates
- CLI entry → Date and options: validates timeframe
- CLI entry → Download coordinator: starts download
- Download coordinator → Hourly fetch: fetches each day
- Hourly fetch → Dukascopy feed: requests hourly data
- Download coordinator → Decode and normalize: decodes response
- Decode and normalize → Normalized ticks: produces ticks
- Download coordinator → CSV dumper: appends day data
- CSV dumper → Candle aggregation: aggregates timeframe
- Candle aggregation → Candle values: creates candles
- CSV dumper → Output folder: writes CSV
- Download coordinator → Progress estimates: updates estimates