Skip to content

Rates and markets endpoint

Commodities

Energy and precious-metals prices, the commodity side of currencies like CAD, NOK and AUD.

GET/v1/commodities/latest
Individual API key required AI tool: commodities

An active Individual subscription and API key are required for every request.

2Routes
8Parameters
JSONResponse
curl -H "X-API-Key: YOUR_API_KEY" \
  "https://api.fxmacrodata.com/v1/commodities/latest"

What it can do

2 routes in this endpoint

Example response

What comes back

A shortened example of the JSON this endpoint returns. Lists are cut to two rows here.

200 OK
{
  "currency": "COMM",
  "indicator": "gold",
  "source": "National Bank of Ukraine",
  "source_url": "https://bank.gov.ua/en/markets/exchangerates",
  "has_official_forecast": false,
  "start_date": "2026-10-01",
  "end_date": "2026-10-05",
  "data": [
    {
      "date": "2026-10-05",
      "val": 4182.862,
      "announcement_date": "2026-10-02",
      "announcement_timezone": "Europe/Kyiv",
      "market_date": "2026-10-02",
      "market_date_status": "publisher_setting_date",
      "time_announced": false,
      "publication_time_status": "unknown",
      "source_series_id": "NBU:XAU:UAH/USD",
      "source_value": 188168.98,
      "source_unit": "UAH per troy ounce",
      "conversion_rate": 44.9857,
      "conversion_unit": "UAH per USD",
      "cross_check_val": 4158.925,
      "cross_check_divergence_pct": 0.576,
      "cross_check_divergent": false
    }
  ]
}

Reference

Parameters and response fields

GET /v1/commodities/latest Get latest values for all commodity indicators
Individual API key required

An active Individual subscription and API key are required for every request.

Parameters

NameInTypeDetails
api_key query string Deprecated: legacy query-string API key. Still accepted so existing integrations keep working, but new integrations must send the key in the X-API-Key header (or Authorization: Bearer). A key is required for non-USD, paid-only, or full-history requests. Responses to requests authenticated this way carry a Deprecation header.
lang query string Optional language for names and labels, for example es or pt-BR. A regional tag falls back to its base language, and a language that is not yet available returns English with Content-Language: en. Translated fields keep the English text in <field>_original and add a <field>_localized flag. Slugs, field names, codes, dates and values never change. Omit it for English.

Response fields

FieldTypeDetails
currencystring
sourcestring
as_ofstringNewest observation date across available indicators; this does not certify that every indicator is current.
is_staleboolean
stale_indicators[]string[]
freshnessobject
freshness.statusstringAggregate freshness: current, partial, or failed. Inspect each indicator's date and quality for its own freshness.
freshness.configured_countinteger
freshness.available_countinteger
freshness.oldest_available_datestring
freshness.newest_available_datestring
freshness.stale_indicators[]string[]
freshness.unavailable_indicators[]string[]
freshness.source_failure_indicators[]string[]
freshness.unknown_freshness_indicators[]string[]
countinteger
data[]object[]
data[].indicatorstring
data[].unitstring
data[].frequencystring
data[].has_official_forecastboolean
data[].last_updatedstring
data[].observation_datestringOfficial observation date of latest; an alias of latest.date.
data[].latest_available_datestring
data[].is_staleboolean
data[].data_lag_daysinteger
data[].ingest_statusobject
data[].ingest_status.statestring
data[].ingest_status.last_attempt_atstring
data[].ingest_status.last_success_atstring
data[].ingest_status.latest_available_datestring
data[].ingest_status.data_lag_daysinteger
data[].ingest_status.is_staleboolean
data[].ingest_status.error_codestring
data[].data_qualityobject
data[].data_quality.source_freshnessstring

Full schema in the API reference

GET /v1/commodities/{indicator} Get commodity indicator data
Individual API key required

An active Individual subscription and API key are required for every request.

Returns commodity and energy price observations with source provenance.

Supported indicators: crude_oil_inventories, crude_oil_stocks, distillate_inventories, distillate_stocks, gasoline_inventories, gasoline_stocks, gold, natural_gas, natural_gas_storage, natural_gas_storage_level, oil_brent, oil_wti, platinum, silver.

The supported-indicator list above is the complete list of indicators this endpoint serves.

