Comparing Gold Spot Price Index vs Silver Spot Price Index with Indices-API Fluctuation Data for Market Insights
You need to answer a concrete business question: did gold or silver move more over a specific window, and by how much, in percentage terms? By the end of this guide you’ll be able to programmatically compare the Gold Spot Price Index vs the Silver Spot Price Index using Indices-API fluctuation data, turn it into comparison metrics for dashboards and alerts, and understand the subtle implementation details (symbols, base currency, non-trading days, caching, and date windows) that make these results reliable.
What you’ll build: a fluctuation-based comparison of gold vs silver
Our target workflow is simple and shippable:
- Pull gold and silver spot index fluctuations between two dates using the Fluctuation endpoint.
- Compute and display absolute and percent changes side by side.
- Optionally backfill with a time series to visualize the move.
- Codify when to alert (e.g., silver up 3% while gold is flat).
We’ll focus on two endpoints that directly support this job: Fluctuation (for changes between two dates) and Time-series (to visualize and debug the move). If you also need daily range context, we’ll show how to fold in OHLC. For everything else, see the Indices-API Documentation.
Symbols: verify gold and silver spot index codes before coding
Indices-API exposes indices via canonical symbols. Because commodity and spot indices can vary by venue and methodology, do not guess the symbol codes for Gold Spot Price Index and Silver Spot Price Index. Confirm them on the Indices-API Supported Symbols page before you make requests. In the examples below, replace GOLD_SYMBOL and SILVER_SYMBOL with the exact codes shown on that page.
If you’re unsure which is the “spot price index” vs a futures or composite index, check the symbol’s description and unit. The API returns a “unit” field like “per index,” alongside a “base” currency, typically USD.
How Indices-API quotes commodities and indices (base, units, and updates)
All data in this API is delivered relative to a base currency. By default, responses are in USD (“base”: “USD”), and quotes are returned as rates per index (unit: “per index”). For spot metals, interpret rates as the USD price per index unit of the metal’s spot index (as defined by the symbol). This keeps quoting consistent with stock and international indices.
Update frequency depends on your plan; latest values are updated at fixed intervals (e.g., every 60 minutes or every 10 minutes). For historical windows (Fluctuation and Time-series), data is returned at daily granularity. Weekends and market holidays typically do not produce new values; the API will not fabricate a value for non-trading days. Always set your end_date to a completed trading day. Do not pass “today” as end_date; use the last completed date to avoid partial data and the API constraint that end_date cannot be today.
Endpoint #1: Fluctuation (the fastest way to compare gold vs silver over a period)
The Fluctuation endpoint returns start_rate, end_rate, absolute change, and percentage change between two calendar dates for each requested symbol. This is ideal for a daily, weekly, or monthly leaderboard of moves.
Before you run the call: pick dates and confirm symbols
- start_date and end_date must be completed days (YYYY-MM-DD). end_date cannot be today; use the last fully closed day in UTC.
- Confirm the symbol codes for Gold Spot Price Index and Silver Spot Price Index on the Symbols page and substitute below.
- Cache results for your chosen window to avoid redundant calls across dashboards; fluctuation values for a fixed date range are immutable.
Fluctuation: curl example
Replace GOLD_SYMBOL and SILVER_SYMBOL with the exact symbols from the Symbols page and provide your API key via access_key.
curl -s "https://indices-api.com/v1/fluctuation?access_key=YOUR_API_KEY&start_date=2026-10-04&end_date=2026-10-11&symbols=GOLD_SYMBOL,SILVER_SYMBOL"
Sample JSON structure you’ll parse from Fluctuation
The following is the official format example for the Fluctuation endpoint (fields and structure). Your gold and silver symbols will appear as top-level keys under rates:
{
"success": true,
"fluctuation": true,
"start_date": "2026-10-04",
"end_date": "2026-10-11",
"base": "USD",
"rates": {
"DOW": {
"start_rate": 0.00028,
"end_rate": 0.00029,
"change": 1.0e-5,
"change_pct": 3.57
},
"NASDAQ": {
"start_rate": 0.00038,
"end_rate": 0.00039,
"change": 1.0e-5,
"change_pct": 2.63
},
"S&P 500": {
"start_rate": 0.0124,
"end_rate": 0.0125,
"change": 0.0001,
"change_pct": 0.81
},
"FTSE 100": {
"start_rate": 0.0124,
"end_rate": 0.0125,
"change": 0.0001,
"change_pct": 0.81
},
"DAX": {
"start_rate": 0.0126,
"end_rate": 0.0126,
"change": 0,
"change_pct": 0
},
"CAC 40": {
"start_rate": 0.0126,
"end_rate": 0.0126,
"change": 0,
"change_pct": 0
},
"NIKKEI 225": {
"start_rate": 0.0126,
"end_rate": 0.0126,
"change": 0,
"change_pct": 0
}
},
"unit": "per index"
}
Fields you’ll use:
- base: the base currency (USD by default) that rates are expressed in.
- start_date / end_date: the window for your comparison, inclusive.
- rates[SYMBOL].start_rate / end_rate: the start and end values in base terms.
- rates[SYMBOL].change and change_pct: precomputed absolute and percent changes per symbol.
- unit: expresses what a single “rate” unit maps to (per index).
For your gold vs silver comparison, you’ll compute simple rankings (e.g., which has larger change_pct), set alert thresholds, and drive a bar chart with both change and change_pct. Persist the start_rate and end_rate if you need to reconstruct the series perimeter later.
Fluctuation: Python example
This snippet fetches the fluctuation data for gold and silver, then prints the headline comparison. Replace GOLD_SYMBOL and SILVER_SYMBOL with the verified symbols from the Symbols page.
import os
import requests
from datetime import date, timedelta
API_KEY = os.getenv("INDICES_API_KEY", "YOUR_API_KEY")
base_url = "https://indices-api.com/v1/fluctuation"
# Always use the last completed day in UTC for end_date.
end_date = date(2026, 10, 11) # example closed day
start_date = end_date - timedelta(days=7)
gold_symbol = "GOLD_SYMBOL" # confirm on Symbols page
silver_symbol = "SILVER_SYMBOL" # confirm on Symbols page
params = {
"access_key": API_KEY,
"start_date": start_date.isoformat(),
"end_date": end_date.isoformat(),
"symbols": f"{gold_symbol},{silver_symbol}",
}
r = requests.get(base_url, params=params, timeout=30)
r.raise_for_status()
data = r.json()
if not data.get("success"):
raise SystemExit(f"API error: {data}")
base = data["base"]
unit = data.get("unit")
gold = data["rates"][gold_symbol]
silver = data["rates"][silver_symbol]
print(f"Base: {base}, Unit: {unit}")
print(f"{gold_symbol} change: {gold['change']} ({gold['change_pct']}%)")
print(f"{silver_symbol} change: {silver['change']} ({silver['change_pct']}%)")
winner = gold_symbol if gold["change_pct"] > silver["change_pct"] else silver_symbol
print(f"Stronger mover this window: {winner}")
Endpoint #2: Time-series (to visualize and debug the move)
Once you’ve identified the stronger mover via Fluctuation, you’ll often want to visualize the path. Time-series gives daily rates between start_date and end_date. It’s also useful to validate the endpoints agree: the first and last values in the series for each symbol should match the fluctuation start_rate and end_rate for the same window.
Time-series: sample JSON structure
The following shows the format of a time-series response. For your gold vs silver comparison, replace the indices in the inner objects with GOLD_SYMBOL and SILVER_SYMBOL returned by the API.
{
"success": true,
"timeseries": true,
"start_date": "2026-10-04",
"end_date": "2026-10-11",
"base": "USD",
"rates": {
"2026-10-04": {
"DOW": 0.00028,
"NASDAQ": 0.00038,
"S&P 500": 0.00023,
"FTSE 100": 0.0124,
"DAX": 0.0126,
"CAC 40": 0.0126,
"NIKKEI 225": 0.0126
},
"2026-10-06": {
"DOW": 0.00029,
"NASDAQ": 0.00039,
"S&P 500": 0.00024,
"FTSE 100": 0.0124,
"DAX": 0.0126,
"CAC 40": 0.0126,
"NIKKEI 225": 0.0126
},
"2026-10-11": {
"DOW": 0.00029,
"NASDAQ": 0.00039,
"S&P 500": 0.00024,
"FTSE 100": 0.0124,
"DAX": 0.0126,
"CAC 40": 0.0126,
"NIKKEI 225": 0.0126
}
},
"unit": "per index"
}
Use these fields:
- rates[YYYY-MM-DD][SYMBOL]: the daily value for a symbol.
- start_date / end_date: the inclusive window for the series.
- base and unit: carry through your charting labels to avoid confusion.
Tip: Metals typically trade with extended market hours globally. Still, stick to the API’s daily close values and avoid passing “today” to end_date. For line charts, this creates stable time slices for caching and comparison.
Endpoint #3: OHLC (optional daily range context for gold and silver)
OHLC gives you open, high, low, and close for a specific date (and can be combined per day over a range if you iterate). This helps you annotate volatility relative to your fluctuation window. For example, you can display whether silver’s change was driven by a gap open or by an intraday breakout above the prior high.
OHLC: sample JSON structure
{
"success": true,
"timestamp": 1791679303,
"base": "USD",
"date": "2026-10-11",
"rates": {
"DOW": {
"open": 0.00028,
"high": 0.00029,
"low": 0.00027,
"close": 0.00029
},
"NASDAQ": {
"open": 0.00038,
"high": 0.0004,
"low": 0.00037,
"close": 0.00039
},
"S&P 500": {
"open": 0.0124,
"high": 0.0126,
"low": 0.0123,
"close": 0.0125
},
"FTSE 100": {
"open": 0.0124,
"high": 0.0126,
"low": 0.0123,
"close": 0.0125
},
"DAX": {
"open": 0.0126,
"high": 0.0126,
"low": 0.0126,
"close": 0.0126
}
},
"unit": "per index"
}
For your use case, you’ll focus on rates[GOLD_SYMBOL] and rates[SILVER_SYMBOL]. Pair OHLC with fluctuation to explain the “how” behind the “what” of the move: did silver rally on a wide-range day (high - low much greater than usual), or drift quietly to the close?
A “latest” sanity check and field anatomy (with real response)
While the comparison work relies on Fluctuation and Time-series, it’s useful to understand the universal fields (success, timestamp, base, date, rates) through a real, production-format payload. Below is a live-format sample provided for the “latest” style response. This shows how base, date and rates come together in a compact structure. The keys will differ for gold/silver; use this primarily to understand field meaning and for quick health checks in monitoring.
{"data":{"success":true,"timestamp":1791679200,"date":"2026-10-11","base":"USD","rates":{"GSPC":0.00012801573057297,"USD":1,"USDGSPC":7811.540000000171}}}
How to read it:
- success: true indicates the request succeeded.
- timestamp: Unix epoch seconds for the snapshot.
- date: the data date in YYYY-MM-DD.
- base: USD means all rates are quoted in U.S. dollars.
- rates: a mapping of symbols to their rates in base terms. For gold/silver, substitute the correct symbols from the Symbols page.
In your production health checks, you can hit a lightweight “latest” or “historical” ping for one symbol to confirm the pipe is awake and the base/date shape is as expected before running your heavier fluctuation comparisons.
From data to insight: metrics and thresholds for gold vs silver
Once you have fluctuation for GOLD_SYMBOL and SILVER_SYMBOL, standard comparison metrics include:
- Absolute change: rates[SYMBOL].change (in base units per index), useful for P&L translation if your portfolio is sized in USD per index unit.
- Percent change: rates[SYMBOL].change_pct, used for normalized ranking and alerts.
- Volatility context: pair change_pct with OHLC range (high - low) divided by close to see if the move is outlier-large.
- Signal confirmation: confirm that Time-series last value equals fluctuation end_rate for consistency before alerting.
Example rule-of-thumb thresholds:
- Short-term alert: if silver change_pct ≥ 2.0 and gold change_pct ≤ 0.5 over 5 sessions, flag “silver decoupling.”
- Mean reversion watch: if gold and silver both move ≥ 2.0% in opposite directions over the same window, mark for cross-asset narrative review.
Always compute these rules on the server side where you can cache fluctuation responses. Recompute only when the end_date rolls forward to a new completed day.
Practical details that save time
- End date cannot be today: pass only completed dates. If you schedule nightly jobs, compute end_date as “yesterday” in UTC.
- Weekend/holidays: do not expect new values on non-trading days. Your time-series will likely skip those dates or repeat the last valid date as the “end” in fluctuation. Align all comparisons to trading days for consistency.
- Base currency: default base is USD. If you need a different reporting currency, consider the Convert endpoint (see docs), but keep reporting consistent across both metals.
- Caching: cache per window (start_date, end_date, symbols) as immutable keys. Fluctuation responses don’t change after the day closes.
- Update frequency: “latest” updates in plan-specific intervals (e.g., 60 or 10 minutes). Historical, time-series, and fluctuation are daily aggregates.
- Symbols: never guess. Confirm on the Symbols page.
Reference JSON formats for cross-checking
When you stitch together multiple endpoints, use these payloads as format guides to keep your parsers and chart mappers aligned.
Historical Rates (single-day lookup)
{
"success": true,
"timestamp": 1791592903,
"base": "USD",
"date": "2026-10-10",
"rates": {
"DOW": 0.00028,
"NASDAQ": 0.00038,
"S&P 500": 0.00023,
"FTSE 100": 0.0124,
"DAX": 0.0126,
"CAC 40": 0.0126,
"NIKKEI 225": 0.0126
},
"unit": "per index"
}
For gold/silver, replace the index keys with your verified symbols. Historical is useful to sanity check a specific date’s close before you trust a fluctuation window.
Bid/Ask (if you need spreads for trading UX)
{
"success": true,
"timestamp": 1791679303,
"base": "USD",
"date": "2026-10-11",
"rates": {
"DOW": {
"bid": 0.00028,
"ask": 0.00029,
"spread": 1.0e-5
},
"NASDAQ": {
"bid": 0.00038,
"ask": 0.00039,
"spread": 1.0e-5
},
"S&P 500": {
"bid": 0.0124,
"ask": 0.0125,
"spread": 0.0001
},
"FTSE 100": {
"bid": 0.0124,
"ask": 0.0125,
"spread": 0.0001
},
"DAX": {
"bid": 0.0126,
"ask": 0.0126,
"spread": 0
},
"CAC 40": {
"bid": 0.0126,
"ask": 0.0126,
"spread": 0
},
"NIKKEI 225": {
"bid": 0.0126,
"ask": 0.0126,
"spread": 0
}
},
"unit": "per index"
}
For gold/silver UIs, displaying bid/ask lets users see execution conditions alongside percent change, especially if you surface intraday quotes in addition to daily moves.
Developer experience considerations when comparing the two indices
Below are dimensions where Indices-API’s design impacts how you implement a robust gold vs silver comparison:
- Features: Fluctuation precomputes change and change_pct per symbol so you don’t need to fetch two separate historical snapshots. Time-series handles the backfill you need for charts. OHLC provides the daily range context for more nuanced insights.
- Ease of use: Uniform response shapes (success, timestamp/date, base, rates) across endpoints reduce parsing code and let you share mappers across resources.
- Response structure: Flat “rates” maps by symbol minimize payload size; the “unit” and “base” let you carry metadata through your pipeline for correct labeling.
- Performance: For comparisons, Fluctuation is fewer bytes vs downloading a long time-series and differencing. Cache by (symbols, start_date, end_date).
- Use cases: Daily relative-strength dashboards, commodity basket rotation screens, and alerting when silver outperforms gold by a configurable spread.
If your stack involves event-driven processing or multi-tenant apps, see MCP for architectural patterns that can help standardize indexing and access across multiple data feeds.
Security, reliability, and caching tips
- API key: pass it in the access_key query parameter. Keep keys server-side; do not embed in client apps.
- Caching layer: key by endpoint + sorted symbols + start_date + end_date. Use a TTL aligned with day rollovers; invalidate when a new trading day closes.
- Monitoring: health check once per hour via a low-cost endpoint (e.g., historical for a prior date) and assert success, date freshness, and base=USD.
- Pagination: daily endpoints are limited by request windows; if you need very long history, chunk windows server-side and stitch by date.
Putting it together: gold vs silver comparison wiring
- Resolve symbols for Gold Spot Price Index and Silver Spot Price Index from the Symbols page.
- Compute end_date as the most recent closed day (UTC), start_date as end_date minus your lookback (e.g., 7 days).
- Call Fluctuation for both symbols in one request; store change and change_pct.
- Optionally call Time-series for both symbols for the same window; plot lines and verify series endpoints match fluctuation rates.
- For range colorization, pull OHLC for end_date and annotate charts with the day’s range.
- Alert if change_pct divergence crosses your rule threshold; include base and unit in alert text.
For additional integration patterns and other endpoints (Convert, Intraday, etc.), consult the Indices-API Documentation.
One more example: direct conversion sanity check
If you ever need to translate a USD amount into “index units” (e.g., “how many index units does $1,000 buy?”), the Convert endpoint simplifies that. Below is the official format example to illustrate the fields you’d parse. Replace symbols to match your metals if you adopt this pattern.
{
"success": true,
"query": {
"from": "USD",
"to": "DOW",
"amount": 1000
},
"info": {
"timestamp": 1791679303,
"rate": 0.00029
},
"result": 0.29,
"unit": "per index"
}
Key fields:
- query.from / query.to: conversion direction. With metals, from is often USD and to is your metal’s spot index symbol.
- info.rate: the conversion rate used.
- result: the converted amount in “per index” units, which helps with rough sizing or educational UI components.
A note on Illuvium (ILV) and thematic overlays
If your product overlays crypto-gaming or digital asset themes (e.g., Illuvium, ILV) with commodity narratives, the same comparison pipeline applies. Use Fluctuation and Time-series for ILV alongside gold and silver to contextualize cross-asset rotations. The key is consistent base currency and symbol verification so that all assets align in your dashboards.
Where to go next
- Confirm symbols: Find the exact Gold Spot Price Index and Silver Spot Price Index symbols.
- Explore endpoints: Read the endpoint docs and parameters.
- Architect for scale: Consider MCP patterns for multi-feed backends.
FAQ
Q: What if I don’t see “gold spot” or “silver spot” on the Symbols page?
A: Use the search and descriptions on the Symbols page to identify the correct spot price index symbols. If multiple variants exist (e.g., region or methodology), pick the one matching your product’s specification and use it consistently.
Q: Why does my end_date request fail when I pass today’s date?
A: end_date must be a completed trading day. Use yesterday in UTC or the last known close. This prevents partial data and respects the API’s rule that end_date cannot be today.
Q: How are rates expressed for metals?
A: Rates are expressed in the response base currency (usually USD) and reported as “per index” units. Always carry through base and unit in your UI so users understand the denomination.
Q: Do weekends and holidays break the Time-series?
A: No. Non-trading days won’t produce new datapoints. Simply plot the dates returned. For week-over-week fluctuation, the API computes against the nearest valid trading days within your start/end window.
Q: Can I mix gold/silver with equities or crypto in the same request?
A: Yes, you can include multiple symbols in Fluctuation and Time-series. Ensure all symbols are valid and remember that the base currency is shared for the entire response.
Get your key and ship the comparison
Ready to wire up gold vs silver comparisons in your dashboard or quant pipeline? Grab your API key and start hitting the Fluctuation endpoint with your verified symbols. It takes minutes to get started: Register. Then explore endpoint details in the Documentation and confirm your symbols in Symbols.