Loading
Loading
Calculate price change and percentage movement for any commodity over a custom date range. Returns the opening price, closing price, absolute change, and percentage change for each symbol.
Pass one or more commodity symbols with a startDate and endDate in YYYY-MM-DD format. The response contains the start and end prices plus the absolute and percentage change for each symbol, rounded to 2 decimal places. There's no limit on the date range; for monthly-updated commodities the fluctuation is computed between the first day of the start month and the first day of the end month. If some symbols can't be resolved, a 206 Partial Content response is returned with an unresolved object instead of failing the whole request.
Authorize every request with your API key, passed either as a header or as a query parameter:
X-apiKeyapiKeyThis is version v2.0 of the API.
All three parameters are required. The startDate must not be after endDate.
formatoptionalStringdefault: jsonjson.symbolsrequiredStringComma-separated list of commodity symbols. Visit the supported symbols list for all valid values.
startDaterequiredStringStart date for the fluctuation range. Format: YYYY-MM-DD.
endDaterequiredStringEnd date for the fluctuation range. Format: YYYY-MM-DD.
A successful request returns a 200 OK with fluctuation data for each requested symbol over the specified date range.
successtrue for successful requests.
startDateStart date of the fluctuation interval. Format: YYYY-MM-DD.
endDateEnd date of the fluctuation interval. Format: YYYY-MM-DD.
Object where each key is a commodity symbol and the value contains fluctuation metrics.
Present only on a 206 Partial Content response, when some requested symbols could not be resolved. Object where each key is an unresolved symbol and the value contains a detail message.
Besides the response body, every response carries custom headers you can use to track credit usage, and concurrency usage on endpoints that enforce a concurrency limit. See the Custom Response Headers documentation and the endpoints with concurrency limits for more details.
X-Concurrent-Threadsheaderconcurrency-limited endpointsSpecifies the maximum number of concurrent requests allowed.
X-Concurrent-Threads-Activeheaderconcurrency-limited endpointsIndicates the number of active concurrent requests being processed.
X-AF-Credits-Costheaderall responsesSpecifies the number of credits consumed by the current request.
See the HTTP Status Codes documentation for a complete reference of common API errors and HTTP status codes.
please pass correct parameters
Invalid Date Format (YYYY-MM-DD).
Invalid Date: The provided start date or end date does not exist.
Start date cannot be after end date
Maximum symbols per request exceeded
The symbol is not supported, please visit the documentation for a list of supported symbols
No data found for the given date range