Document research parameter applicability; add series parameter#2
Draft
ochlocracy wants to merge 1 commit into
Draft
Document research parameter applicability; add series parameter#2ochlocracy wants to merge 1 commit into
ochlocracy wants to merge 1 commit into
Conversation
Add `x-applicable_views`, `x-chart_only`, and `x-dedicated_metrics`
OpenAPI extensions to `/research/{ticker}/{metric}` so clients can
determine which query parameters take effect for a given metric/view
combination (see docs/research-parameter-applicability.md for the
full matrix and semantics). Applicability was derived from the API
implementation's request routing.
Also:
- Add the missing `series` query parameter (term view series
grouping: moneyness, strikes, deltas).
- Add descriptions and defaults to the research query parameters.
- Fix the orderflow category path parameter, which referenced a
schema where a parameter object is required; the spec now passes
OpenAPI 3.0.1 validation.
- Regenerate the JSON spec from the YAML (picks up a previously
unsynced websocket example hub value).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
summary
Encodes cross-parameter dependency rules for
GET /research/{ticker}/{metric}directly in the OpenAPI spec via custom extensions (Option A from the proposal), so clients such as the interactive URL builder can grey out inapplicable controls. Applicability was derived from the API implementation's actual request routing, not the original proposal text (several of its claimed rules were inaccurate).extensions added
x-applicable_views(parameter level) — allowlist of views (skew/term/surface) where the parameter takes effect; omitted = all views.x-chart_only(parameter level) — parameter has no effect whenformatisjsonorcsv.x-dedicated_metrics(operation level) — metrics (max_pain,parity,put_call_parity,gamma_flip) that render a fixed chart, ignoreview, and support only a listed subset of parameters.Semantics and the full applicability matrix are documented in
docs/research-parameter-applicability.md.other changes
seriesquery parameter (term-view series grouping:moneyness,strikes,deltas) to the spec and README./{ticker}/orderflow/{category}referenced#/components/schemas/category_orderflowdirectly in itsparameterslist (invalid — parameter objects requirename/in). Replaced with a neworderflow_category_in_pathcomponent parameter following the existing*_category_in_pathconvention. The spec now passes OpenAPI 3.0.1 validation; previously it did not.latest/gexbot.spec3.jsonfrom the YAML. This also picks up a previously unsynced websocket example value (state_greeks_zero->state_greeksfor theSOXL_state_gamma_20260717example).behavior note
The API silently ignores inapplicable or invalid optional parameters and applies defaults — it does not return
400for bad combinations. The new operation description states this explicitly.flagged, intentionally not changed
volatility_triggerin theresearch_metricenum is rejected by the API (the metric map only acceptsgamma_flip/vol_trigger); requests with it 400. Needs an owner decision: remove it from the enum or add the alias server-side.moneyness_filteralso accepts undocumented delta-based values (d10/d15/d20/d25); left out of the public spec deliberately, consistent with the earlier removal ofchart_type/plotly.🤖 Generated with Claude Code