API Freaks logoAPI Freaks logo
CTRL+K

    Documentation

  • Pricing

  • Resources

  • Tools

  • Contact us

CTRL+K
Sign InGet Started For Free
  • Overview
  • Documentation
  • How to Guides
  • Pricing
  • APIFreaks
  • Organization and Teams
  • Credits Usage API
  • IP Geolocation Lookup API
  • Bulk IP Geolocation Lookup
  • Domain WHOIS Lookup
  • IP WHOIS Lookup
  • ASN Lookup
  • Domain WHOIS Historical Lookup
  • Domain WHOIS Reverse Lookup
  • Bulk Domain WHOIS Lookup
  • DNS Lookup
  • Historical DNS Lookup
  • Reverse DNS Lookup
  • Bulk DNS Lookup
  • SSL Certificate Lookup
  • Domain Availability API
  • Bulk Domain Availability API
  • Screenshot API
  • Bulk Screenshot API
  • Currencies Exchange Rates API
  • Currency Converter API
  • Currency Time Series API
  • Currency Fluctuation API
  • Geolocalized Currency Converter
  • Live Commodity Prices
  • Commodity Historical Prices
  • Commodity Fluctuation API
  • Commodity Time Series API
  • Timezone Lookup
  • Timezone Converter
  • Zipcode Lookup API
  • User Agent Parser
  • Bulk User Agent Parser
  • Astronomy API

Commodities Time Series API

See every move in the market—day by day, dollar by dollar.

When you need more than a single closing price for a range of period (up to an year), the Commodities Time Series API delivers. Specify any supported symbol (goldXAU, Brent crude BRENTOIL, wheat ZW, and 100+ more) plus a start and end date, and you'll receive a complete day-by-day record: open, high, low, and close. The result is a clean JSON timeline you can plot, model, or feed straight into dashboards—so analysts, traders, and researchers always know exactly how the market evolved, not just where it ended.

Developer Tip - Pair with Fluctuation API

Use this endpoint to show daily OHLC values. Then plug in the same range to the fluctuation API for instant % change. Best for summary cards and tooltips.

This combo gives both the journey and the destination.

10K Free Credits, No Credit Card Required

Features that Turn Data into Insight

Daily price granularity

Track open, high, low, and close (OHLC) for every trading day up to 365 days—ideal for plotting candlestick charts or analyzing daily market behavior with accuracy.

Supports 100+ commodities

From Gold (XAU, in USD per troy ounce) to Brent Crude (BRENTOIL, in USD per barrel), you get consistent formatting across metals, energy, agriculture, and industrials.

Documentation

API Endpoint

GET

https://api.apifreaks.com/v1.0/commodity/time-series

Test
LANGUAGE
Python
PHP
Java
Node
Ruby
JavaScript
C#
$ pip install requests

API Request

ParameterRequiredTypeDefaultDescription
symbolsYesArray-Comma separated list of desired commodities symbols.
startDateYesString-Start Date for the timeseries. Format: YYYY-MM-DD
endDateYesString-End Date for the timeseries. Format: YYYY-MM-DD

View the full list of supported symbols by visiting here.

NOTE: The maximum difference between the start and end date is 365 days.

API Response

For a comprehensive view of the API response structure and detailed field descriptions, explore the interactive Response Table by clicking here.

HTTP Error Codes

HTTP StatusReasons
400
(1) Invalid date format specified for start or end date. (2) Start date cannot be after end date. (3) Difference between start and end date cannot be greater than 30 days. (4) Invalid Date: The provided date does not exist.
404
(1) No data found for the specified date range. (2) The symbol is not supported, please visit the documentation for a list of supported symbols.

How-To-Guides

How to Use the Commodities Time Series API

Getting started is straightforward. You only need the commodity symbol (like XAU for Gold, BRENTOIL for Brent Crude) and the date range that you are looking for.

This endpoint returns daily OHLC candles (Open, High, Low, Close) for every date that data is available — skipping non-trading days automatically.

For example, if you're tracking Gold (XAU) from 2025-01-01 to 2025-03-01, the API will return daily price points for each valid market day within that range.

If the date range includes weekends or holidays, those days are simply excluded from the output.

