Skip to main content

exness-data-preprocess

Forex tick data preprocessing with ClickHouse backend. Downloads, stores, and queries tick data from Exness public repository.

Data Inventory (Validated 2025-12-28)

Instrument raw_spread_ticks standard_ticks ohlc_1m Date Range
EURUSD 56,687,313 62,203,144 1,466,724 2022-01-02 → 2025-12-26
XAUUSD 166,820,410 167,871,871 1,401,953 2022-01-02 → 2025-12-26

Total: 453.6M ticks, 2.87M OHLC bars in 5.99 GiB

Requirements

  • Python 3.11+
  • ClickHouse running on localhost:8123

Verify ClickHouse

# Check ClickHouse is running
clickhouse client --query "SELECT version()"

# Check exness database exists
clickhouse client --query "SELECT count() FROM exness.raw_spread_ticks"

Installation

# Using uv
uv pip install exness-data-preprocess

# From source
git clone https://github.com/Eon-Labs/exness-data-preprocess.git
cd exness-data-preprocess
uv sync

Python API

import exness_data_preprocess as edp

# Context manager (recommended)
with edp.ExnessDataProcessor() as processor:
    # Query ticks
    df = processor.query_ticks("EURUSD", "raw_spread", "2024-01-01", "2024-01-31")

    # Query OHLC
    df = processor.query_ohlc("EURUSD", "1m", "2024-01-01", "2024-01-31")

    # Get coverage info
    cov = processor.get_data_coverage("EURUSD")

    # Download new data (incremental)
    result = processor.update_data("EURUSD", start_date="2022-01-01")

API Methods

Method Parameters Returns
query_ticks(pair, variant, start_date, end_date) variant: raw_spread or standard DataFrame
query_ohlc(pair, timeframe, start_date, end_date) timeframe: 1m, 5m, 15m, 1h, 4h, 1d DataFrame
get_data_coverage(pair) CoverageInfo
update_data(pair, start_date, delete_zip=True) UpdateResult

Return Models

# UpdateResult
result.months_added  # int: months downloaded
result.raw_ticks_added  # int: raw spread ticks added
result.standard_ticks_added  # int: standard ticks added
result.ohlc_bars  # int: OHLC bars generated
result.storage_bytes  # int: storage used

# CoverageInfo
cov.raw_spread_ticks  # int: total raw spread ticks
cov.standard_ticks  # int: total standard ticks
cov.ohlc_bars  # int: total OHLC bars
cov.earliest_date  # str: earliest timestamp
cov.latest_date  # str: latest timestamp
cov.storage_bytes  # int: storage used

Direct SQL Access

# Count ticks
clickhouse client --query "SELECT count() FROM exness.raw_spread_ticks WHERE instrument='EURUSD'"

# Query tick data
clickhouse client --query "
SELECT timestamp, bid, ask
FROM exness.raw_spread_ticks
WHERE instrument='EURUSD'
  AND timestamp >= '2024-01-01'
  AND timestamp < '2024-01-02'
LIMIT 10"

# Query OHLC
clickhouse client --query "
SELECT timestamp, open, high, low, close
FROM exness.ohlc_1m
WHERE instrument='EURUSD'
  AND timestamp >= '2024-01-01'
LIMIT 10"

# Resample to 1h
clickhouse client --query "
SELECT
    toStartOfHour(timestamp) AS ts,
    argMin(open, timestamp) AS open,
    max(high) AS high,
    min(low) AS low,
    argMax(close, timestamp) AS close
FROM exness.ohlc_1m
WHERE instrument='EURUSD' AND timestamp >= '2024-01-01'
GROUP BY ts
ORDER BY ts"

Schema

Tick Tables

exness.raw_spread_ticks, exness.standard_ticks:

Column Type Codec
instrument LowCardinality(String) -
timestamp DateTime64(6, 'UTC') DoubleDelta, LZ4
bid Float64 Gorilla, ZSTD
ask Float64 Gorilla, ZSTD

OHLC Table

exness.ohlc_1m (27 columns):

Category Columns
Core instrument, timestamp, open, high, low, close
Spreads raw_spread_avg, standard_spread_avg
Tick counts tick_count_raw_spread, tick_count_standard
Timezone ny_hour, london_hour, ny_session, london_session
Holidays is_us_holiday, is_uk_holiday, is_major_holiday
Sessions is_nyse_session, is_lse_session, is_xswx_session, is_xfra_session, is_xtse_session, is_xnze_session, is_xtks_session, is_xasx_session, is_xhkg_session, is_xses_session

Engine: ReplacingMergeTree (automatic deduplication)

Partition: toYYYYMM(timestamp)

Order: (instrument, timestamp)

Data Source

  • URL: https://ticks.ex2archive.com/
  • Format: Monthly ZIP files with CSV tick data
  • Variants: Raw_Spread (zero spreads) + Standard (market spreads)
  • Precision: Microsecond timestamps

Development

# Setup
uv sync --dev

# Test
uv run pytest

# Lint
uv run ruff check --fix .

# Type check
uv run mypy src/

Documentation

License

MIT

Metadata

Release files for exness-data-preprocess 3.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for exness-data-preprocess 3.0.1
File Size Uploaded Provenance Actions
exness_data_preprocess-3.0.1.tar.gz 1.5 MB With provenance Details for exness_data_preprocess-3.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for exness-data-preprocess 3.0.1
File Interpreter ABI Platform Actions
exness_data_preprocess-3.0.1-py3-none-any.whl Python 3 none any Details for exness_data_preprocess-3.0.1-py3-none-any.whl

Total release size: 1.5 MB

Release files / exness_data_preprocess-3.0.1.tar.gz

Download URL exness_data_preprocess-3.0.1.tar.gz
Size 1.5 MB
Tags Source
SHA-256 checksum
How to use checksums
25450f7e5760243e1ec7194a873848e924ca0b8f02345395563201dfffa39af6
BLAKE2b-256 checksum
How to use checksums
613e95229061fbd615d8db2ccfc6bee1684795190bac8641cb37ed28c1663362
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Release files / exness_data_preprocess-3.0.1-py3-none-any.whl

Download URL exness_data_preprocess-3.0.1-py3-none-any.whl
Size 46.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e9cd3174d01a45e66bb7ca5ef4d1412b4fb6e8eb3adb496651e9c7addf315f02
BLAKE2b-256 checksum
How to use checksums
4f832e010ea1a22f88c578d56823eef33d87e64b3bd9908c05cee403cf785b58
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Security for exness-data-preprocess 3.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for exness_data_preprocess-3.0.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page