Add Headless Oracle market state provider#7463
Open
HOYALIM wants to merge 3 commits intoOpenBB-finance:developfrom
Open
Add Headless Oracle market state provider#7463HOYALIM wants to merge 3 commits intoOpenBB-finance:developfrom
HOYALIM wants to merge 3 commits intoOpenBB-finance:developfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new “Headless Oracle” provider extension to fetch signed market-state receipts (fail-closed is_open), and exposes it through a new equity.market_state command backed by a new MarketState standard model.
Changes:
- Add
MarketStatestandard model and newequity.market_statecommand surface. - Introduce
openbb-headless-oracleprovider package with fetcher + recorded HTTP cassette test. - Wire the provider into platform dependency extras and local dev install.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| openbb_platform/pyproject.toml | Adds optional dependency + extras entry for openbb-headless-oracle. |
| openbb_platform/core/openbb_core/provider/standard_models/market_state.py | Introduces MarketStateQueryParams and MarketStateData standard model. |
| openbb_platform/extensions/equity/openbb_equity/equity_router.py | Adds market_state router command for the new MarketState model. |
| openbb_platform/providers/headless_oracle/pyproject.toml | Defines the new provider package and plugin entrypoint. |
| openbb_platform/providers/headless_oracle/README.md | Documents usage example for obb.equity.market_state(..., provider="headless_oracle"). |
| openbb_platform/providers/headless_oracle/openbb_headless_oracle/init.py | Registers the provider and maps MarketState to the fetcher. |
| openbb_platform/providers/headless_oracle/openbb_headless_oracle/models/market_state.py | Implements the fetcher to request/transform signed receipt metadata into MarketStateData. |
| openbb_platform/providers/headless_oracle/tests/test_headless_oracle_fetchers.py | Adds VCR-backed fetcher test. |
| openbb_platform/providers/headless_oracle/tests/record/http/test_headless_oracle_fetchers/test_headless_oracle_market_state_fetcher_urllib3_v2.yaml | Adds recorded HTTP cassette for the fetcher test. |
| openbb_platform/dev_install.py | Adds provider to local dev dependency installer; minor formatting refactors. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...http/test_headless_oracle_fetchers/test_headless_oracle_market_state_fetcher_urllib3_v2.yaml
Show resolved
Hide resolved
openbb_platform/core/openbb_core/provider/standard_models/market_state.py
Show resolved
Hide resolved
openbb_platform/providers/headless_oracle/openbb_headless_oracle/models/market_state.py
Show resolved
Hide resolved
openbb_platform/providers/headless_oracle/openbb_headless_oracle/__init__.py
Show resolved
Hide resolved
openbb_platform/providers/headless_oracle/tests/test_headless_oracle_fetchers.py
Show resolved
Hide resolved
Author
|
@copilot apply changes based on the comments in this thread |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
headless_oracleprovider with aMarketStatefetcher for signed market-state receipts.obb.equity.market_state(exchange=..., provider=\"headless_oracle\")as the agent-facing command surface.is_open=Trueonly when the upstream status isOPEN.OpenBBErrorwhen the upstream response does not include a valid receipt payload or omits required receipt fields.How has this been tested?
Added provider fetcher coverage in
openbb_platform/providers/headless_oracle/tests/test_headless_oracle_fetchers.py, including direct assertions for:UNKNOWNAdded command-surface integration coverage in:
openbb_platform/extensions/equity/integration/test_equity_python.pyopenbb_platform/extensions/equity/integration/test_equity_api.pyRan
python3 -m poetry run pytest "providers/headless_oracle/tests/test_headless_oracle_fetchers.py" "providers/tests/test_provider_fetcher.py" "extensions/equity/integration/test_equity_python.py" -k "market_state or ProviderFetcherTest".Ran
python3 -m poetry run pytest "extensions/equity/integration/test_equity_api.py" -k market_state -m integrationwith a localuvicorn openbb_core.api.rest_api:appserver.Manually exercised the Python interface with
python3 -m poetry run python -c "from openbb import obb; result = obb.equity.market_state(exchange='XNYS', provider='headless_oracle'); print(result.results.model_dump())".Manually exercised the REST API with
GET /api/v1/equity/market_state?exchange=XNYS&provider=headless_oracleand confirmed a200response with the signed receipt payload.Attempted to regenerate
openbb_platform/poetry.lock, butpoetry lockis currently blocked by a pre-existing dependency mismatch in the base branch (openbb_platform/pyproject.tomlrequiresopenbb-mcp-server ^1.4.0whilepoetry.lockstill pins1.3.1).Ensure all unit and integration tests pass.
Ensure the command(s) execute with the expected output.
If applicable, please add new tests for the command (see CONTRIBUTING.md to leverage semi-automated testing).
Ensure the existing tests pass.
Ensure the new provider and/or fetcher is stable and usable.
If applicable, please add new tests for the provider and/or fetcher (see CONTRIBUTING.md to leverage semi-automated testing).
If a new provider or extension was added:
Checklist
feature/feature-nameorhotfix/hotfix-name.