$ curl -X 'GET' 'https://api.apifreaks.com/v1.0/commodity/time-series?apikey=API-KEY&symbols=XAU&startDate=2025-01-01&endDate=2025-03-01'
#Response { "success": true, "startDate": "2025-01-01", "endDate": "2025-03-01", "rates": { "2025-01-01": { "XAU": { "open": 2659.08, "high": 2664.85, "low": 2656.34, "close": 2662.84 } }, "2025-01-02": { "XAU": { "open": 2658.42, "high": 2665.25, "low": 2636.46, "close": 2638.28 } }, "2025-01-03": { "XAU": { "open": 2658.42, "high": 2665.25, "low": 2636.46, "close": 2638.28 } }, "2025-01-04": { "XAU": { "open": 2641.12, "high": 2647.21, "low": 2634.46, "close": 2635.45 } }, "2025-01-05": { "XAU": { "open": 2634.09, "high": 2640.84, "low": 2633.18, "close": 2638.16 } }, "2025-01-06": { "XAU": { "open": 2649.01, "high": 2651.33, "low": 2645.36, "close": 2646.91 } }, "2025-01-07": { "XAU": { "open": 2662.45, "high": 2663.06, "low": 2655.66, "close": 2658.9 } }, "2025-01-08": { "XAU": { "open": 2669.69, "high": 2674.68, "low": 2668.58, "close": 2671.8 } }, "2025-01-09": { "XAU": { "open": 2669.89, "high": 2697.87, "low": 2663.16, "close": 2685.61 } }, "2025-01-10": { "XAU": { "open": 2669.89, "high": 2697.87, "low": 2663.16, "close": 2685.61 } }, "2025-01-12": { "XAU": { "open": 2690.9, "high": 2693.04, "low": 2679.72, "close": 2685.99 } }, "2025-01-13": { "XAU": { "open": 2667.18, "high": 2674.01, "low": 2666.91, "close": 2673.49 } }, "2025-01-14": { "XAU": { "open": 2674.51, "high": 2676.66, "low": 2669.73, "close": 2675.38 } }, "2025-01-15": { "XAU": { "open": 2694.9, "high": 2701.05, "low": 2693.26, "close": 2697.38 } }, "2025-01-16": { "XAU": { "open": 2714.22, "high": 2717.12, "low": 2710.31, "close": 2714.71 } }, "2025-01-17": { "XAU": { "open": 2714.5, "high": 2717.39, "low": 2698.57, "close": 2700.99 } }, "2025-01-19": { "XAU": { "open": 2696.33, "high": 2706.51, "low": 2689.47, "close": 2705.92 } }, "2025-01-20": { "XAU": { "open": 2709.72, "high": 2727.71, "low": 2703.12, "close": 2727.22 } }, "2025-01-21": { "XAU": { "open": 2743.85, "high": 2752.86, "low": 2742.49, "close": 2752.09 } }, "2025-01-22": { "XAU": { "open": 2755.06, "high": 2756, "low": 2749.57, "close": 2751.41 } }, "2025-01-23": { "XAU": { "open": 2754.44, "high": 2776.92, "low": 2754.3, "close": 2772.03 } }, "2025-01-24": { "XAU": { "open": 2754.45, "high": 2785.86, "low": 2754.24, "close": 2770.14 } }, "2025-01-26": { "XAU": { "open": 2767.28, "high": 2771.87, "low": 2755.64, "close": 2758.03 } }, "2025-01-27": { "XAU": { "open": 2741.54, "high": 2744.89, "low": 2738.02, "close": 2742.28 } }, "2025-01-28": { "XAU": { "open": 2763.44, "high": 2765.86, "low": 2761.39, "close": 2762.84 } }, "2025-01-29": { "XAU": { "open": 2759.64, "high": 2763.39, "low": 2758.91, "close": 2760.35 } }, "2025-01-30": { "XAU": { "open": 2793.92, "high": 2799.28, "low": 2794.42, "close": 2795.6 } }, "2025-01-31": { "XAU": { "open": 2796.18, "high": 2817.12, "low": 2790.96, "close": 2797.16 } }, "2025-02-02": { "XAU": { "open": 2793.64, "high": 2795.34, "low": 2772.37, "close": 2780.74 } }, "2025-02-03": { "XAU": { "open": 2793.2, "high": 2830.49, "low": 2772.11, "close": 2813.75 } }, "2025-02-04": { "XAU": { "open": 2841.63, "high": 2857.93, "low": 2839.94, "close": 2855.21 } }, "2025-02-05": { "XAU": { "open": 2841.4, "high": 2882.26, "low": 2839.53, "close": 2869.13 } }, "2025-02-06": { "XAU": { "open": 2857.8, "high": 2870.29, "low": 2857.81, "close": 2866.56 } }, "2025-02-07": { "XAU": { "open": 2857.92, "high": 2886.72, "low": 2852.39, "close": 2859.47 } }, "2025-02-09": { "XAU": { "open": 2867.51, "high": 2879.48, "low": 2866.1, "close": 2878.89 } }, "2025-02-10": { "XAU": { "open": 2917.64, "high": 2941.96, "low": 2909.5, "close": 2916.25 } }, "2025-02-11": { "XAU": { "open": 2898.6, "high": 2897.95, "low": 2883.67, "close": 2885.39 } }, "2025-02-12": { "XAU": { "open": 2905.71, "high": 2919.11, "low": 2901.6, "close": 2918.46 } }, "2025-02-13": { "XAU": { "open": 2931.02, "high": 2933.42, "low": 2923.68, "close": 2928.42 } }, "2025-02-14": { "XAU": { "open": 2931.6, "high": 2939.95, "low": 2876.83, "close": 2880.76 } }, "2025-02-16": { "XAU": { "open": 2879.52, "high": 2904.89, "low": 2879.76, "close": 2899.21 } }, "2025-02-17": { "XAU": { "open": 2899.16, "high": 2910.24, "low": 2892.4, "close": 2909.31 } }, "2025-02-18": { "XAU": { "open": 2933.82, "high": 2938.97, "low": 2925.06, "close": 2928.69 } }, "2025-02-19": { "XAU": { "open": 2935.53, "high": 2943.82, "low": 2934.67, "close": 2940.91 } }, "2025-02-20": { "XAU": { "open": 2941.35, "high": 2949.07, "low": 2926.96, "close": 2928.95 } }, "2025-02-21": { "XAU": { "open": 2941.35, "high": 2949.64, "low": 2916.72, "close": 2934 } }, "2025-02-23": { "XAU": { "open": 2934.88, "high": 2940.49, "low": 2934.04, "close": 2936.86 } }, "2025-02-24": { "XAU": { "open": 2949.9, "high": 2952.15, "low": 2935.1, "close": 2936.27 } }, "2025-02-25": { "XAU": { "open": 2918.34, "high": 2929.35, "low": 2912.84, "close": 2914.39 } }, "2025-02-26": { "XAU": { "open": 2919.27, "high": 2919.1, "low": 2897, "close": 2897.06 } }, "2025-02-27": { "XAU": { "open": 2875.6, "high": 2884.5, "low": 2857, "close": 2863.75 } }, "2025-02-28": { "XAU": { "open": 2875.6, "high": 2884.96, "low": 2832.51, "close": 2856.91 } } } }

