ml4t-data 0.3.0__tar.gz → 0.3.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/PKG-INFO +2 -2
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/pyproject.toml +1 -1
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/_version.py +2 -2
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/config/models.py +1 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/providers/__init__.py +2 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/providers/base.py +8 -2
- ml4t_data-0.3.1/src/ml4t/data/providers/coinmetrics.py +233 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/providers/polymarket.py +100 -105
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/providers/registry.py +9 -0
- ml4t_data-0.3.1/tests/fixtures/coinmetrics_candles.json +33 -0
- ml4t_data-0.3.1/tests/providers/fixtures/polymarket/data_api_v2_trades.json +304 -0
- ml4t_data-0.3.1/tests/providers/test_coinmetrics_acquisition.py +352 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/providers/test_polymarket_history.py +55 -44
- ml4t_data-0.3.1/tests/providers/test_polymarket_v2.py +124 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_async_rate_limit.py +31 -23
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/.gitignore +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/LICENSE +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/README.md +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/scripts/verify_distribution.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/scripts/verify_provider_contract_runs.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/AGENTS.md +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/adjustments/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/adjustments/_history_factors.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/adjustments/core.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/adjustments/history.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/adjustments/inputs.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/anomaly/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/anomaly/base.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/anomaly/config.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/anomaly/detectors.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/anomaly/manager.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/assets/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/assets/asset_class.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/assets/contracts.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/assets/data/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/assets/data/crypto_top100.json +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/assets/data/forex_majors.json +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/assets/data/nasdaq100.json +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/assets/data/sp500.json +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/assets/registry.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/assets/schemas.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/assets/validation.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/calendar/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/calendar/crypto.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/cli/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/cli/batch.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/cli/config.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/cli/core.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/cli/cot.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/cli/futures.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/cli/utils.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/cli_interface.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/compat/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/compat/empyrical.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/compat/zipline.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/config/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/config/_serialization.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/config/loader.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/config/validator.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/core/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/core/config.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/core/exceptions.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/core/feeds.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/core/models.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/core/revisions.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/core/schemas.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/cot/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/cot/fetcher.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/cot/workflow.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/crypto/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/crypto/downloader.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/data_manager.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/etfs/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/etfs/downloader.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/export/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/export/formats/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/export/formats/base.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/export/formats/csv.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/export/formats/excel.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/export/formats/json.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/export/manager.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/futures/AGENTS.md +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/futures/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/futures/adjustment.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/futures/book_downloader.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/futures/config.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/futures/continuous.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/futures/continuous_downloader.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/futures/databento_parser.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/futures/definitions.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/futures/downloader.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/futures/individual_downloader.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/futures/inputs.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/futures/parser.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/futures/roll.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/futures/schema.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/macro/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/macro/downloader.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/managers/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/managers/async_batch.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/managers/batch_manager.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/managers/bulk_manager.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/managers/config_manager.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/managers/fetch_manager.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/managers/metadata_manager.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/managers/provider_manager.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/managers/storage_manager.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/provider_updater.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/providers/AGENTS.md +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/providers/alpaca.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/providers/aqr.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/providers/async_base.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/providers/binance.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/providers/binance_public.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/providers/coingecko.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/providers/cryptocompare.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/providers/databento.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/providers/eodhd.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/providers/fama_french.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/providers/finnhub.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/providers/forecastex.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/providers/fred.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/providers/fundamentals.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/providers/fxmacrodata.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/providers/kalshi.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/providers/learned_synthetic.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/providers/mixins/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/providers/mixins/async_session.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/providers/mixins/circuit_breaker.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/providers/mixins/rate_limit.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/providers/mixins/retry.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/providers/mixins/session.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/providers/mixins/validation.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/providers/mock.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/providers/nasdaq_itch.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/providers/oanda.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/providers/okx.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/providers/polygon.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/providers/polymarket_us.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/providers/prediction_markets.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/providers/protocols.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/providers/synthetic.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/providers/tiingo.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/providers/twelve_data.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/providers/wiki_prices.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/providers/yahoo.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/py.typed +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/security/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/security/path_validator.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/sessions/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/sessions/_cme_crypto.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/sessions/assigner.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/sessions/completer.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/storage/AGENTS.md +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/storage/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/storage/_temporal.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/storage/async_base.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/storage/backend.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/storage/chunked.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/storage/config.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/storage/data_profile.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/storage/flat.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/storage/hive.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/storage/keys.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/storage/legacy_migration.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/storage/metadata_tracker.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/storage/migration.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/storage/protocols.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/storage/snapshot.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/synthetic/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/synthetic/ohlcv_utils.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/synthetic/registry.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/universe.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/update_manager.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/utils/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/utils/async_rate_limit.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/utils/atomic.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/utils/conversion.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/utils/format.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/utils/gap_optimizer.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/utils/gaps.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/utils/global_rate_limit.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/utils/locking.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/utils/rate_limit.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/utils/retry.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/validation/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/validation/base.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/validation/cross_validation.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/validation/ohlcv.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/validation/report.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/src/ml4t/data/validation/rules.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/_zipline_bundle_fixture.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/anomaly/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/anomaly/test_base.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/anomaly/test_config.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/anomaly/test_detectors.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/anomaly/test_manager.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/assets/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/assets/test_asset_class.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/assets/test_contracts.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/assets/test_schemas.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/assets/test_validation.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/conftest.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/core/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/core/test_schemas.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/cot/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/cot/test_fetcher.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/cot/test_workflow.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/fixtures/acquisition/F-F_Momentum_Factor_CSV.zip +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/fixtures/acquisition/F-F_Momentum_Factor_daily_CSV.zip +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/fixtures/acquisition/F-F_Research_Data_5_Factors_2x3_daily_CSV.zip +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/fixtures/acquisition/F-F_Research_Data_Factors_CSV.zip +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/fixtures/acquisition/F-F_Research_Data_Factors_daily_CSV.zip +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/fixtures/acquisition/famafrench-provider-response.json +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/fixtures/acquisition/fred-dgs3mo.csv +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/fixtures/acquisition/provenance.json +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/fixtures/acquisition/yahoo-adjustment-provider.json +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/fixtures/acquisition/yahoo-dst-provider.json +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/futures/test_adjustment.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/futures/test_book_downloader.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/futures/test_continuous.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/futures/test_databento_parser.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/futures/test_downloader.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/futures/test_parser.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/futures/test_prepared_inputs.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/futures/test_roll.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/futures/test_scheduled_roll_workflow.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/integration/conftest.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/integration/test_alpaca.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/integration/test_binance_public.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/integration/test_coingecko.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/integration/test_cryptocompare.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/integration/test_eodhd.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/integration/test_factor_providers.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/integration/test_finnhub.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/integration/test_forecastex.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/integration/test_fred.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/integration/test_fxmacrodata.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/integration/test_kalshi.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/integration/test_oanda.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/integration/test_polygon.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/integration/test_polymarket.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/integration/test_polymarket_us.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/integration/test_real_api_integration.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/integration/test_release_provider_contracts.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/integration/test_tiingo.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/integration/test_twelve_data.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/integration/test_wiki_prices.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/integration/test_yahoo.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/providers/conftest.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/providers/fixtures/polymarket/clob_prices_history.json +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/providers/fixtures/polymarket/data_api_trades.json +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/providers/fixtures/polymarket/gamma_keyset_active.json +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/providers/fixtures/polymarket/gamma_keyset_closed.json +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/providers/test_forecastex_provider.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/providers/test_kalshi_history.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/providers/test_nasdaq_itch.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/providers/test_polymarket_us_provider.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/storage/test_data_profile.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/storage/test_keys.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/storage/test_legacy_migration.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/storage/test_metadata_tracker.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/storage/test_migration.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/synthetic/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/synthetic/test_learned_synthetic.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/synthetic/test_registry.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_acquisition_atomic_flush.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_acquisition_migration.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_acquisition_warning_contract.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_action_inputs.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_adjusted_history.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_adjustments_core.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_alpaca_provider.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_anomaly/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_anomaly/test_detectors.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_anomaly/test_manager.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_aqr_provider.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_aqr_provider_edge_cases.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_async_providers.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_async_providers_extended.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_base_provider_enhanced.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_batch_load.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_batch_load_integration.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_batch_load_performance.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_binance.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_binance_public_edge_cases.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_binance_public_provider.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_calendar_backfill_ranges.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_calendar_frame_bounds.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_chunked_storage.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_cli_batch.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_cli_interface.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_cme_crypto_cutover.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_coingecko_provider.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_config.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_config_basics.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_config_integration.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_config_loader.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_config_models.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_config_validator.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_configuration_authority.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_conversion.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_core_abstractions.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_core_models.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_cot.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_crypto_assets.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_crypto_downloader.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_cryptocompare.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_cryptocompare_provider.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_daily_session_gaps.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_daily_timestamp_declarations.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_data_manager.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_data_manager_storage.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_data_manager_unit.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_data_manager_universe.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_databento_acceptance.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_databento_provider.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_dated_inputs.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_distribution_verification.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_eodhd_provider.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_etf_downloader.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_exceptions.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_export.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_fama_french_provider.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_finnhub_provider.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_fred_unit.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_fundamentals_providers.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_fxmacrodata_provider.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_gap_optimizer.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_gaps.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_global_rate_limit.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_global_rate_limiting.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_history_factors.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_history_identity.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_hive_storage.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_import.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_incremental_update_system.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_ingestion_calendar_declarations.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_intraday_schedule_gaps.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_kalshi_unit.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_locking.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_macro_downloader.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_market_input_handoff.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_metadata_tracker.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_mock_provider.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_mock_provider_enhanced.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_multi_asset.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_oanda_provider.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_offline_network_policy.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_okx_provider.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_package_metadata.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_polygon_provider.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_polymarket_unit.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_portable_snapshot.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_portable_snapshot_example.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_preserve_market_absences.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_provider_consistency.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_provider_contract_verification.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_provider_registration.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_provider_registry_contract.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_provider_tls_trust.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_provider_updater.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_rate_limit.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_regenerate_combined.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_release_pipeline.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_release_workflows.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_retry.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_security.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_session_calendar_contract.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_sessions.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_simple_utils.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_source_reference_contract.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_storage.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_storage_backends.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_storage_config_authority.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_storage_migration.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_storage_paths.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_stored_gap_report.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_synthetic_provider.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_targeted_databento_acquisition.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_tiingo_provider.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_twelve_data_provider.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_universe.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_update_manager.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_update_provider_reuse.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_utils_gaps.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_validation.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_validation_calendar_contract.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_validation_report.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_validation_rules.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_validation_simple.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_validation_unit.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_wiki_prices_provider.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_yahoo_empty_download_reporting.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_yahoo_provider.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_yahoo_provider_edge_cases.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_yahoo_provider_unit.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/test_zipline_bundle_exchange.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/utils/test_format.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/utils/test_format_integration.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/validation/test_cross_validation.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/validation/test_ohlcv_validator.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/validation/test_report.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.3.1}/tests/validation/test_rules.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: ml4t-data
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.1
|
|
4
4
|
Summary: Market data acquisition, storage, and update workflows for machine learning for trading.
|
|
5
5
|
Project-URL: Homepage, https://www.ml4trading.io/
|
|
6
6
|
Project-URL: Documentation, https://www.ml4trading.io/docs/data/
|
|
@@ -31,7 +31,7 @@ Requires-Python: <3.15,>=3.12
|
|
|
31
31
|
Requires-Dist: aiofiles>=23.0.0
|
|
32
32
|
Requires-Dist: certifi>=2026.10.19
|
|
33
33
|
Requires-Dist: click>=8.0.0
|
|
34
|
-
Requires-Dist: filelock>=
|
|
34
|
+
Requires-Dist: filelock>=4.2.1
|
|
35
35
|
Requires-Dist: httpx>=0.25.0
|
|
36
36
|
Requires-Dist: ml4t-specs>=0.2.0
|
|
37
37
|
Requires-Dist: numpy>=1.24.0
|
|
@@ -96,7 +96,7 @@ dependencies = [
|
|
|
96
96
|
# Utilities
|
|
97
97
|
"structlog>=23.0.0",
|
|
98
98
|
"platformdirs>=4.0.0",
|
|
99
|
-
"filelock>=
|
|
99
|
+
"filelock>=4.2.1",
|
|
100
100
|
"rich>=13.0.0",
|
|
101
101
|
"aiofiles>=23.0.0", # Async file I/O for async storage backends
|
|
102
102
|
# Exchange calendars for session-aware operations
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '0.3.
|
|
22
|
-
__version_tuple__ = version_tuple = (0, 3,
|
|
21
|
+
__version__ = version = '0.3.1'
|
|
22
|
+
__version_tuple__ = version_tuple = (0, 3, 1)
|
|
23
23
|
|
|
24
24
|
__commit_id__ = commit_id = None
|
|
@@ -86,6 +86,7 @@ except ImportError:
|
|
|
86
86
|
|
|
87
87
|
# Crypto providers
|
|
88
88
|
from ml4t.data.providers.coingecko import CoinGeckoProvider
|
|
89
|
+
from ml4t.data.providers.coinmetrics import CoinMetricsProvider
|
|
89
90
|
|
|
90
91
|
try:
|
|
91
92
|
from ml4t.data.providers.binance import BinanceProvider
|
|
@@ -165,6 +166,7 @@ __all__ = [
|
|
|
165
166
|
"ForecastExProvider",
|
|
166
167
|
# Crypto providers
|
|
167
168
|
"CoinGeckoProvider",
|
|
169
|
+
"CoinMetricsProvider",
|
|
168
170
|
"BinanceProvider",
|
|
169
171
|
"BinancePublicProvider",
|
|
170
172
|
"OKXProvider",
|
|
@@ -33,6 +33,7 @@ from __future__ import annotations
|
|
|
33
33
|
|
|
34
34
|
import math
|
|
35
35
|
import os
|
|
36
|
+
import sys
|
|
36
37
|
from abc import ABC, abstractmethod
|
|
37
38
|
from typing import Any, ClassVar
|
|
38
39
|
|
|
@@ -213,9 +214,14 @@ class BaseProvider(
|
|
|
213
214
|
self.logger.debug(message)
|
|
214
215
|
|
|
215
216
|
def __del__(self) -> None:
|
|
216
|
-
"""
|
|
217
|
+
"""Clean up sessions without logging callbacks during interpreter teardown."""
|
|
217
218
|
try:
|
|
218
|
-
|
|
219
|
+
if sys.is_finalizing():
|
|
220
|
+
session = getattr(self, "session", None)
|
|
221
|
+
if session is not None:
|
|
222
|
+
session.close()
|
|
223
|
+
else:
|
|
224
|
+
self.close()
|
|
219
225
|
except Exception:
|
|
220
226
|
pass
|
|
221
227
|
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
"""Coin Metrics spot-market candles with exact, half-open timestamp requests."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import os
|
|
6
|
+
import re
|
|
7
|
+
from datetime import UTC, datetime, timedelta
|
|
8
|
+
from math import isfinite
|
|
9
|
+
from typing import Any, ClassVar
|
|
10
|
+
|
|
11
|
+
import httpx
|
|
12
|
+
import polars as pl
|
|
13
|
+
|
|
14
|
+
from ml4t.data.core.exceptions import (
|
|
15
|
+
AuthenticationError,
|
|
16
|
+
DataValidationError,
|
|
17
|
+
NetworkError,
|
|
18
|
+
RateLimitError,
|
|
19
|
+
)
|
|
20
|
+
from ml4t.data.providers.base import BaseProvider
|
|
21
|
+
from ml4t.data.providers.protocols import ProviderCapabilities
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class CoinMetricsProvider(BaseProvider):
|
|
25
|
+
"""Fetch real candles for one explicit Coin Metrics spot-market identifier.
|
|
26
|
+
|
|
27
|
+
Account entitlements determine available markets, frequencies and history. An empty
|
|
28
|
+
response never authorizes filling a no-trade interval with manufactured observations.
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
DEFAULT_RATE_LIMIT: ClassVar[tuple[int, float]] = (60, 60.0)
|
|
32
|
+
FREQUENCIES: ClassVar[dict[str, str]] = {
|
|
33
|
+
"minute": "1m",
|
|
34
|
+
"1min": "1m",
|
|
35
|
+
"1m": "1m",
|
|
36
|
+
"5min": "5m",
|
|
37
|
+
"5minute": "5m",
|
|
38
|
+
"5m": "5m",
|
|
39
|
+
"10min": "10m",
|
|
40
|
+
"10m": "10m",
|
|
41
|
+
"15min": "15m",
|
|
42
|
+
"15minute": "15m",
|
|
43
|
+
"15m": "15m",
|
|
44
|
+
"30min": "30m",
|
|
45
|
+
"30minute": "30m",
|
|
46
|
+
"30m": "30m",
|
|
47
|
+
"hour": "1h",
|
|
48
|
+
"hourly": "1h",
|
|
49
|
+
"1hour": "1h",
|
|
50
|
+
"1h": "1h",
|
|
51
|
+
"4h": "4h",
|
|
52
|
+
"daily": "1d",
|
|
53
|
+
"1day": "1d",
|
|
54
|
+
"1d": "1d",
|
|
55
|
+
}
|
|
56
|
+
PATH: ClassVar[str] = "/v4/timeseries/market-candles"
|
|
57
|
+
|
|
58
|
+
def __init__(
|
|
59
|
+
self,
|
|
60
|
+
api_key: str | None = None,
|
|
61
|
+
rate_limit: tuple[int, float] | None = None,
|
|
62
|
+
page_size: int = 1000,
|
|
63
|
+
) -> None:
|
|
64
|
+
self.api_key = api_key or os.getenv("COINMETRICS_API_KEY")
|
|
65
|
+
if not 1 <= page_size <= 10000:
|
|
66
|
+
raise ValueError("page_size must be between 1 and 10000")
|
|
67
|
+
self.page_size = page_size
|
|
68
|
+
self.base_url = (
|
|
69
|
+
"https://api.coinmetrics.io" if self.api_key else "https://community-api.coinmetrics.io"
|
|
70
|
+
)
|
|
71
|
+
super().__init__(rate_limit=rate_limit or self.DEFAULT_RATE_LIMIT)
|
|
72
|
+
|
|
73
|
+
@property
|
|
74
|
+
def name(self) -> str:
|
|
75
|
+
return "coinmetrics"
|
|
76
|
+
|
|
77
|
+
def capabilities(self) -> ProviderCapabilities:
|
|
78
|
+
return ProviderCapabilities(
|
|
79
|
+
supports_intraday=True,
|
|
80
|
+
supports_crypto=True,
|
|
81
|
+
requires_api_key=True,
|
|
82
|
+
rate_limit=self.DEFAULT_RATE_LIMIT,
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
def _classify_error_response(self, response: httpx.Response) -> Exception | None:
|
|
86
|
+
if response.status_code in (401, 403):
|
|
87
|
+
return AuthenticationError(
|
|
88
|
+
self.name, "Market candles require authorized account access"
|
|
89
|
+
)
|
|
90
|
+
if response.status_code >= 400 and response.status_code not in (404, 429):
|
|
91
|
+
return NetworkError(
|
|
92
|
+
self.name,
|
|
93
|
+
f"HTTP {response.status_code} for market candles",
|
|
94
|
+
retryable=response.status_code >= 500,
|
|
95
|
+
)
|
|
96
|
+
return None
|
|
97
|
+
|
|
98
|
+
def _fetch_and_transform_data(
|
|
99
|
+
self, symbol: str, start: str, end: str, frequency: str = "daily"
|
|
100
|
+
) -> pl.DataFrame:
|
|
101
|
+
return self.fetch_ohlcv_range(
|
|
102
|
+
symbol,
|
|
103
|
+
datetime.fromisoformat(start).replace(tzinfo=UTC),
|
|
104
|
+
datetime.fromisoformat(end).replace(tzinfo=UTC) + timedelta(days=1),
|
|
105
|
+
frequency,
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
def fetch_ohlcv_range(
|
|
109
|
+
self, symbol: str, start: datetime, end: datetime, frequency: str = "minute"
|
|
110
|
+
) -> pl.DataFrame:
|
|
111
|
+
"""Return observed candles in [start, end), preserving the exact spot market.
|
|
112
|
+
|
|
113
|
+
Bounds must be aware instants. Candle starts use UTC, left labels, a UTC-midnight
|
|
114
|
+
grid and no custom daily offset. Requests never expand a ticker into a universe.
|
|
115
|
+
"""
|
|
116
|
+
if not re.fullmatch(r"[a-z0-9_.]+-[a-z0-9_.]+-[a-z0-9_.]+-spot", symbol):
|
|
117
|
+
raise ValueError(
|
|
118
|
+
"symbol must name one exact lower-case exchange-base-quote-spot market"
|
|
119
|
+
)
|
|
120
|
+
if (
|
|
121
|
+
start.tzinfo is None
|
|
122
|
+
or end.tzinfo is None
|
|
123
|
+
or start.utcoffset() is None
|
|
124
|
+
or end.utcoffset() is None
|
|
125
|
+
):
|
|
126
|
+
raise ValueError("timestamp bounds must be timezone-aware")
|
|
127
|
+
start, end = start.astimezone(UTC), end.astimezone(UTC)
|
|
128
|
+
if start >= end:
|
|
129
|
+
raise ValueError("start must be before end")
|
|
130
|
+
try:
|
|
131
|
+
native_frequency = self.FREQUENCIES[frequency]
|
|
132
|
+
except KeyError as error:
|
|
133
|
+
raise ValueError(f"Unsupported market-candle frequency: {frequency}") from error
|
|
134
|
+
params: dict[str, Any] = {
|
|
135
|
+
"markets": symbol,
|
|
136
|
+
"frequency": native_frequency,
|
|
137
|
+
"start_time": start.isoformat(),
|
|
138
|
+
"end_time": end.isoformat(),
|
|
139
|
+
"start_inclusive": "true",
|
|
140
|
+
"end_inclusive": "false",
|
|
141
|
+
"timezone": "UTC",
|
|
142
|
+
"paging_from": "start",
|
|
143
|
+
"page_size": self.page_size,
|
|
144
|
+
}
|
|
145
|
+
if self.api_key:
|
|
146
|
+
params["api_key"] = self.api_key
|
|
147
|
+
url = f"{self.base_url}{self.PATH}"
|
|
148
|
+
fixed_params = dict(params)
|
|
149
|
+
seen: set[str] = set()
|
|
150
|
+
rows: dict[datetime, tuple[Any, ...]] = {}
|
|
151
|
+
while True:
|
|
152
|
+
try:
|
|
153
|
+
payload = self._request_json(url, resource=symbol, params=params)
|
|
154
|
+
except RateLimitError:
|
|
155
|
+
raise
|
|
156
|
+
except NetworkError as error:
|
|
157
|
+
raise NetworkError(
|
|
158
|
+
self.name,
|
|
159
|
+
"Market-candle request failed",
|
|
160
|
+
retryable=error.retryable,
|
|
161
|
+
retry_after=error.retry_after,
|
|
162
|
+
) from None
|
|
163
|
+
data = payload.get("data")
|
|
164
|
+
if not isinstance(data, list):
|
|
165
|
+
raise DataValidationError(self.name, "Market candles response requires a data list")
|
|
166
|
+
for record in data:
|
|
167
|
+
try:
|
|
168
|
+
if not isinstance(record, dict) or record["market"] != symbol:
|
|
169
|
+
raise ValueError("response market differs from requested market")
|
|
170
|
+
timestamp = datetime.fromisoformat(record["time"].replace("Z", "+00:00"))
|
|
171
|
+
if timestamp.utcoffset() != timedelta(0):
|
|
172
|
+
raise ValueError("response timestamp must use UTC")
|
|
173
|
+
numbers = tuple(
|
|
174
|
+
float(record[key])
|
|
175
|
+
for key in (
|
|
176
|
+
"price_open",
|
|
177
|
+
"price_high",
|
|
178
|
+
"price_low",
|
|
179
|
+
"price_close",
|
|
180
|
+
"volume",
|
|
181
|
+
)
|
|
182
|
+
)
|
|
183
|
+
if not all(isfinite(value) for value in numbers):
|
|
184
|
+
raise ValueError("non-finite candle value")
|
|
185
|
+
except (KeyError, TypeError, ValueError, AttributeError) as error:
|
|
186
|
+
raise DataValidationError(
|
|
187
|
+
self.name, f"Malformed market candle: {error}"
|
|
188
|
+
) from error
|
|
189
|
+
if start <= timestamp < end:
|
|
190
|
+
row = (timestamp, symbol.upper(), *numbers)
|
|
191
|
+
if timestamp in rows and rows[timestamp] != row:
|
|
192
|
+
raise DataValidationError(self.name, "Conflicting duplicate market candle")
|
|
193
|
+
rows[timestamp] = row
|
|
194
|
+
next_url = payload.get("next_page_url")
|
|
195
|
+
if next_url is None:
|
|
196
|
+
if payload.get("next_page_token"):
|
|
197
|
+
raise DataValidationError(self.name, "Continuation token without next_page_url")
|
|
198
|
+
break
|
|
199
|
+
if not isinstance(next_url, str) or not next_url:
|
|
200
|
+
raise DataValidationError(self.name, "Malformed next_page_url")
|
|
201
|
+
try:
|
|
202
|
+
next_page = httpx.URL(next_url)
|
|
203
|
+
except httpx.InvalidURL:
|
|
204
|
+
raise DataValidationError(self.name, "Malformed next_page_url") from None
|
|
205
|
+
origin = httpx.URL(self.base_url)
|
|
206
|
+
if (
|
|
207
|
+
(next_page.scheme, next_page.host, next_page.port, next_page.path)
|
|
208
|
+
!= (origin.scheme, origin.host, origin.port, self.PATH)
|
|
209
|
+
or next_page.userinfo
|
|
210
|
+
or next_page.fragment
|
|
211
|
+
):
|
|
212
|
+
raise DataValidationError(self.name, "Unsafe market-candle continuation URL")
|
|
213
|
+
page_params = dict(next_page.params)
|
|
214
|
+
if set(page_params) - set(fixed_params) - {"next_page_token"}:
|
|
215
|
+
raise DataValidationError(self.name, "Unexpected continuation parameters")
|
|
216
|
+
for key, value in fixed_params.items():
|
|
217
|
+
values = next_page.params.get_list(key)
|
|
218
|
+
if values and values != [str(value)]:
|
|
219
|
+
raise DataValidationError(self.name, "Continuation changed a request filter")
|
|
220
|
+
token = page_params.get("next_page_token")
|
|
221
|
+
if not token or len(next_page.params.get_list("next_page_token")) != 1:
|
|
222
|
+
raise DataValidationError(self.name, "Continuation URL has no unique page token")
|
|
223
|
+
if token in seen:
|
|
224
|
+
raise DataValidationError(self.name, "Market-candle page repeated")
|
|
225
|
+
seen.add(token)
|
|
226
|
+
# Reapply original bounds even when the server's continuation link omits them.
|
|
227
|
+
params = {**fixed_params, "next_page_token": token}
|
|
228
|
+
if not rows:
|
|
229
|
+
return self._create_empty_dataframe()
|
|
230
|
+
frame = pl.DataFrame(list(rows.values()), schema=self.CANONICAL_SCHEMA, orient="row").sort(
|
|
231
|
+
"timestamp"
|
|
232
|
+
)
|
|
233
|
+
return self._validate_ohlcv(frame, self.name, symbol)
|
|
@@ -174,9 +174,8 @@ class PolymarketProvider(BaseProvider):
|
|
|
174
174
|
# GET /prices-history rejects a startTs..endTs span longer than 15 days (HTTP 400).
|
|
175
175
|
PRICE_HISTORY_MAX_WINDOW_SECONDS: ClassVar[int] = 15 * 86_400
|
|
176
176
|
|
|
177
|
-
#
|
|
178
|
-
TRADES_MAX_LIMIT: ClassVar[int] =
|
|
179
|
-
TRADES_MAX_OFFSET: ClassVar[int] = 10_000
|
|
177
|
+
# Data API v2 trades use opaque cursors and at most 1000 rows per page.
|
|
178
|
+
TRADES_MAX_LIMIT: ClassVar[int] = 1_000
|
|
180
179
|
TRADES_PAGE_SIZE: ClassVar[int] = 1_000
|
|
181
180
|
|
|
182
181
|
# Map common frequency names to Polymarket interval values
|
|
@@ -1494,10 +1493,23 @@ class PolymarketProvider(BaseProvider):
|
|
|
1494
1493
|
|
|
1495
1494
|
@staticmethod
|
|
1496
1495
|
def _trade_key(trade: dict[str, Any]) -> str:
|
|
1497
|
-
fields = (
|
|
1498
|
-
|
|
1499
|
-
"
|
|
1500
|
-
|
|
1496
|
+
fields = (
|
|
1497
|
+
("transaction_hash", "transactionHash"),
|
|
1498
|
+
("token_id", "asset"),
|
|
1499
|
+
("proxy_wallet", "proxyWallet"),
|
|
1500
|
+
("side", "side"),
|
|
1501
|
+
("size", "size"),
|
|
1502
|
+
("price", "price"),
|
|
1503
|
+
("timestamp", "timestamp"),
|
|
1504
|
+
)
|
|
1505
|
+
values = []
|
|
1506
|
+
for field, legacy in fields:
|
|
1507
|
+
value = trade.get(field, trade.get(legacy))
|
|
1508
|
+
# V1 encodes whole quantities as integers; v2 uses floats for the same trades.
|
|
1509
|
+
if field in ("size", "price") and isinstance(value, float) and value.is_integer():
|
|
1510
|
+
value = int(value)
|
|
1511
|
+
values.append(str(value))
|
|
1512
|
+
return hashlib.sha1("|".join(values).encode(), usedforsecurity=False).hexdigest()
|
|
1501
1513
|
|
|
1502
1514
|
def iter_trades(
|
|
1503
1515
|
self,
|
|
@@ -1509,118 +1521,101 @@ class PolymarketProvider(BaseProvider):
|
|
|
1509
1521
|
) -> Iterator[dict[str, Any]]:
|
|
1510
1522
|
"""Iterate over the taker trades of one market, newest first.
|
|
1511
1523
|
|
|
1512
|
-
``GET
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
again at offset 0, dropping the trades of that boundary second it already yielded.
|
|
1517
|
-
Records carry no trade id; a trade is identified by its transaction hash, token,
|
|
1518
|
-
wallet, side, size, price and time, so two otherwise identical fills in one
|
|
1519
|
-
transaction are yielded once.
|
|
1524
|
+
``GET /v2/trades`` returns snake_case records in a cursor-paginated envelope.
|
|
1525
|
+
Market history is limited to the server's rolling three-year window. The server
|
|
1526
|
+
ignores time bounds for market requests, so inclusive bounds are also enforced
|
|
1527
|
+
locally. Short or empty pages can still carry a continuation cursor.
|
|
1520
1528
|
|
|
1521
1529
|
Args:
|
|
1522
1530
|
condition_id: Market condition id (``ticker`` of ``fetch_markets``).
|
|
1523
1531
|
start: Keep trades at or after this time (Unix seconds, ISO string, date or
|
|
1524
1532
|
datetime; naive is UTC).
|
|
1525
1533
|
end: Keep trades at or before this time.
|
|
1526
|
-
page_size:
|
|
1527
|
-
max_pages: Optional
|
|
1534
|
+
page_size: First-page size (clamped to 1-1000).
|
|
1535
|
+
max_pages: Optional positive request cap for sampling, not full coverage.
|
|
1528
1536
|
|
|
1529
1537
|
Yields:
|
|
1530
|
-
Raw
|
|
1538
|
+
Raw snake_case Data API v2 trade dictionaries. Identical fills with the same
|
|
1539
|
+
transaction, token, wallet, side, size, price and time are yielded once.
|
|
1531
1540
|
|
|
1532
1541
|
Raises:
|
|
1533
|
-
DataValidationError:
|
|
1534
|
-
holds more trades than one offset window can reach.
|
|
1542
|
+
DataValidationError: Malformed records/envelope or a repeated cursor.
|
|
1535
1543
|
"""
|
|
1544
|
+
if max_pages is not None and max_pages < 1:
|
|
1545
|
+
raise ValueError("max_pages must be positive")
|
|
1536
1546
|
limit = max(1, min(int(page_size), self.TRADES_MAX_LIMIT))
|
|
1537
|
-
start_seconds = to_unix_seconds(start)
|
|
1538
|
-
|
|
1547
|
+
start_seconds, end_seconds = to_unix_seconds(start), to_unix_seconds(end)
|
|
1548
|
+
if start_seconds is not None and end_seconds is not None and start_seconds > end_seconds:
|
|
1549
|
+
raise ValueError("start must be at or before end")
|
|
1539
1550
|
resource = f"trades for {condition_id}"
|
|
1540
|
-
|
|
1551
|
+
params: dict[str, Any] = {"condition": condition_id, "limit": limit}
|
|
1552
|
+
if start_seconds is not None:
|
|
1553
|
+
params["start"] = start_seconds
|
|
1554
|
+
if end_seconds is not None:
|
|
1555
|
+
params["end"] = end_seconds
|
|
1556
|
+
seen_cursors: set[str] = set()
|
|
1557
|
+
seen_keys: set[str] = set()
|
|
1541
1558
|
pages = 0
|
|
1542
1559
|
while True:
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1560
|
+
response = self._request(
|
|
1561
|
+
f"{self.DATA_API_URL}/v2/trades", resource=resource, params=params
|
|
1562
|
+
)
|
|
1563
|
+
try:
|
|
1564
|
+
payload = response.json()
|
|
1565
|
+
except ValueError as err:
|
|
1566
|
+
raise DataValidationError(
|
|
1567
|
+
provider="polymarket", message=f"Malformed JSON response for {resource}"
|
|
1568
|
+
) from err
|
|
1569
|
+
pagination = payload.get("pagination") if isinstance(payload, dict) else None
|
|
1570
|
+
trades = payload.get("data") if isinstance(payload, dict) else None
|
|
1571
|
+
if not isinstance(trades, list) or not isinstance(pagination, dict):
|
|
1572
|
+
raise DataValidationError(
|
|
1573
|
+
provider="polymarket", message=f"Expected v2 data/pagination for {resource}"
|
|
1556
1574
|
)
|
|
1575
|
+
has_more, cursor = pagination.get("has_more"), pagination.get("next_cursor")
|
|
1576
|
+
if (
|
|
1577
|
+
not isinstance(has_more, bool)
|
|
1578
|
+
or (has_more and (not isinstance(cursor, str) or not cursor))
|
|
1579
|
+
or (not has_more and cursor is not None)
|
|
1580
|
+
):
|
|
1581
|
+
raise DataValidationError(
|
|
1582
|
+
provider="polymarket", message=f"Malformed v2 pagination for {resource}"
|
|
1583
|
+
)
|
|
1584
|
+
if cursor is not None and cursor in seen_cursors:
|
|
1585
|
+
raise DataValidationError(
|
|
1586
|
+
provider="polymarket", message=f"Trade cursor repeated for {resource}"
|
|
1587
|
+
)
|
|
1588
|
+
pages += 1
|
|
1589
|
+
newest: int | None = None
|
|
1590
|
+
for trade in trades:
|
|
1557
1591
|
try:
|
|
1558
|
-
trades = response.json()
|
|
1559
|
-
except ValueError as err:
|
|
1560
|
-
raise DataValidationError(
|
|
1561
|
-
provider="polymarket", message=f"Malformed JSON response for {resource}"
|
|
1562
|
-
) from err
|
|
1563
|
-
if not isinstance(trades, list):
|
|
1564
|
-
raise DataValidationError(
|
|
1565
|
-
provider="polymarket",
|
|
1566
|
-
message=f"Expected a JSON list for {resource}, got {type(trades).__name__}",
|
|
1567
|
-
)
|
|
1568
|
-
pages += 1
|
|
1569
|
-
page_keys: list[str] = []
|
|
1570
|
-
for trade in trades:
|
|
1571
1592
|
if not isinstance(trade, dict) or isinstance(trade.get("timestamp"), bool):
|
|
1572
|
-
raise
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
try:
|
|
1578
|
-
seconds = int(trade["timestamp"])
|
|
1579
|
-
except (KeyError, TypeError, ValueError) as err:
|
|
1580
|
-
raise DataValidationError(
|
|
1581
|
-
provider="polymarket",
|
|
1582
|
-
message=f"Trade without a timestamp for {resource}: {trade!r}",
|
|
1583
|
-
field="timestamp",
|
|
1584
|
-
) from err
|
|
1585
|
-
key = self._trade_key(trade)
|
|
1586
|
-
page_keys.append(key)
|
|
1587
|
-
if oldest is None or seconds < oldest:
|
|
1588
|
-
oldest, oldest_keys = seconds, {key}
|
|
1589
|
-
elif seconds == oldest:
|
|
1590
|
-
oldest_keys.add(key)
|
|
1591
|
-
if key in window_keys:
|
|
1592
|
-
continue
|
|
1593
|
-
window_keys.add(key)
|
|
1594
|
-
if start_seconds is not None and seconds < start_seconds:
|
|
1595
|
-
continue
|
|
1596
|
-
if window_end is not None and seconds > window_end:
|
|
1597
|
-
continue
|
|
1598
|
-
yield trade
|
|
1599
|
-
if len(trades) < limit or (max_pages is not None and pages >= max_pages):
|
|
1600
|
-
return
|
|
1601
|
-
if offset > 0 and page_keys == previous_page:
|
|
1593
|
+
raise ValueError("trade must contain an integer timestamp")
|
|
1594
|
+
seconds = int(trade["timestamp"])
|
|
1595
|
+
if isinstance(trade["timestamp"], float) and seconds != trade["timestamp"]:
|
|
1596
|
+
raise ValueError("non-integer timestamp")
|
|
1597
|
+
except (KeyError, TypeError, ValueError) as err:
|
|
1602
1598
|
raise DataValidationError(
|
|
1603
1599
|
provider="polymarket",
|
|
1604
|
-
message=f"
|
|
1605
|
-
field="
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
boundary_keys = oldest_keys
|
|
1600
|
+
message=f"Malformed trade timestamp for {resource}: {trade!r}",
|
|
1601
|
+
field="timestamp",
|
|
1602
|
+
) from err
|
|
1603
|
+
newest = seconds if newest is None else max(newest, seconds)
|
|
1604
|
+
key = self._trade_key(trade)
|
|
1605
|
+
if key in seen_keys:
|
|
1606
|
+
continue
|
|
1607
|
+
seen_keys.add(key)
|
|
1608
|
+
if start_seconds is not None and seconds < start_seconds:
|
|
1609
|
+
continue
|
|
1610
|
+
if end_seconds is not None and seconds > end_seconds:
|
|
1611
|
+
continue
|
|
1612
|
+
yield trade
|
|
1613
|
+
if not has_more or (max_pages is not None and pages >= max_pages):
|
|
1614
|
+
return
|
|
1615
|
+
if start_seconds is not None and newest is not None and newest < start_seconds:
|
|
1616
|
+
return
|
|
1617
|
+
seen_cursors.add(cursor)
|
|
1618
|
+
params["cursor"] = cursor
|
|
1624
1619
|
|
|
1625
1620
|
def fetch_trades(
|
|
1626
1621
|
self,
|
|
@@ -1667,13 +1662,13 @@ class PolymarketProvider(BaseProvider):
|
|
|
1667
1662
|
|
|
1668
1663
|
def _normalize_trade(self, trade: dict[str, Any], condition_id: str) -> tuple[Any, ...]:
|
|
1669
1664
|
try:
|
|
1670
|
-
outcome_index = trade["
|
|
1665
|
+
outcome_index = trade["outcome_index"]
|
|
1671
1666
|
outcome_price = float(trade["price"])
|
|
1672
1667
|
size = float(trade["size"])
|
|
1673
1668
|
side = str(trade["side"]).upper()
|
|
1674
1669
|
timestamp = datetime.fromtimestamp(int(trade["timestamp"]), UTC)
|
|
1675
1670
|
if isinstance(outcome_index, bool) or outcome_index not in (0, 1):
|
|
1676
|
-
raise ValueError(f"
|
|
1671
|
+
raise ValueError(f"outcome_index {outcome_index!r} is not 0 or 1")
|
|
1677
1672
|
if side not in ("BUY", "SELL"):
|
|
1678
1673
|
raise ValueError(f"side {side!r} is not BUY or SELL")
|
|
1679
1674
|
except (KeyError, TypeError, ValueError) as err:
|
|
@@ -1687,7 +1682,7 @@ class PolymarketProvider(BaseProvider):
|
|
|
1687
1682
|
taker_yes = first_outcome == (side == "BUY")
|
|
1688
1683
|
return (
|
|
1689
1684
|
self._trade_key(trade),
|
|
1690
|
-
trade.get("
|
|
1685
|
+
trade.get("condition_id") or condition_id,
|
|
1691
1686
|
timestamp,
|
|
1692
1687
|
yes_price,
|
|
1693
1688
|
size,
|
|
@@ -1697,9 +1692,9 @@ class PolymarketProvider(BaseProvider):
|
|
|
1697
1692
|
int(outcome_index),
|
|
1698
1693
|
side,
|
|
1699
1694
|
outcome_price,
|
|
1700
|
-
None if trade.get("
|
|
1701
|
-
trade.get("
|
|
1702
|
-
trade.get("
|
|
1695
|
+
None if trade.get("token_id") is None else str(trade["token_id"]),
|
|
1696
|
+
trade.get("proxy_wallet"),
|
|
1697
|
+
trade.get("transaction_hash"),
|
|
1703
1698
|
)
|
|
1704
1699
|
|
|
1705
1700
|
def close(self) -> None:
|
|
@@ -249,6 +249,15 @@ _SPECS = (
|
|
|
249
249
|
optional_credential_environment=("COINGECKO_API_KEY",),
|
|
250
250
|
),
|
|
251
251
|
_spec("binance", "binance", "BinanceProvider", "Binance spot markets", "ohlcv"),
|
|
252
|
+
_spec(
|
|
253
|
+
"coinmetrics",
|
|
254
|
+
"coinmetrics",
|
|
255
|
+
"CoinMetricsProvider",
|
|
256
|
+
"Coin Metrics spot-market candles",
|
|
257
|
+
"ohlcv",
|
|
258
|
+
"timestamp_range",
|
|
259
|
+
credentials=(_credential("api_key", "COINMETRICS_API_KEY"),),
|
|
260
|
+
),
|
|
252
261
|
_spec(
|
|
253
262
|
"binance_public",
|
|
254
263
|
"binance_public",
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"source": "https://docs.coinmetrics.io/api/v4/#operation/getTimeseriesMarketCandles",
|
|
3
|
+
"response": {
|
|
4
|
+
"data": [
|
|
5
|
+
{
|
|
6
|
+
"time": "2020-06-08T20:45:00.000000000Z",
|
|
7
|
+
"market": "coinbase-btc-usd-spot",
|
|
8
|
+
"price_open": "9705.07999999999993",
|
|
9
|
+
"price_close": "9705.01000000000022",
|
|
10
|
+
"price_high": "9706.19000000000051",
|
|
11
|
+
"price_low": "9705",
|
|
12
|
+
"vwap": "9705.1686505895068",
|
|
13
|
+
"volume": "16.8066639099999975",
|
|
14
|
+
"candle_usd_volume": "16.806663910",
|
|
15
|
+
"candle_trades_count": "212"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"time": "2020-06-08T20:50:00.000000000Z",
|
|
19
|
+
"market": "coinbase-btc-usd-spot",
|
|
20
|
+
"price_open": "9705",
|
|
21
|
+
"price_close": "9696.27000000000044",
|
|
22
|
+
"price_high": "9705",
|
|
23
|
+
"price_low": "9695.71999999999935",
|
|
24
|
+
"vwap": "9698.38894423754937",
|
|
25
|
+
"volume": "14.7672128699999963",
|
|
26
|
+
"candle_usd_volume": "14.767212870",
|
|
27
|
+
"candle_trades_count": "215"
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"next_page_token": "0.MjAyMC0wNi0wOFQyMDo0NTowMFo",
|
|
31
|
+
"next_page_url": "https://api.coinmetrics.io/v4/timeseries/market-candles?markets=coinbase-btc-usd-spot&api_key=<your_key>&pretty=true&page_size=2&frequency=5m&next_page_token=0.MjAyMC0wNi0wOFQyMDo0NTowMFo"
|
|
32
|
+
}
|
|
33
|
+
}
|