Get Gold Sep 2025 (GCU25) prices in your platform using this API
Need to stream Gold Sep 2025 (GCU25) prices into your platform? Here’s how to do it with spot Gold (XAU) from the Metals-API JSON REST API, then map that data into your futures workflows. Whether you’re powering a trading blotter, a pricing engine for jewelry or manufacturing, or analytics in a research stack, you can integrate real-time and historical gold benchmarks, compute spreads, simulate futures curves, and expose clean, auditable price references across your stack. This guide shows exactly how to request XAU data, interpret the responses, and operationalize it for a “GCU25-like” experience with robust caching, error handling, and unit conversion.
Why GCU25 is different—and how to bridge it with XAU
GCU25 is a COMEX Gold futures contract that expires in September 2025. Most APIs that focus on spot precious metals—like Metals-API—expose XAU (gold) spot reference rates, not specific exchange-traded futures contracts. That’s not a blocker: many fintech and trading platforms power futures-adjacent experiences by combining high-quality spot rates (XAU per troy ounce) with their own basis curves, storage financing assumptions, and exchange data. The practical workflow looks like this:
- Retrieve robust XAU spot rates (real-time, historical, OHLC, bid/ask) from Metals-API.
- Join exchange-specific futures data from your broker or clearing firm to derive/monitor the GCU25 basis.
- Build a pricing function that maps spot to synthetic futures (carry model, convenience yield, term structure) for Sep 2025.
- Backtest spreads and hedges with Metals-API time series and OHLC data to validate your approach.
The result: you can keep your platform synchronized with rich, reliable gold spot signals while tracking or modeling the GCU25 leg at the strategy layer. This article focuses on integrating Metals-API’s spot Gold (XAU) to drive this workflow.
Gold (XAU): markets, data, and modern architecture
Gold sits at the nexus of macro hedging, jewelry and manufacturing demand, central-bank reserves, and digital transformation in commodities pricing. As trading becomes API-first, developers increasingly need:
- Deterministic, auditable spot references per troy ounce that can be converted into grams or local currencies.
- Access to bid/ask and OHLC for analytics and risk control.
- Time series and fluctuation views for dashboards and signals.
- Well-defined JSON contracts that scale inside microservices and event streams.
Metals-API fulfills that role with standardized XAU responses, strong timestamping, and JSON schemas suited for both developer ergonomics and compliance. If you want to explore the full capabilities and parameters, start with the Metals-API Documentation. For the latest available symbols, visit the Metals-API Supported Symbols.
What you’ll build: GCU25-aligned spot pricing inside your stack
We’ll show you how to:
- Pull the latest XAU spot price and interpret base currency, timestamp, and units.
- Request historical and time-series data for backfills and charting.
- Retrieve bid/ask spreads and OHLC for top-of-book analytics and candles.
- Convert between USD, XAU, and other units you price in (e.g., grams or local currency displays).
- Implement caching, weekend/holiday handling, and resilient retries.
- Map XAU spot to your GCU25 display by stitching with your exchange data.
To get started with credentials, visit the Metals-API Website and get a free API key. You can integrate in minutes.
Core concepts you’ll use with Gold (XAU)
- Units: Metals-API quotes gold using “per troy ounce” as the default unit in responses. A troy ounce is approximately 31.1034768 grams. Don’t confuse troy ounces with avoirdupois (standard) ounces.
- Base currency: By default, rates are relative to USD unless you request another base. Validate your currency handling downstream.
- Timestamps and timezones: Responses include a UNIX timestamp and an ISO date. Align this with your system clock, especially when you calculate spreads against exchange feeds.
- Market hours: Metals and foreign exchange liquidity varies across time zones. Handle weekends and market holidays by backfilling or caching last valid quotes for display while marking data as “as of.”
Comparing key symbols you might query
| Symbol | Description | Default Unit | Primary Use |
|---|---|---|---|
| XAU | Gold spot | Per troy ounce | Benchmark reference for futures carry models, jewelry pricing, and hedging dashboards |
| XAG | Silver spot | Per troy ounce | Gold/silver ratio studies and mixed precious metals pricing |
| XPT | Platinum spot | Per troy ounce | Industrial and jewelry pricing; cross-metal analytics |
| XPD | Palladium spot | Per troy ounce | Auto-catalyst chain analytics and substitution studies |
| XCU | Copper | Per unit per API docs | Industrial hedging and macro indicators |
For the full, constantly updated list, see the Metals-API Supported Symbols.
Step 1: Pull the latest XAU rate for a live GCU25 screen
Start by fetching the latest XAU rate. You’ll use this to anchor your GCU25 proxy display. The request returns a base currency (default USD), a timestamp, a date, and a rates object keyed by symbol.
Example cURL request (latest XAU)
curl -s "https://metals-api.com/api/latest?access_key=YOUR_API_KEY&base=USD&symbols=XAU"
Sample JSON response (latest)
{
"success": true,
"timestamp": 1789518740,
"base": "USD",
"date": "2026-09-16",
"rates": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912,
"XPD": 0.000744,
"XCU": 0.294118,
"XAL": 0.434783,
"XNI": 0.142857,
"XZN": 0.344828
},
"unit": "per troy ounce"
}
What fields you’ll actually use
- success: Boolean—check before parsing.
- timestamp: UNIX seconds—store for audit/logs and staleness checks.
- base: Typically “USD”—confirm that downstream logic expects USD.
- date: ISO date representation—easy for UI “as of” labels.
- rates.XAU: Rate per troy ounce relative to base. With base=USD, 0.000482 means 1 USD = 0.000482 XAU. Invert for USD per XAU if you price in dollars per ounce.
- unit: Unit context—use for UI labels and conversions.
Converting to dollars per ounce
Metals-API expresses metals per unit of base currency by default. If base=USD and rates.XAU=0.000482, then USD per troy ounce is 1 / 0.000482 ≈ 2074.27 USD/oz. Many front-ends prefer showing USD/oz. Decide where to invert (backend or UI), and do it consistently.
JavaScript example to display USD per oz for XAU
async function fetchUsdPerOzXau() {
const url = "https://metals-api.com/api/latest?access_key=YOUR_API_KEY&base=USD&symbols=XAU";
const res = await fetch(url);
if (!res.ok) throw new Error("HTTP " + res.status);
const data = await res.json();
if (!data.success) throw new Error("API error");
const r = data.rates.XAU; // 1 USD = r XAU
const usdPerOz = 1 / r; // USD per troy ounce
return {
asOf: data.date,
timestamp: data.timestamp,
usdPerOz,
unit: data.unit
};
}
fetchUsdPerOzXau()
.then(console.log)
.catch(console.error);
Step 2: Anchor your GCU25 display with OHLC and bid/ask
To mirror a futures-style experience, top-of-book and candles matter. Use bid/ask for spread-aware valuations and OHLC for chart candles. Metals-API provides both as structured JSON.
Bid/Ask snapshot (top-of-book equivalent)
{
"success": true,
"timestamp": 1789518740,
"base": "USD",
"date": "2026-09-16",
"rates": {
"XAU": {
"bid": 0.000481,
"ask": 0.000483,
"spread": 2.0e-6
},
"XAG": {
"bid": 0.0381,
"ask": 0.0382,
"spread": 0.0001
},
"XPT": {
"bid": 0.000911,
"ask": 0.000913,
"spread": 2.0e-6
}
},
"unit": "per troy ounce"
}
What to use:
- rates.XAU.bid and rates.XAU.ask: Use for fair value mid = (bid+ask)/2. Convert to USD/oz by inverting each or inverting the mid.
- spread: Useful as a sanity check for liquidity-sensitive UIs.
OHLC for candles and backtesting
{
"success": true,
"timestamp": 1789518740,
"base": "USD",
"date": "2026-09-16",
"rates": {
"XAU": {
"open": 0.000485,
"high": 0.000487,
"low": 0.000481,
"close": 0.000482
},
"XAG": {
"open": 0.03825,
"high": 0.0383,
"low": 0.0381,
"close": 0.03815
},
"XPT": {
"open": 0.000915,
"high": 0.000918,
"low": 0.00091,
"close": 0.000912
}
},
"unit": "per troy ounce"
}
What to use:
- rates.XAU.open/high/low/close: Invert to get USD/oz O/H/L/C. Feed into candle charts, volatility estimates, and risk models.
- timestamp/date: Sync your daily bars to your portfolio clock.
Step 3: Time-series for GCU25-aligned analytics
You’ll often need to visualize rolling curves or compute average basis across a window. Use time series for daily rates over a date range. This is also how you backfill charts if your service was down or your UI needs a longer lookback.
Time-series example
{
"success": true,
"timeseries": true,
"start_date": "2026-09-09",
"end_date": "2026-09-16",
"base": "USD",
"rates": {
"2026-09-09": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-09-11": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-09-16": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
Practical notes:
- Weekends/holidays: Some dates may be missing or unchanged—your chart code should forward-fill or mark closures appropriately.
- Windowing: Keep ranges consistent with your futures roll schedules to compute standardized spreads versus GCU25.
Step 4: Fluctuation endpoint for alerting and dashboards
To alert on moves relevant to your GCU25 strategy, use the fluctuation view. It returns net and percent changes over a period.
Fluctuation example
{
"success": true,
"fluctuation": true,
"start_date": "2026-09-09",
"end_date": "2026-09-16",
"base": "USD",
"rates": {
"XAU": {
"start_rate": 0.000485,
"end_rate": 0.000482,
"change": -3.0e-6,
"change_pct": -0.62
},
"XAG": {
"start_rate": 0.03825,
"end_rate": 0.03815,
"change": -0.0001,
"change_pct": -0.26
},
"XPT": {
"start_rate": 0.000915,
"end_rate": 0.000912,
"change": -3.0e-6,
"change_pct": -0.33
}
},
"unit": "per troy ounce"
}
Use cases:
- Daily movement summaries in dashboards.
- Conditional alerts when moves exceed thresholds (e.g., 1% daily).
- Comparative panels for XAU vs XAG to study relative value.
Step 5: Historical snapshots and lowest/highest for context
Historical snapshots help you price GCU25 relative to long-term spot averages or to show “as-of” pricing for end-of-day workflows.
Historical rate example (single date)
{
"success": true,
"timestamp": 1789432340,
"base": "USD",
"date": "2026-09-15",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
Combine this with the lowest/highest endpoint for a period to give your users context around current levels.
Lowest/Highest example (by date)
{
"success": true,
"date": "2026-09-16",
"base": "USD",
"rates": {
"XAU": {
"lowest": 0.000481,
"highest": 0.000487
}
},
"unit": "per troy ounce"
}
Notes:
- Inversion: Remember to invert lowest/highest to get USD/oz bands.
- UI: Band shading on charts is a user-friendly way to visualize this.
Step 6: Convert endpoint for grams and currency localization
If your platform shows grams in local currency (e.g., INR per gram), the convert endpoint is a clean option to translate amounts between USD, XAU, and other currencies. You can also perform math locally once you have rates, but Convert centralizes it at the API.
Convert example
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1789518740,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Implementation tips:
- Convert USD → XAU and then troy ounces → grams with 31.1034768 multiplier if needed.
- For localized currency, set base to the desired currency where supported, or perform a two-step conversion via USD.
Step 7: Carat pricing for retail and manufacturing apps
Retail jewelry and manufacturing workflows often price gold by carat. The carat endpoint helps bridge pure XAU rates to consumer-facing values that incorporate purity.
Carat endpoint example
{
"success": true,
"base": "USD",
"date": "2026-09-16",
"rates": {
"XAU_24K": 0.000482,
"XAU_22K": 0.000442,
"XAU_18K": 0.000361,
"XAU_14K": 0.000281
},
"unit": "per troy ounce"
}
Use this to:
- Build consumer-facing price widgets per carat purity.
- Normalize carat values to pure XAU when computing hedges or margins.
Intraday and historical LME: advanced workflows
For users with intraday needs, query the intraday endpoint for finer-grained snapshots of a single symbol. LME historical data extends industrial workflows to metals like aluminum and copper with deep backfills. While these are beyond GCU25 directly, they matter when you’re building cross-commodity dashboards or macro overlays.
Intraday example (single symbol)
{
"success": true,
"base": "USD",
"symbol": "XAU",
"date": "2026-09-16",
"interval": "minutes",
"rates": [
{"timestamp": 1789518000, "rate": 0.000483},
{"timestamp": 1789518600, "rate": 0.0004825},
{"timestamp": 1789519200, "rate": 0.000482}
],
"unit": "per troy ounce"
}
Historical LME example (illustrative)
{
"success": true,
"base": "USD",
"symbol": "LME_XAL",
"start_date": "2010-01-01",
"end_date": "2010-01-31",
"rates": {
"2010-01-04": 0.421,
"2010-01-05": 0.422
},
"unit": "per unit"
}
Use cases:
- Short-horizon risk management with intraday drill-downs.
- Industrial basket models combining XAU with LME-linked inputs.
Authentication, access keys, and security best practices
- Authentication: Pass your access key via the access_key query parameter. Keep keys out of client-side code in production—use a server-side proxy.
- Key rotation: Store keys in a secret manager; rotate periodically.
- Network: Use HTTPS only. Deny egress to non-HTTPS endpoints.
- Principle of least privilege: If you proxy requests, authorize only necessary endpoints and symbols per service.
- Observability: Log request IDs, timestamps, and endpoint names for quick triage of outages or spikes.
To obtain a key, visit the Metals-API Website and sign up. See the full parameter and endpoint details in the Metals-API Documentation.
Error handling and recovery strategies
- Check success: Always branch on success before reading fields.
- HTTP vs JSON errors: Handle non-2xx statuses at the transport layer; parse JSON errors to extract messages and retry hints.
- Idempotent retries: Use exponential backoff with jitter; cap total retry time to keep UIs snappy.
- Fallbacks: If latest fails, serve a cached last-known-good value with an “as of” label; disable trading actions if your risk policy requires fresh prices.
- Validation: Sanitize numeric fields and reject NaN/Infinity before persisting to time-series databases.
Caching and performance optimization
- Client TTLs: Align cache TTLs with your plan’s update frequency (e.g., 60 seconds vs 10 minutes). Display “last updated” to reduce perceived staleness.
- Edge caching: Front your API proxy with an edge cache; vary by endpoint, base, and symbols keys.
- Batching: Request multiple symbols in one call where possible (e.g., XAU,XAG) to reduce round trips for multi-asset dashboards.
- Time-series pagination: Cache common lookbacks (7D/30D/90D) for charting; lazy-load longer windows.
- Precomputation: Store inverted USD/oz values server-side to avoid repeated inversions in clients.
Weekend and market-closure handling
- Forward-fill display: It’s standard to show the last known value with a “markets closed” badge.
- Auditability: Log the timestamp and date provided by Metals-API; that becomes your display’s as-of anchor.
- Alerts and signals: Suppress false alerts on weekends by pausing comparisons when no new ticks are expected.
Data modeling: mapping XAU to a GCU25 experience
To show a live GCU25-like price using XAU:
- Fetch XAU bid/ask and compute mid in USD/oz.
- Join with your broker’s or exchange data that provides the GCU25 front-month and curve quotes.
- Compute the basis for Sep 2025: futures − spot (in USD/oz). Optionally model carry: F = S * e^{(r + s − y)T}, where r is financing, s is storage/insurance, y is convenience yield.
- Persist basis; on each new XAU tick, recompute GCU25 proxy = XAU_mid_USD_per_oz + basis.
- Alert when basis deviates beyond tolerance from your exchange feed (quality control).
This pattern separates “reference spot data” (from Metals-API) from “exchange tradables” (from your broker/market data provider). It keeps your architecture clean and compliant while delivering a unified, low-latency UI.
Units and conversions you’ll need
- Troy ounce to gram: 1 troy oz ≈ 31.1034768 g.
- USD per troy oz: invert XAU-per-USD rate.
- Local currency: either set base to the local currency or convert USD → local with your FX source before multiplying by USD/oz.
- Carats: Pure gold (24K) versus lower purities; use carat endpoint rates or compute purity multipliers if you maintain your own purity tables.
Security, governance, and audit
- Traceability: Store the raw JSON payloads (or hashes), timestamps, and inversion method for audit trails.
- Versioning: If you change base currency or inversion logic, version your service endpoints so downstream consumers can migrate safely.
- Data quality: Monitor spreads and outliers; alert if XAU changes exceed thresholds or if bid > ask anomalies occur.
Practical implementation patterns
- Service architecture: Build a “metals-pricer” microservice that:
- Ingests XAU via latest/bid-ask endpoints.
- Computes USD/oz and publishes to Kafka or a message bus.
- Caches last N ticks in Redis for UI speed.
- Exposes a read-only endpoint for UI clients (no direct Metals-API calls from browsers).
- Data stores: Use a columnar time-series DB for OHLC/time series; store normalized fields (usd_per_oz, bid_usd_per_oz, ask_usd_per_oz, unit, base).
- SLOs: Define freshness SLO (e.g., 99.9% of requests see data not older than 90 seconds) and alert if breached.
Complete reference: what each Metals-API feature returns and how to use it
Latest (real-time spot)
Purpose: get the most recent rates for specified symbols. Use for live tick displays and immediate valuations.
- Parameters: access_key, base (optional, default USD), symbols (comma-separated).
- Response: success, timestamp, base, date, rates{symbol: rate}, unit.
- Pitfalls: forgetting inversion when you need USD/oz; mixing bases across environments.
- Performance: batch symbols to reduce calls; cache per update frequency.
- Security: never log full URLs with keys in plaintext; mask in logs.
Historical (single day)
Purpose: retrieve as-of rates for a given date for reconciliation, EOD pricing, and audit.
- Parameters: access_key, date (YYYY-MM-DD), base, symbols.
- Response: success, timestamp, base, date, rates, unit.
- Pitfalls: timezone confusion; store ISO date and UNIX timestamp to align with your EOD cutoffs.
- Performance: prefetch common EOD dates; compress storage using numeric precision controls.
Time-series (range of days)
Purpose: build charts, compute moving averages, roll analyses.
- Parameters: access_key, start_date, end_date, base, symbols.
- Response: success, timeseries: true, start_date, end_date, base, rates keyed by ISO date, unit.
- Pitfalls: missing days on weekends; design your chart code for sparse keys.
- Optimization: cache window endpoints (e.g., ?start=today-30&end=today) for fast UI reloads.
Fluctuation (change over a range)
Purpose: percent and absolute changes for dashboards and alerts.
- Parameters: access_key, start_date, end_date, base, symbols.
- Response: success, fluctuation: true, start_date, end_date, base, rates{symbol: {start_rate, end_rate, change, change_pct}}, unit.
- Pitfalls: interpreting sign incorrectly; confirm you invert consistently.
- Optimization: use fluctuation rather than fetching entire time series for lightweight change stats.
Bid/Ask (top-of-book)
Purpose: compute mid, spreads, and fair values for trading-style UIs.
- Parameters: access_key, base, symbols.
- Response: success, timestamp, base, date, rates{symbol: {bid, ask, spread}}, unit.
- Pitfalls: using mid for P&L when your policy requires bid/ask selection per side.
- Optimization: cache JSON but recompute mid in your service to avoid double rounding.
OHLC (candles)
Purpose: charting and volatility estimation.
- Parameters: access_key, date or range per documentation.
- Response: success, timestamp, base, date, rates{symbol: {open, high, low, close}}, unit.
- Pitfalls: mixing OHLC sources with latest mid for the same candle; be explicit about pricing sources in tooltips.
Convert (amount translation)
Purpose: convert between currencies and metals amounts.
- Parameters: access_key, from, to, amount.
- Response: success, query{from,to,amount}, info{timestamp, rate}, result, unit.
- Pitfalls: double inversion errors; unit confusion when presenting result to users.
- Security: validate user-supplied “from/to” against allowlists to prevent misuse.
Carat (purity-based gold pricing)
Purpose: power retail/manufacturing apps with purity-adjusted rates.
- Parameters: access_key, base, optionally carat selections per documentation.
- Response: success, base, date, rates of carat-suffixed symbols, unit.
- Pitfalls: mixing purity-adjusted prices with pure XAU analytics; normalize for backtesting.
Lowest/Highest (range bands)
Purpose: contextual bands for UI and risk thresholds.
- Parameters: access_key, date or window per docs.
- Response: success, date, base, rates{symbol: {lowest, highest}}, unit.
- Pitfalls: forgetting to invert bands; ensure lowest/highest swap correctly after inversion.
Intraday (fine-grained single symbol)
Purpose: tighter intervals for sensitive strategies or post-incident forensics.
- Parameters: access_key, symbol, interval specifics per plan.
- Response: success, base, symbol, date, interval, rates array of {timestamp, rate}, unit.
- Pitfalls: memory pressure when charting long intraday windows; downsample on the server.
Historical LME (industrial deep history)
Purpose: multi-commodity research and macro overlays.
- Parameters: access_key, symbol, start_date, end_date.
- Response: success, base, symbol, start_date, end_date, rates by date, unit.
- Pitfalls: unit differences across LME symbols; annotate units in your DB schemas.
JSON error scenarios and handling
{
"success": false,
"error": {
"code": 104,
"type": "usage_limit_reached",
"info": "Your monthly API request volume has been reached."
}
}
- Type-aware handling: switch on error.type to decide whether to retry, fall back to cache, or show a quota UI message.
- User messaging: avoid leaking numeric quotas publicly; provide generic “limit reached” with instruction to contact support.
Joining XAU with external futures data for GCU25
For exchange-specific futures like GCU25, consult the relevant exchange or your market data provider. Reference: COMEX gold futures contract specifications can be found on official exchange resources such as the CME Group’s site (e.g., CME Group Gold Futures contract specs). You can align:
- Tick size and contract size to compute P&L against your USD/oz spot proxy.
- Roll schedules and calendar spreads using Metals-API time series for the spot leg.
Governance: documentation and symbols management
Keep your devs aligned by linking out to Metals-API references where questions arise:
- Metals-API Documentation: parameters, examples, and endpoint specifics.
- Metals-API Supported Symbols: monitor symbol availability for your asset matrix.
- Metals-API Website: get a free API key and review plan capabilities.
Operational checklist before you go live
- Access key secured in server-side config or secret manager.
- Consistent USD/oz inversion implemented and unit tests in place.
- Caching set with TTL aligned to your plan’s update cadence.
- Fallback for weekends/holidays with explicit “as of” labels.
- Alerts for data staleness, anomalous spreads, and API errors.
- Documentation updated for traders and product teams explaining the XAU→GCU25 proxy logic.
Putting it all together: sample end-to-end flow
- Every N seconds, your backend fetches latest XAU (plus bid/ask) with base=USD and symbols=XAU.
- It computes USD/oz mid, stamps the data with timestamp/date, and publishes to a message bus.
- An analytics service listens, updates OHLC candles for the current session using the OHLC endpoint when appropriate, and stores time-series.
- A futures-mapper service retrieves GCU25 quotes from your market data feed, computes basis, and updates a per-expiry basis table.
- Your UI services query the basis table and combine it with the live XAU USD/oz to display “GCU25 (proxy)” while also displaying official GCU25 quotes where permitted.
- Alerts fire when fluctuation over your watch window breaches thresholds.
Additional examples: multi-asset dashboards and conversions
Many teams pair XAU with other metals for macro dashboards. A typical approach is to request XAU, XAG, and XPT in one call, invert them once, and compute ratios like gold/silver. You can also maintain user preferences in multiple currencies: either query with base set to the local currency where supported or convert USD amounts downstream before building UI components.
Compliance notes and user expectations
- Label displays clearly: “Spot Gold (XAU) reference” vs “COMEX Gold (GCU25).” Avoid misrepresenting which stream is exchange-sourced.
- Disclose timing: show “as of” timestamps from the API response to avoid confusion around stale data.
- Recordkeeping: store payloads and computed fields for internal audits and client inquiries.
Call to action
Ready to embed Gold (XAU) into your trading tools and model a clean GCU25 experience? Get started with a free API key on the Metals-API Website and review the Metals-API Documentation to integrate endpoints for latest, bid/ask, OHLC, time series, and conversion. Check all symbols at the Metals-API Supported Symbols page.
FAQ
Does Metals-API provide GCU25 (COMEX Gold Sep 2025) directly?
No. Metals-API provides spot metals like XAU, plus related endpoints (latest, historical, OHLC, bid/ask, etc.). You can model or display a GCU25-like price by combining XAU spot with exchange futures data from your broker or market data provider.
What unit is XAU quoted in?
Per troy ounce by default. Invert the rate to get USD per troy ounce when base=USD. For grams, multiply troy ounces by approximately 31.1034768.
How often do rates update?
Update cadence depends on your subscription plan. Always consult the Metals-API Documentation and implement a cache TTL that aligns with your plan.
What should I do on weekends and holidays?
Forward-fill the last known rate for display with a clear “as of” timestamp. Suppress automatic trading if your policy requires fresh data.
How do I retrieve bid/ask spreads for fair value?
Use the Bid/Ask endpoint to get bid, ask, and spread fields. Compute mid for display, but use bid/ask per side for P&L where appropriate.
Can I get OHLC candles?
Yes. Use the OHLC endpoint. Invert open/high/low/close if you need USD/oz, and store timestamps consistently for charts.
What about currency localization?
Either set base to your desired currency (where supported) or use the Convert endpoint to translate amounts cleanly. Validate “from/to” pairs against allowlists.
How do I minimize request volume?
Batch symbols in one request, cache results per TTL, and precompute commonly used inverted values. Serve clients via a server-side proxy rather than calling the upstream API from each browser session.
Where do I find all supported symbols?
Visit the Metals-API Supported Symbols page for the authoritative list.
How do I get started?
Sign up for an access key at the Metals-API Website, then follow the Metals-API Documentation to integrate endpoints for latest, historical, time series, fluctuation, convert, carat, lowest/highest, OHLC, intraday, and more.