Pricing

To access the Commodity Time Series API, API credits are required. Credits are only deducted for successful requests (2xx status code). If a request returns a 4xx or 5xx status code, no credits will be charged, and any previously deducted credits will be refunded.

Each successful Commodity Fluctuation request costs 40 credits, plus 1 credit for each symbol included in the request.

If you provide both valid and invalid symbols, the API will return a successful 2xx response with only the valid symbols included. No credits are deducted for invalid symbols, and any credits charged for them will be refunded.

Utilize the Credits Usage API to efficiently monitor your recent consumption of both one-off and subscription credits. This API provides a streamlined way to track and manage your credit usage, helping you stay informed about your remaining balance and optimize your resource allocation effectively.

Price Estimation Calculator

Ready to get started?

Sign Up for Free

APIFreaks

API Catalog

  • Geolocation APIs
  • WHOIS APIs
  • DNS APIs
  • SSL APIs
  • Domain Availability APIs
  • Screenshot APIs
  • Currency APIs
  • Commodity APIs
  • Timezone APIs
  • Zipcode APIs
  • User Agent APIs
  • Other APIs

Tools Catalog

  • Formatters & Beautifiers
  • Converters & Optimizers
  • Viewers & Validators

Docs

  • Documentation
  • Swagger Docs

Pricing & Accounts

  • Pricing
  • Sign up
  • Sign In

Company

  • About Us
  • Resources
  • Terms
  • Privacy

Copyright © 2024

Made in Pakistan