Precious metals — official central-bank publications, USD/troy oz.

  • Gold, silver, platinum (and palladium where listed above): National Bank of Ukraine official accounting prices of banking metals (https://bank.gov.ua/en/markets/exchangerates), converted to USD with the NBU official UAH/USD rate for the same official rate date. date is the official rate date and announcement_date is the Kyiv business day the NBU set it; no publication clock is asserted. The NBU sets each price on the working day before its rate date, so a row reflects the market of the day before date. market_date gives that day: use it, not date, to line a price up with market events. market_date_status is publisher_setting_date when the NBU recorded the day (July 2019 onward) and assumed_previous_publication for earlier rows, where it is the previous publication's rate date. Source: National Bank of Ukraine (https://bank.gov.ua/en/open-data).
  • Gold comparisons use the Narodowy Bank Polski calculated gold price (PLN per gram, converted with the same-date NBP USD mid rate). Cross-checks are best effort over the most recent 93 calendar days; where a comparison is available, rows carry cross_check_divergence_pct. NBP rows (source_series_id starting NBP:) are served only for dates the NBU did not supply.
  • These are official reference prices, not executable quotes or LBMA auction prices. Weekday-label coverage is included.

Energy prices

  • WTI crude oil (oil_wti): Plains Marketing posted purchase price in Texas, USD/barrel.
  • Brent crude oil (oil_brent): Europe spot price, USD/barrel.
  • Natural gas (natural_gas): Henry Hub spot price, USD/MMBtu.

Authentication: A professional API key is required. Supply it via ?api_key=<key> or the X-API-Key header.

Parameters

NameInTypeDetails
indicatorRequired path string Commodity indicator slug Allowed: 14 indicators.
start_date query string Start date YYYY-MM-DD
end_date query string End date YYYY-MM-DD
limit query integer Maximum rows to return. Defaults to 20. Maximum 100. Default: 20.
offset query integer Number of rows to skip after most-recent-first ordering. Default: 0.
page query integer One-based page number. When supplied, it takes precedence over offset.
api_key query string Deprecated: legacy query-string API key. Still accepted so existing integrations keep working, but new integrations must send the key in the X-API-Key header (or Authorization: Bearer). A key is required for non-USD, paid-only, or full-history requests. Responses to requests authenticated this way carry a Deprecation header.
lang query string Optional language for names and labels, for example es or pt-BR. A regional tag falls back to its base language, and a language that is not yet available returns English with Content-Language: en. Translated fields keep the English text in <field>_original and add a <field>_localized flag. Slugs, field names, codes, dates and values never change. Omit it for English.

Response fields

FieldTypeDetails
currencystring
indicatorstring
sourcestring
source_urlstring
provenanceobjectPublisher and source lineage, shared by the market-data endpoints.
provenance.publisherstring
provenance.publisher_urlstring
provenance.storagestringData provider label for the served series. Always FXMacroData.
provenance.source_storestringSource series reference, when reported.
provenance.served_bystringFXMacroData endpoint that serves this series.
provenance.timestamp_fieldstring
provenance.value_fieldstring
has_official_forecastboolean
last_updatedstring
latest_available_datestring
data_qualityobject
data_quality.source_freshnessstring
data_quality.source_monitoring_completeboolean
data_quality.known_source_gapboolean
data_quality.source_checked_atinteger
data_quality.source_check_expires_atinteger
data_quality.latest_published_periodstring
data_quality.source_permission_statusstring
data_quality.commodity_coverageobject
data_quality.commodity_coverage.scopestring
data_quality.commodity_coverage.requested_startstring
data_quality.commodity_coverage.requested_endstring
data_quality.commodity_coverage.available_startstring
data_quality.commodity_coverage.available_endstring
data_quality.commodity_coverage.input_row_countinteger
data_quality.commodity_coverage.row_countinteger
data_quality.commodity_coverage.distinct_date_countinteger
data_quality.commodity_coverage.duplicate_date_row_countinteger
data_quality.commodity_coverage.excluded_weekend_row_countinteger
data_quality.commodity_coverage.invalid_date_row_countinteger
data_quality.commodity_coverage.expected_weekday_label_countinteger

Full schema in the API reference

Works well with

Endpoints people use alongside Commodities

The whole API

All 24 endpoint guides

Open the endpoint map

AI Answer-Ready

Key Facts

Page
Commodities
Section
Documentation
Canonical URL
https://fxmacrodata.com/documentation/endpoints/commodities
Source
FXMacroData editorial and official publisher references
Last Updated
See page metadata

Provenance And Trust

Cite the canonical URL and source field above. Where available, this page maps to official publisher releases and timestamped updates.

Quick Q&A

What is this page about? This page explains Commodities with directly usable context for trading, research, and API workflows.

What source should be cited? Use the canonical URL and the listed source field; cite official publisher references when available.

How fresh is this content? The last updated value above reflects the page metadata or latest available data timestamp.

Can this be used in AI assistants? Yes. This section is intentionally structured for retrieval and citation in chat assistants.

Prompt Packs

Use these in ChatGPT, Claude, Gemini, Mistral, Perplexity, or Grok for consistent source-aware outputs.