Skip to content

feat: add optional Qveris market data source - #192

Draft
Leon-Drq wants to merge 1 commit into
OpenByteInc:mainfrom
Leon-Drq:feat/qveris-data-source
Draft

feat: add optional Qveris market data source#192
Leon-Drq wants to merge 1 commit into
OpenByteInc:mainfrom
Leon-Drq:feat/qveris-data-source

Conversation

@Leon-Drq

@Leon-Drq Leon-Drq commented Aug 4, 2026

Copy link
Copy Markdown

What

Add an optional QverisDataSource in front of QuantDinger's existing market providers.

  • Discovers a compatible read-only Qveris OHLCV or quote tool for the requested market.
  • Maps common symbol, timeframe, limit, and date parameters from tool metadata.
  • Normalizes row-oriented, column-oriented, and dated time-series responses to QuantDinger's existing data-source contract.
  • Keeps the current provider as an automatic fallback for discovery, execution, or normalization failures.
  • Supports optional tool pinning and in-memory discovery caching.

Why

QuantDinger currently integrates several provider-specific data sources. Qveris can provide one optional discovery and execution layer across markets, while preserving all current providers and behavior. This gives deployments another way to obtain structured financial data without making Qveris required or exclusive.

Configuration

The integration is disabled by default. It is enabled only when both values are set:

QVERIS_API_KEY=...
QVERIS_DATA_SOURCE_MARKETS=USStock,CNStock,HKStock

See docs/integrations/QVERIS_DATA_SOURCE.md for all settings and verification steps.

Backward compatibility

  • No environment variables: factory behavior is unchanged.
  • Qveris enabled: the existing provider is retained as the fallback.
  • Existing get_kline and get_ticker callers and normalized response shapes are unchanged.
  • API keys stay in the backend environment and are not included in logs or responses.

Testing

17 passed in 0.09s
All checks passed!
Mojibake check OK.

Commands run:

python -m pytest --noconftest tests/test_qveris_data_source.py tests/test_data_providers.py -q
ruff check app/data_sources/qveris.py app/data_sources/factory.py tests/test_qveris_data_source.py
python ../scripts/check_mojibake.py

The adapter-specific tests cover discovery metadata variants, market-aware tool selection, parameter mapping, three OHLCV response layouts, ticker normalization, opt-in configuration, factory wrapping, and automatic fallback.

Live smoke test

A live request was run with USStock, AAPL, 1D, and limit=5 using a configured Qveris key:

  • Selected tool: eodhd.eod_historical_data.retrieve.v1.a43f3b91
  • Normalized rows: 5
  • Fallback used: no

Qveris live smoke test

Review notes

This is intentionally a Draft PR so the maintainers can confirm the integration direction before it is marked ready. I am happy to adjust naming, configuration, or provider placement to match the project's preferences.

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