You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[P1][Sprint 1][Parity] Add typed Spreads and market Indicators resources #99
The published API contract includes /v1/spreads/* and /v1/indicators/* operations. Node has typed resources; Python has neither. oilpriceapi.analysis is local calculation and is not API endpoint coverage.
Acceptance criteria
Implement typed sync and async methods for the published spreads and indicators operations selected by the support manifest.
Preserve timestamps, provenance, units, nulls, and pagination.
Premise check before implementation, verified 2026-09-13 against oilpriceapi-api origin/main 02196c516 and live production (paid test account):
Routes exist.config/routes.rb has 15 /v1/spreads/* routes and 13 /v1/indicators/* routes, all on V1::SpreadsController, and every spreads/indicators route returned a response in production.
"Selected by the support manifest": no such manifest exists. Nothing in python-sdk, oilpriceapi-api, oilpriceapi-node or website-clean is a support manifest. The route list above was used as the selection instead.
"Machine-readable capabilities": no such file exists in python-sdk. The only machine-readable artifact is the snippet manifest (examples/snippets/manifest-source.json). Its test executes every snippet against a fixture server that serves only price routes, so these resources were not added there. No new metadata file was invented.
402 is not emitted by these routes. Entitlement is check_analytics_access → 403 PREMIUM_REQUIRED. 402 is covered as status mapping only.
congressional-trades is excluded. It has never returned data (404 DATA_NOT_AVAILABLE with an internal config message), so there is no shape to type. Filed as OilpriceAPI/oilpriceapi-api#8478.
"Cut a minor release" is deferred. The release was held back by instruction; CHANGELOG is under [Unreleased] only.
API defects found while typing, all filed or commented:
oilpriceapi-api#8476: CFTC history spec_net_pct_oi is always 0 (integer division).
oilpriceapi-api#8477: the 3-2-1 composite never emits data_stale.
oilpriceapi-api#5913 comment: history routes return an empty 200 for unknown selectors, and bad dates silently fall back to the default window.
oilpriceapi-api#3297 comment: intermittent 500s from price-context.
Activity
karlwaldman commentedon Sep 13, 2026
Premise check before implementation, verified 2026-09-13 against oilpriceapi-api origin/main
02196c516and live production (paid test account):config/routes.rbhas 15/v1/spreads/*routes and 13/v1/indicators/*routes, all onV1::SpreadsController, and every spreads/indicators route returned a response in production.examples/snippets/manifest-source.json). Its test executes every snippet against a fixture server that serves only price routes, so these resources were not added there. No new metadata file was invented.pair,commodity,code), so they return 400. Filed as [P2] spreads and indicators resources are typed against a shape the API does not send, and omit required parameters oilpriceapi-node#112. The Python models are typed from captured production bodies, not from Node.check_analytics_access→ 403PREMIUM_REQUIRED. 402 is covered as status mapping only.congressional-tradesis excluded. It has never returned data (404DATA_NOT_AVAILABLEwith an internal config message), so there is no shape to type. Filed as OilpriceAPI/oilpriceapi-api#8478.[Unreleased]only.API defects found while typing, all filed or commented:
spec_net_pct_oiis always 0 (integer division).data_stale.price-context.fix(spreads,indicators): raise ValidationError for local refusals, no…
Merge origin/main (#143 subscriptions, #144 fuel-surcharge) into feat…
feat(spreads,indicators): typed sync+async Spreads and Indicators res…
chore(release): 1.16.0 (#152)