Get commodity indicator data
Returns commodity and energy price observations with source provenance.
Supported indicators: crude_oil_inventories, gold, natural_gas, natural_gas_storage, 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. 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 — sourced from the U.S. Energy Information Administration (https://api.eia.gov/v2/).
- WTI crude oil (oil_wti): Cushing, OK spot price, USD/barrel.
- Brent crude oil (oil_brent): Europe spot price, USD/barrel.
- Natural gas (natural_gas): Henry Hub spot price, USD/MMBtu.
Query Parameters:
- start_date: Earliest date to include (YYYY-MM-DD). Defaults to 365 days ago.
- end_date: Latest date to include (YYYY-MM-DD). Defaults to today.
Authentication: A professional API key is required. Supply it via ?api_key=<key> or the X-API-Key header.
Request
- Base URL: https://api.fxmacrodata.com
- URL: https://api.fxmacrodata.com/v1/commodities/{indicator}
- Auth: one of:
- none
- API key in header X-API-Key
- HTTP bearer
Path parameters
Commodity indicator slug
Required path parameter. Commodity indicator slug Allowed values: crude_oil_inventories, gold, natural_gas, natural_gas_storage, oil_brent, oil_wti, platinum, silver.
Query parameters
Start date YYYY-MM-DD
Optional query parameter. Start date YYYY-MM-DD
End date YYYY-MM-DD
Optional query parameter. End date YYYY-MM-DD
Maximum rows to return. Defaults to 20. Maximum 100.
Optional query parameter. Maximum rows to return. Defaults to 20. Maximum 100.
Number of rows to skip after most-recent-first ordering.
Optional query parameter. Number of rows to skip after most-recent-first ordering.
One-based page number. When supplied, it takes precedence over offset.
Optional query parameter. One-based page number. When supplied, it takes precedence over offset.
Your Individual or Business API key
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.
Response
Time-series data for the requested commodity indicator.
Changes
No recorded changes to this operation across all 1 revision of this API.