Use Case Tutorials
End-to-end walkthroughs for common OilPriceAPI implementation patterns. Each tutorial follows the same structure so you can scan quickly:
- Problem — what you are trying to solve.
- Solution architecture — how the pieces fit together.
- Code implementation — copy-paste-ready examples.
- Best practices — what to do for a production-grade result.
- Common pitfalls — mistakes to avoid.
Tutorials
- Dashboard Building — fetch all prices efficiently, cache them, and wire them into charts.
- Price Alerts — set up webhooks, monitor thresholds, and manage notifications.
- Data Analysis — retrieve historical data, aggregate time series, and export results.
- Integration Patterns — microservices, event-driven updates, and data pipelines.
Before You Start
All tutorials assume you have an API key. See the Authentication guide to create one, and the Quick Start for your first request.
The base URL for all examples is:
https://api.oilpriceapi.com/v1
Authenticate every request with a bearer token:
curl -H "Authorization: Token YOUR_API_KEY" \
https://api.oilpriceapi.com/v1/prices/latest