Price Utility Endpoints
These endpoints support specific product workflows around the core price API. Prefer /v1/prices/latest and /v1/prices/historical for new general-purpose integrations unless a workflow below matches your use case.
Endpoints
| Method | Endpoint | Purpose |
|---|---|---|
| GET | /v1/prices/crude-oil | Crude-oil focused latest-price helper |
| GET | /v1/prices/data-connector | Connector payload used by data-connector integrations |
| GET | /v1/prices/history | Legacy history surface; prefer /v1/prices/historical for new work |
| GET | /v1/prices/metrics | Price API metrics payload |
/v1/prices/crude-oil
curl "https://api.oilpriceapi.com/v1/prices/crude-oil" \
-H "Authorization: Token YOUR_API_KEY"
Returns a crude-focused price payload for WTI, Brent, and related crude benchmarks.
/v1/prices/data-connector
curl "https://api.oilpriceapi.com/v1/prices/data-connector" \
-H "Authorization: Token YOUR_API_KEY"
Used by connector workflows such as the Ship & Bunker connector. Treat the shape as integration-specific and pin your downstream parser to the fields you actually use.
/v1/prices/history
curl "https://api.oilpriceapi.com/v1/prices/history?by_code=WTI_USD&start_date=2026-01-01&end_date=2026-01-31" \
-H "Authorization: Token YOUR_API_KEY"
/v1/prices/history is distinct from the canonical Historical Prices endpoint. For new integrations, use /v1/prices/historical unless support has directed you to the legacy path.
/v1/prices/metrics
curl "https://api.oilpriceapi.com/v1/prices/metrics" \
-H "Authorization: Token YOUR_API_KEY"
Returns price API metrics for monitoring and internal operational dashboards.
Do Not Use Yet
GET /v1/prices/export is intentionally not documented as a working endpoint here because the current backend issue list records a hard 500. Wait for the backend fix before building exports.
Error Cases
| Status | When |
|---|---|
400 | Missing required query parameter or invalid code |
401 | Missing or invalid API key |
402 | Quota exhausted |
429 | Rate limit exceeded |