---
title: "Get latest price for a commodity"
method: GET
path: "/v1/prices/latest"
tags: ["Prices"]
---

# Get latest price for a commodity

`GET /v1/prices/latest`

Retrieve the most recent price for a specific commodity

## Query parameters

- `by_code` 'ALUMINUM_USD' | 'AMMONIA_USD' | 'ASPHALT_USD' | 'AZERI_LIGHT_USD' | 'BAKKEN_DUC_WELLS' | 'BAKKEN_FRAC_SPREADS' | 'BIODIESEL_USD' | 'BRENT_CRUDE_USD' | 'CANADA_RIG_COUNT' | 'CAPP_COAL_USD' | 'CME_COAL_USD' | 'COAL_USD' | 'COKING_COAL_USD' | 'COPPER_USD' | 'CUSHING_STORAGE' | 'DIESEL_USD' | 'DUBAI_CRUDE_USD' | 'DUTCH_TTF_EUR' | 'DUTCH_TTF_NATURAL_GAS_USD' | 'EAGLEFORD_DUC_WELLS' | 'EAGLEFORD_FRAC_SPREADS' | 'ETHANOL_USD' | 'ETHYLENE_USD' | 'EUR_USD' | 'USD_NOK' | 'EUR_NOK' | 'EU_CARBON_EUR' | 'UK_CARBON_GBP' | 'GASOLINE_RBOB_USD' | 'GASOLINE_USD' | 'GBP_USD' | 'GOLD_USD' | 'SILVER_USD' | 'GOLD_AM_USD' | 'GOLD_AM_GBP' | 'GOLD_AM_EUR' | 'GOLD_PM_USD' | 'GOLD_PM_GBP' | 'GOLD_PM_EUR' | 'SILVER_FIX_USD' | 'SILVER_FIX_GBP' | 'SILVER_FIX_EUR' | 'HEATING_OIL_USD' | 'HFO_180_USD' | 'HFO_380_USD' | 'ILLINOIS_COAL_USD' | 'INTERNATIONAL_RIG_COUNT' | 'IRON_ORE_USD' | 'JET_A1_NWE_USD' | 'JET_FUEL_USD' | 'JKM_LNG_USD' | 'LEAD_USD' | 'MGO_05S_USD' | 'METHANOL_USD' | 'NAPHTHA_USD' | 'NICKEL_USD' | 'NATURAL_GAS_GBP' | 'NATURAL_GAS_STORAGE' | 'NATURAL_GAS_USD' | 'NEWCASTLE_COAL_USD' | 'NORTH_DAKOTA_WELL_PERMITS' | 'NYMEX_APPALACHIAN_USD' | 'NYMEX_WESTERN_RAIL_USD' | 'OKLAHOMA_WELL_PERMITS' | 'PALLADIUM_USD' | 'PERMIAN_DUC_WELLS' | 'PERMIAN_FRAC_SPREADS' | 'POLYETHYLENE_USD' | 'POLYPROPYLENE_USD' | 'PLATINUM_USD' | 'PRB_COAL_USD' | 'TAPIS_CRUDE_USD' | 'TIN_USD' | 'TEXAS_WELL_PERMITS' | 'ULSD_DIESEL_USD' | 'URALS_CRUDE_USD' | 'URANIUM_USD' | 'UREA_USD' | 'US_RIG_COUNT' | 'VLSFO_USD' | 'WCS_CRUDE_USD' | 'WTI_USD' | 'ZINC_USD'
- `by_type` 'spot_price' | 'daily_average_price'

## Response `200`

Latest price data. A single `by_code` returns a flat `data` object
(LatestPriceResponse); multiple comma-separated codes return `data.prices[]`
(LatestPricesResponse).

