Excel Latest Price Gateway
The Excel gateway returns latest-price data shaped for spreadsheet add-ins and formulas.
GET/v1/prices/excel-latest
Correct Path
Use /v1/prices/excel-latest. The shorter /v1/excel-latest path is not the supported endpoint.
Request
curl "https://api.oilpriceapi.com/v1/prices/excel-latest?by_code=WTI_USD" \
-H "Authorization: Token YOUR_API_KEY"
| Parameter | Type | Required | Description |
|---|---|---|---|
by_code | string | No | Single code or comma-separated commodity codes |
fields | string | No | Comma-separated response fields |
currency | string | No | Optional output currency where enabled |
Response
{
"status": "success",
"data": {
"code": "WTI_USD",
"price": 74.52,
"formatted": "$74.52",
"currency": "USD",
"created_at": "2026-07-15T14:30:00.000Z"
}
}
Error Cases
| Status | When |
|---|---|
400 | Invalid commodity code or parameter |
401 | Missing or invalid API key |
402 | Quota exhausted |
429 | Rate limit exceeded |