Skip to content

Add CryptoHFTData historical data provider#3

Open
hmate9 wants to merge 1 commit into
PFund-Software-Ltd:mainfrom
hmate9:feature/cryptohftdata-provider
Open

Add CryptoHFTData historical data provider#3
hmate9 wants to merge 1 commit into
PFund-Software-Ltd:mainfrom
hmate9:feature/cryptohftdata-provider

Conversation

@hmate9

@hmate9 hmate9 commented Jul 13, 2026

Copy link
Copy Markdown

Summary

Adds CryptoHFTData as a first-class historical market-data provider in PFeed.

  • adds pe.CryptoHFTData() / pe.CHD() clients and DataSource.CRYPTO_HFT_DATA
  • uses the official optional SDK via pfeed[cryptohftdata], including keyless free-tier access
  • exposes exchange and symbol discovery
  • downloads venue-specific historical trades as PFeed ticks
  • resamples trades through PFeed's existing pipeline into second, minute, hour, and daily bars
  • includes the upstream exchange in product identity and data_origin so venues never collide in storage
  • supports CRYPTOHFTDATA_API_KEY, CRYPTO_HFT_DATA_API_KEY, and CHD_API_KEY
  • adds focused tests, usage documentation, a runnable script, and a notebook

CryptoHFTData also provides order-book history. That is deliberately not exposed in this change because PFeed's quote/order-book validation and resampling path is currently marked unsupported; the integration should not imply semantic support that PFeed cannot yet preserve end to end.

Disclosure: I am the creator of CryptoHFTData.

Validation

  • ruff check --config ./afterpython/ruff.toml .
  • ruff format --check --config ./afterpython/ruff.toml .
  • pytest tests/unit/crypto_hft_data tests/unit/test_etl.py tests/unit/test_resampling.py -q (5 passed)
  • Pyright on the new provider modules and tests (0 errors)
  • uv build
  • keyless live download through the public PFeed API: KAVAUSDT on binance_futures, 2026-07-11; 15,699 trades were transformed into 1,214 one-minute bars covering 00:00 through 23:59

The repository's full legacy unit suite currently has unrelated collection failures from removed pfeed.data_tools modules and undeclared Dask dependencies. This change also updates the shared logging fixture to call the current configure_logging() API so maintained tests can initialize correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant