All APIs

Commodities API

Prices for spot metals and physical commodities, with native units and series definitions.

Online99.96% uptime, last 30 days357 ms typical response

First request

Find palm oil prices in Indonesia

curl --request GET \
  --url "https://api.narwhalapi.com/v1/commodities/palmoil/physical?product=ffb&country=IDN" \
  --header "Authorization: Bearer $NARWHAL_API_KEY"
Example response
{
  "series": [
    {
      "series_id": "id-ri-oil-palm-ffb-smallholder-purchase-agreement",
      "product": "ffb",
      "observation_type": "age_schedule",
      "period_type": "effective",
      "country": "IDN",
      "area": "ID-RI",
      "producer_arrangement": "purchase_agreement",
      "price_type": "official_purchase_schedule",
      "currency": "IDR",
      "unit": "kilogram",
      "unit_key": "kilogram",
      "coverage_start": "2026-08-19",
      "coverage_end": "2026-09-01",
      "frequency": "weekly"
    }
  ],
  "next_cursor": null
}

Endpoints

Spot metals price API

GETGet a spot price/v1/commodities/spot/{commodity}/{currency}

Get a spot price or a futures-based reference price.

Parameters

  • commodityrequired

    XAU, XAG, XPT, XPD, WTI (WTI crude oil), BRENT (Brent crude oil) or XCU (copper).

  • currencyrequired

    The quote currency in capitals. Gold has 31 currencies. The others are quoted in USD only.

The quote

  • symbolstring

    The commodity and quote currency, such as XAU-USD.

  • currencystring

    The quote currency.

  • unitstring

    troy_ounce for precious metals, barrel for WTI and BRENT, and pound for XCU.

  • pricestring

    One positive indicative price as a decimal string.

  • timestampdate-time

    The quote time in UTC.

  • staleboolean

    Whether the quote is stale. A closed market never makes a quote stale.


Full reference →
GETGet price bars/v1/commodities/spot/{commodity}/{currency}/bars

Open, high, low and close bars for gold, silver, platinum, palladium, copper, WTI and BRENT.

Parameters

  • commodityrequired

    XAU, XAG, XPT, XPD, WTI (WTI crude oil), BRENT (Brent crude oil) or XCU (copper).

  • currencyrequired

    The quote currency in capitals. Gold has 31 currencies. The others are quoted in USD only.

  • intervaloptional

    1m, 5m, 15m, 1h, 4h or 1d. The default is 1d.

  • startrequired

    The first bar, as a UTC time on an interval boundary. Inclusive.

  • endrequired

    The last bar, as a UTC time on an interval boundary. Exclusive.

  • limitoptional

    Bars per page. The default is 100 and the most is 500.

  • cursoroptional

    Reuse next_cursor from the previous page with the same query.

Response fields

  • barsarray

    Closed bars from oldest to newest, each with a timestamp and open, high, low and close as decimal strings. Gold in currencies other than USD has close only.

  • next_cursorstring

    The cursor for the next page. Null when no bars remain.


Full reference →

Physical commodity prices API

GETDiscover Palm oil physical series/v1/commodities/palmoil/physical

Find admitted Palm oil physical series by product and country.

Parameters

  • productoptional

    Filter by the physical product.

  • countryoptional

    Filter by country, such as IDN.

  • areaoptional

    Use an area returned by discovery: ISO 3166-2 where applicable, or a Narwhal-defined nwl-* ID such as nwl-mys-north.

  • price_typeoptional

    official_purchase_schedule, government_reference or market_average. The value must be compatible with the product.

  • currencyoptional

    Filter the native currency, such as IDR, USD or MYR. This does not convert prices.

  • producer_typeoptional

    Applies to Indonesian FFB purchase schedules; not accepted with product=cpo.

  • producer_arrangementoptional

    purchase_agreement or supported_scheme. Applies to Indonesian FFB schedules; not accepted with product=cpo.

  • limitoptional

    Maximum series per page. Defaults to 100.

  • cursoroptional

    Continue with the returned next_cursor and every original filter and limit unchanged.

Response fields

  • seriesarray

    Complete approved series ordered by stable series_id.

  • series[].series_idstring

    Stable identity used by the history operation.

  • series[].product / series[].countrystrings

    Product and geographic scope.

  • series[].areastring

    National series omit area. Regional IDs may use the nwl-* namespace.

  • series[].observation_type / series[].period_typeenums

    scalar or age_schedule; effective or observation. These define the response variant and date semantics.

  • series[].price_type / series[].currency / series[].unitstrings

    The source-defined price type, currency and native unit.

  • series[].unit_keystring

    unit_key is the unit in one standard spelling, such as troy_ounce, barrel or tonne; unit keeps the source's wording. When a price is quoted in cents, price_scale is 0.01: multiply the price by it to get the amount in currency.

  • series[].producer_arrangementstring

    Present only on Indonesian FFB age-schedule series when the source names an arrangement. Omitted otherwise.

  • series[].frequency / series[].coverage_start / series[].coverage_endstring and dates

    Cadence and accepted history bounds, not a guarantee of uninterrupted coverage.

  • next_cursorstring or null

    Continuation token, or null when there are no more series.


Full reference →
GETGet latest Palm oil physical price/v1/commodities/palmoil/physical/{series_id}

Get the latest accepted Palm oil observation.

Parameters

  • series_idrequired

    Use an ID returned by discovery.

  • price_monthoptional

    MPOB CPO only. Selects one quoted month; defaults to each report's own month.

Response fields

  • series_idstring

    Stable physical-series identity.

  • currency / unitstrings

    Currency and native unit: kilogram for Indonesian FFB schedules, metric_ton for CPO, or one_percent_oer for Malaysian FFB references.

  • unit_keystring

    unit_key is the unit in one standard spelling, such as troy_ounce, barrel or tonne; unit keeps the source's wording. When a price is quoted in cents, price_scale is 0.01: multiply the price by it to get the amount in currency.

  • period_start / period_enddates

    Effective prices use inclusive dates. MPOB uses the report date through the next day, with an exclusive end.

  • revisioninteger

    Revision of the price or complete schedule.

  • price or pricesdecimal string or complete array

    A positive decimal-string price, or a complete prices array with tree_age_min_years, tree_age_max_years and price. Both age bounds are inclusive. Malaysian FFB stays in one_percent_oer.

  • price_monthYYYY-MM

    Required for MPOB CPO quotes; identifies the quoted month; period_start and period_end identify the report-day observation interval.


Full reference →
GETGet Palm oil physical history/v1/commodities/palmoil/physical/{series_id}/observations

Get oldest-first Palm oil observations.

Parameters

  • series_idrequired

    Series returned by discovery.

  • startoptional

    Inclusive range start; supply it with end. Indonesian effective periods are included when they overlap the range. Malaysian daily prices are selected by report date.

  • endoptional

    Exclusive upper bound. It must be later than start.

  • limitoptional

    Maximum observations to return. Defaults to 100; age schedules remain complete.

  • cursoroptional

    Continue with every original parameter unchanged, including series_id, dates, limit and price_month. A changed publication can expire the cursor.

  • price_monthoptional

    MPOB CPO only. Selects one quoted month; defaults to each report's own month.

Response fields

  • series_idstring

    Stable physical-series identity.

  • currency / unitstrings

    Currency and native unit shared by every observation.

  • unit_keystring

    unit_key is the unit in one standard spelling, such as troy_ounce, barrel or tonne; unit keeps the source's wording. When a price is quoted in cents, price_scale is 0.01: multiply the price by it to get the amount in currency.

  • observationsarray

    Period, revision, and scalar value or complete schedule ordered oldest first; MPOB CPO rows retain price_month; Malaysian CPO and FFB rows retain their report-day period_start/period_end.

  • next_cursorstring or null

    Opaque continuation token, or null at the end.


Full reference →

Use cases

Oil price per litre and gallon

Convert Brent or WTI from dollars per barrel to litres and gallons.

Read the guide →

Copper price per kg and tonne

Convert copper from dollars per pound to kilograms and metric tonnes.

Read the guide →

Prices in your currency

Get a commodity price in your own currency, such as rupiah per gram.

Read the guide →

Commodity price indexation

Move a contract price with a commodity index between two months.

Read the use case →

Coverage

Show all 53 commodities

Related APIs

Spot metals price API

Gold, silver, platinum and palladium spot prices, plus WTI, Brent and copper reference prices.

Explore the API →

Physical commodity prices API

Palm oil, daily oil and gas prices, weekly US retail fuel prices and monthly commodity benchmarks, with units as published.

Explore the API →

Exchange rate API

Current exchange rates, currency conversion and stored rate history.

Explore the API →

Pricing

$10 of free credit a month, then from $2 per 1,000 calls.

See pricing →

FAQ

Which commodity API is live?

The live release covers spot metals and physical commodities. Futures are not public.

Can I retrieve historical prices?

Yes. Request observations for an admitted palm oil series; the response preserves native units, effective dates, revisions, and source gaps.

What should I check before using the data?

Units, price types, geography, and effective periods remain attached to each admitted series. Futures products are not currently public.