- union
  - LatestPriceResponse
    - `status` string
    - `data` object — A single commodity price point. Returned as the flat `data` object for a single-commodity request, or as an element of `data.prices` for multi-commodity / historical requests.
      - `price` number, float
      - `formatted` string
      - `currency` string
      - `code` string
      - `created_at` string, date-time
      - `updated_at` string, date-time
      - `type` string
      - `unit` string
      - `source` string — Customer-safe source label. Non-government market sources are returned as `market_reporting`.
      - `observed_at` string, date-time — Source observation timestamp when the upstream series supplies one.
      - `source_date` string, date — Source observation date when available.
      - `as_of` string, date-time — Timestamp when the value was last a genuine source observation.
      - `collected_at` string, date-time — Timestamp when OilPriceAPI collected or produced this row.
      - `stale` boolean — Whether `as_of` exceeds this series' expected publication cadence.
      - `age_days` integer — Whole days between `as_of` and response generation.
      - `synthetic` boolean — True only for carried-forward heartbeat rows rather than genuine source observations.
      - `price_type` string — Underlying price type for aggregated historical rows.
      - `data_status` string — Freshness classification of the price.
      - `freshness` object
        - `status` string
        - `age_seconds` integer
        - `expected_max_age_seconds` integer
      - `changes` object — Price change over rolling windows. Keys are 24h/7d/30d/90d.
        - `24h` PriceChange
          - `amount` number, float
          - `percent` number, float
          - `previous_price` number, float
        - `7d` PriceChange
          - `amount` number, float
          - `percent` number, float
          - `previous_price` number, float
        - `30d` PriceChange
          - `amount` number, float
          - `percent` number, float
          - `previous_price` number, float
        - `90d` PriceChange
          - `amount` number, float
          - `percent` number, float
          - `previous_price` number, float
      - `metadata` object
        - `source` string
        - `source_description` string
  - LatestPricesResponse
    - `status` string
    - `data` object
      - `prices` PriceData[]
        - `price` number, float
        - `formatted` string
        - `currency` string
        - `code` string
        - `created_at` string, date-time
        - `updated_at` string, date-time
        - `type` string
        - `unit` string
        - `source` string — Customer-safe source label. Non-government market sources are returned as `market_reporting`.
        - `observed_at` string, date-time — Source observation timestamp when the upstream series supplies one.
        - `source_date` string, date — Source observation date when available.
        - `as_of` string, date-time — Timestamp when the value was last a genuine source observation.
        - `collected_at` string, date-time — Timestamp when OilPriceAPI collected or produced this row.
        - `stale` boolean — Whether `as_of` exceeds this series' expected publication cadence.
        - `age_days` integer — Whole days between `as_of` and response generation.
        - `synthetic` boolean — True only for carried-forward heartbeat rows rather than genuine source observations.
        - `price_type` string — Underlying price type for aggregated historical rows.
        - `data_status` string — Freshness classification of the price.
        - `freshness` object
          - `status` string
          - `age_seconds` integer
          - `expected_max_age_seconds` integer
        - `changes` object — Price change over rolling windows. Keys are 24h/7d/30d/90d.
          - `24h` PriceChange
            - `amount` number, float
            - `percent` number, float
            - `previous_price` number, float
          - `7d` PriceChange
            - `amount` number, float
            - `percent` number, float
            - `previous_price` number, float
          - `30d` PriceChange
            - `amount` number, float
            - `percent` number, float
            - `previous_price` number, float
          - `90d` PriceChange
            - `amount` number, float
            - `percent` number, float
            - `previous_price` number, float
      - `metadata` object
        - `request_id` string
        - `timestamp` string, date-time
        - `version` string

## Other responses

- `400` — Invalid commodity code. Body is `{"status":"fail","data":{"error":"invalid_code",...,"invalid_codes":[...]}}`.
- `401` — Unauthorized — missing or invalid API key. Body is `{"error":{"code":"UNAUTHORIZED","message":...,"request_id":...}}` (no top-level `status`).
- `429` — Rate limit exceeded
- `500` — Unexpected server error. Retry transient failures with bounded backoff and retain the request ID when contacting support.

---

[API](https://skmtc.net/oilpriceapi/apis/oil-price-api-v1.md) · [All operations](https://skmtc.net/oilpriceapi/apis/oil-price-api-v1/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/oilpriceapi/oil-price-api-v1/revisions/5a5ce424cacc/schema)
