Skip to content

Repository files navigation

OilPriceAPI Kaggle Notebooks

Reproducible, source-aware OilPriceAPI analysis notebooks. Repository copies contain no stored outputs, API keys, account responses, or customer data.

Product and access claims are governed by the versioned OilPriceAPI product-facts contract, reviewed 2026-07-18. Latest available values include API timestamps; cadence, history depth, and access vary by source, market hours, dataset, and account entitlement.

Notebooks

WTI and Brent Spread Analysis

API-Timestamped Brent Technical Indicators

Both public Kaggle URLs currently require a republish receipt for this repository revision. Do not treat their displayed output as current unless the notebook shows its execution time and API timestamp fields.

Runtime Contract

  • Python package: oilpriceapi[pandas]==1.11.0
  • Secret label: OILPRICEAPI_KEY through Kaggle Add-ons > Secrets
  • First request: GET /v1/prices/latest?by_code=BRENT_CRUDE_USD
  • History request: GET /v1/prices/historical with explicit dates and interval=daily
  • Recovery: missing secret, 401, 402/403, 429, timeout, empty response, and malformed response fail closed with a next action

The notebooks preserve symbol, numeric value, currency, unit, source, the exact API timestamp field used, freshness when returned, requested range, method, and execution time. They do not default missing units, currencies, sources, timestamps, or values.

Validate Locally

python3 -m pip install "oilpriceapi[pandas]==1.11.0" matplotlib seaborn
python3 scripts/generate_notebooks.py
./scripts/scan-secrets.sh
python3 -m unittest discover -s tests -v
python3 scripts/package_kaggle.py

The unit suite executes the exact committed notebook cells against deterministic production-shaped fixtures. A public Kaggle publish additionally requires a private Kaggle credential and an attached non-customer OilPriceAPI secret; neither belongs in this repository.

For the one-command release gate, Kaggle CLI packaging steps, public-result review, and credential/metadata rules, see Kaggle Notebook Release Practices.

Sources

About

Reproducible source-aware OilPriceAPI notebooks with strict timestamp, unit, currency, and recovery validation

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages