How to get Westmetall Lower Copper (XCU_WM_L) prices in your application using this API
Building a pricing or analytics workflow around Westmetall Lower Copper quotes is a practical way to operationalize risk controls, automate procurement, and power research dashboards. In this guide, we show how to get Westmetall Lower Copper (often referenced as a “Westmetall Lower” copper benchmark) into your application using Metals-API, then transform that stream into actionable insights such as real-time pricing, backfilled historical series, intraday checks, and alerting. We’ll cover endpoint choices, parameters, symbols, realistic JSON responses, and implementation patterns that developers and quants use to ship reliable features. While we’ll keep examples generic where a specialized symbol is not listed, you can look up the exact symbol spelling and availability on the Symbols page and wire the same patterns to Westmetall Lower Copper. We’ll also highlight units (troy ounce vs. grams or pounds), base currency handling, caching, and market-closure behavior—details that beginners often miss but professionals depend on.
Why Westmetall Lower Copper matters in digital pricing and risk systems
Copper underpins electrification, data centers, EVs, power grids, and building infrastructure. Westmetall publishes assessments that traders, manufacturers, and fabricators use when negotiating physical deliveries and hedging exposures. Bringing a “Westmetall Lower” copper reference into your application lets you:
- Price quotes dynamically in procurement portals and e-commerce checkouts.
- Benchmark premiums and discounts in RFQs against a recognized copper index.
- Run automated margin controls when intraday moves exceed tolerance bands.
- Backfill historical series to validate models and measure PnL or inventory carry.
- Power dashboards that combine copper benchmarks with currency FX to your invoicing currency.
Metals-API delivers real-time and historical metals prices in developer-friendly JSON. It provides endpoints for latest rates, historical snapshots, time series, intraday, fluctuation, OHLC, bid/ask, conversion, and more—giving you one programmable surface for copper and related metals. Explore the full reference in the Metals-API Documentation and the current list of tradable or benchmark symbols on the Metals-API Supported Symbols page.
What you’ll build: live pricing, historical coverage, and alerting with Metals-API
In this walkthrough, you will:
- Identify the correct copper benchmark symbol using the symbols list.
- Pull the latest price and map it to your application’s base currency and units.
- Request historical and time series data to backfill analytics and charts.
- Optionally consume intraday, OHLC, and bid/ask for richer trading tools.
- Convert between USD and your invoicing currency using a single API layer.
- Implement caching, retry, and market-closure handling for production reliability.
If you don’t yet have credentials, get started on the Metals-API Website and click “Get a free API key.” Keep your key private and never embed it in client-side code in production.
Symbols, units, and base currency: details that drive correct math
Before sending your first request, align on three operational details that affect downstream calculations:
Symbol selection
Metals-API supports a broad universe of metals and benchmarks. For copper, the generic symbol in the examples is XCU. If you want a specialized listing like a Westmetall Lower copper benchmark, first confirm the exact symbol and availability on the Metals-API Supported Symbols page. If that specialized symbol is not present on your plan, you can still work with the generic copper (XCU) stream, or consider upgrading per the documentation. In the examples below, we’ll use XCU generically to demonstrate the implementation pattern used for Westmetall-style benchmarks.
Units: per troy ounce by default
Metals-API responses express rates “per troy ounce” by default, relative to the base currency (default USD). Copper is commonly priced per pound or per metric tonne in many physical and futures markets, so you may need unit conversion:
- 1 troy ounce ≈ 31.1034768 grams
- 1 pound = 453.59237 grams ≈ 14.5833333 troy ounces
- 1 metric tonne = 1,000,000 grams ≈ 32,150.7466 troy ounces
For example, if the API returns XCU = 0.294118 “per troy ounce” with base USD, that means 1 USD buys 0.294118 troy ounces, or equivalently, 1 troy ounce costs 1 / 0.294118 ≈ 3.4 USD. To get price per pound, multiply the per-ounce USD by 14.5833333.
Base currency
By default, the base in responses is USD. If you invoice in EUR, GBP, JPY, or another currency, use the Convert endpoint to transform amounts. Always confirm the response’s base field before doing math, and propagate it through your pipeline so dashboards and exports annotate currency properly.
Quick start: get the latest copper rate
We’ll start by pulling the latest copper rate with the “Latest” endpoint and the generic copper symbol XCU. The same pattern applies to any specific copper benchmark symbol you confirm on the symbols list.
Example curl request (latest quotes)
curl -s "https://metals-api.com/api/latest?access_key=YOUR_API_KEY&base=USD&symbols=XCU"
Example JSON response (latest)
{
"success": true,
"timestamp": 1789604739,
"base": "USD",
"date": "2026-09-17",
"rates": {
"XCU": 0.294118
},
"unit": "per troy ounce"
}
Interpreting the fields
- success: Boolean. Check it before reading other fields.
- timestamp: Unix time (seconds). Use it to align caching and time-window logic.
- base: Currency relative to which the rates are expressed. Default is USD.
- date: ISO date of the snapshot. Market closures or weekends may reuse the last available business day.
- rates: Map of symbol to numeric rate. With base=USD and unit="per troy ounce", this is troy ounces per USD.
- unit: Unit string; typically “per troy ounce.”
Common usage patterns
- Compute price per troy ounce in USD as 1 / rates.XCU.
- Convert per-ounce to per-pound or per-tonne using fixed multipliers.
- Cache this response for a few minutes based on your plan’s update frequency.
A minimal JavaScript integration
Here is a small, production-minded JavaScript example to fetch the latest copper rate, calculate USD per pound, and handle basic failure paths. For production, place the key on a server or secret manager and proxy the request.
<script type="module">
async function fetchLatestCopper() {
const params = new URLSearchParams({
access_key: '<YOUR_API_KEY>',
base: 'USD',
symbols: 'XCU'
});
const url = `https://metals-api.com/api/latest?${params.toString()}`;
const res = await fetch(url, { method: 'GET' });
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const json = await res.json();
if (!json.success || !json.rates || typeof json.rates.XCU !== 'number') {
throw new Error('Invalid response payload');
}
const ouncesPerUSD = json.rates.XCU;
const usdPerOunce = 1 / ouncesPerUSD;
const OUNCES_PER_POUND = 14.5833333333;
const usdPerPound = usdPerOunce * OUNCES_PER_POUND;
return {
timestamp: json.timestamp,
date: json.date,
base: json.base,
unit: json.unit,
usdPerOunce,
usdPerPound
};
}
fetchLatestCopper()
.then(data => console.log('Copper pricing:', data))
.catch(err => console.error('Pricing fetch failed:', err));
</script>
Historical snapshots and backfills
To backfill charts or compute signals, you’ll need historical prices. The “Historical Rates” endpoint provides a single date snapshot; the “Time-series” endpoint spans a date range. This is essential when onboarding new SKUs, recalculating BOM costs, or validating copper exposure models.
Single-day historical snapshot
Use this when you need the rate on a specific business date (e.g., month-end valuation):
{
"success": true,
"timestamp": 1789518339,
"base": "USD",
"date": "2026-09-16",
"rates": {
"XCU": 0.295000
},
"unit": "per troy ounce"
}
Notes:
- Rates are still “per troy ounce” by default; compute USD per ounce as 1 / 0.295000.
- If the target date is a weekend or holiday, the API may return the most recent previous business day’s prices. Verify the date field in the response.
Time series for a date range
Use this for loading full charts, doing quant backtests, or rolling risk metrics:
{
"success": true,
"timeseries": true,
"start_date": "2026-09-10",
"end_date": "2026-09-17",
"base": "USD",
"rates": {
"2026-09-10": { "XCU": 0.296000 },
"2026-09-12": { "XCU": 0.295500 },
"2026-09-17": { "XCU": 0.294118 }
},
"unit": "per troy ounce"
}
Implementation tips:
- Gaps: Non-trading days may be present or omitted. Handle sparse keys in rates and fill forward if your UI expects contiguous dates.
- Aggregation: For weekly or monthly charts, aggregate daily USD-per-ounce series after inversion.
- Validation: Compare the start_date and end_date to keys present in rates to confirm coverage.
Measuring moves: fluctuation, OHLC, and bid/ask
Beyond point-in-time quotes, Metals-API exposes features that help analysts quantify risk and traders assess intraday conditions.
Fluctuation over a window
Use fluctuation to calculate changes and percent moves between two dates for copper:
{
"success": true,
"fluctuation": true,
"start_date": "2026-09-10",
"end_date": "2026-09-17",
"base": "USD",
"rates": {
"XCU": {
"start_rate": 0.296000,
"end_rate": 0.294118,
"change": -0.001882,
"change_pct": -0.64
}
},
"unit": "per troy ounce"
}
How to use:
- Set alert thresholds on change_pct for automated notifications.
- Compute drawdowns or VaR inputs based on observed ranges across lookbacks.
OHLC for technical analysis and trade hygiene
Open/High/Low/Close provides day-structured fields to support charts and intraday integrity checks:
{
"success": true,
"timestamp": 1789604739,
"base": "USD",
"date": "2026-09-17",
"rates": {
"XCU": {
"open": 0.295000,
"high": 0.296500,
"low": 0.293500,
"close": 0.294118
}
},
"unit": "per troy ounce"
}
Practical uses:
- Detect outliers: if your internal calculations imply values outside the low-high range, flag for review.
- Candlestick charts: compute USD-per-ounce by inverting each field; then render candles in your charting library.
Bid and ask for execution-aware apps
For trading or quoting tools, spread matters. The bid/ask endpoint returns both sides of the market and allows you to encode transaction costs in margin logic:
{
"success": true,
"timestamp": 1789604739,
"base": "USD",
"date": "2026-09-17",
"rates": {
"XCU": {
"bid": 0.294000,
"ask": 0.294200,
"spread": 0.000200
}
},
"unit": "per troy ounce"
}
How to apply:
- Compute mid as (bid + ask) / 2 and convert to USD-per-ounce.
- Encode price protections using ask for buys and bid for sells to avoid under-quoting.
Intraday checks and near-real-time dashboards
The Intraday endpoint supports tighter refresh cadences for a single symbol. This is useful for dashboards, scalers, or risk pages where copper exposure moves quickly. Depending on your plan, you can poll on a cadence that aligns with update frequency. Always cache for at least the update period to avoid unnecessary calls.
{
"success": true,
"timestamp": 1789604739,
"base": "USD",
"date": "2026-09-17",
"rates": {
"XCU": 0.294118
},
"unit": "per troy ounce"
}
Best practices:
- Respect the update interval indicated in your plan to avoid redundant polling.
- Debounce UI redraws so your users see stable numbers rather than flickering updates.
Lowest and highest price for range-aware decisions
For quick value-at-risk heuristics or simple price bands, the Lowest/Highest endpoint returns the range for a given day:
{
"success": true,
"base": "USD",
"date": "2026-09-17",
"rates": {
"XCU": {
"lowest": 0.293500,
"highest": 0.296500
}
},
"unit": "per troy ounce"
}
Considerations:
- Use in conjunction with OHLC to reconcile extremes for the date.
- Adjust alerting thresholds to the current day’s realized range rather than static bands.
Currency conversion and invoice math
If your BOMs, RFQs, or invoices are in a currency other than USD, Metals-API’s Convert endpoint lets you do one-stop conversion of copper values. Below is a generic conversion illustration using USD and XAU from the examples; the pattern is identical when converting between USD and your target invoice currency after deriving USD-per-unit copper:
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1789604739,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
How this applies to copper workflows:
- Step 1: Get XCU as ounces per USD; invert to USD per ounce.
- Step 2: Convert USD to your billing currency (e.g., EUR) using the Convert endpoint.
- Step 3: Multiply by your unit conversion (e.g., per pound) and apply your commercial premium/discount.
Leveraging LME history when you need depth
For extended historical depth on LME-linked symbols, Metals-API provides a Historical LME endpoint with data back to 2008 for supported LME symbols. If you use LME-style copper references in analysis, confirm availability for the relevant copper symbol on the symbols page and request with this endpoint to extend your backtests. When a specialized Westmetall Lower copper symbol is not listed, you can develop against generic copper (XCU) first, then swap symbols once your plan includes the precise benchmark.
{
"success": true,
"base": "USD",
"date": "2012-06-15",
"rates": {
"XCU": 0.310000
},
"unit": "per troy ounce"
}
Tips:
- Align your portfolio analytics to the exact benchmark you hedge against; document symbol provenance for auditors.
- If mixing Westmetall and LME histories, annotate series metadata so downstream consumers know the source benchmark.
Smart caching, retries, and market-closure handling
Robust pricing stacks avoid surprises by applying a few operational patterns:
- Cache based on update frequency: Metals-API updates depending on plan tier. Cache the latest response for at least that interval—e.g., 10 or 60 minutes—so you don’t over-poll.
- Weekend logic: Many metals markets are effectively closed on weekends. If your Saturday snapshot equals Friday’s, carry the date from the response and set a “stale” flag in UI to avoid misleading “today” labeling.
- Retry with jitter: Network flaps happen. Retry idempotent GETs with exponential backoff and jitter; cap retries to avoid thundering herds.
- Graceful degradation: If bid/ask is temporarily unavailable, fall back to the last mid or OHLC close with a banner stating the fallback.
- Currency precision: Use decimal types or sufficient precision to avoid rounding errors, especially when converting units (ounce to pound, etc.).
Security and key management
- Keep your Metals-API key server-side. Never expose it in a public client bundle.
- Use a dedicated secrets manager or environment variables. Rotate keys on a schedule.
- Implement request-level input validation on your proxy endpoints that call Metals-API (e.g., whitelist allowed symbols like XCU, validate dates).
- Log selectively: redact keys and PII from logs. Log response timestamps and hashes for audit trails.
Full response anatomy: fields you’ll actually use
The example payloads across endpoints share a consistent structure. Here are fields you will depend on across most endpoints:
- success: Always check first; abort downstream calc if false.
- timestamp: Normalize to UTC in your data warehouses; use it for cache stamps.
- base: Required input to conversions; track in every table and chart data point.
- date: For day-level charts, prefer date as the x-axis. If you need time resolution, store timestamp as well.
- rates: Keep the map as-is for flexible multi-symbol queries. For single-symbol apps, extract the numeric for speed.
- unit: The unit string is critical for conversions; don’t assume ounce if your future plan changes default units.
Putting it together: a curl-to-dashboard workflow
- Lookup the exact copper symbol for Westmetall Lower Copper on the Symbols list.
- Call Latest for that symbol (or XCU while prototyping) and store response JSON.
- Compute USD-per-ounce and convert to your operating unit (per pound or per tonne).
- Call Time-series for the last N months, backfill your database, and render a chart.
- Use Fluctuation to compute daily or weekly move bands and trigger alerts.
- Layer in Bid/Ask and OHLC if you’re building trading or execution-aware features.
- Convert to your invoicing currency with the Convert endpoint if necessary.
- Cache results according to your plan’s update cadence and label staleness on weekends.
Deep dive: production-grade considerations for developers
Authentication and authorization
- Each request must include your access_key as a query parameter. Keep it server-side.
- If you build a multi-tenant app, proxy Metals-API via your backend and enforce RBAC in your own system; don’t forward your Metals-API key to clients.
Rate limiting and quota management
- Plans differ in request quotas and update frequencies. Monitor usage and set alerts before you hit limits. See the documentation for plan-specific details.
- Batch symbols: When possible, request multiple symbols in a single call to reduce request counts and round-trip latency.
Error handling and recovery
- Check success=false payloads and HTTP status codes. Backoff on 429s and retry on transient 5xx with jitter.
- Implement circuit breakers for your downstream features to fall back gracefully if the upstream is temporarily unavailable.
Caching and performance optimization
- Memory cache for ultra-fast API pages; persistent cache (Redis) for shared services.
- Cache-key design: include endpoint, symbol set, base, and normalized date to avoid collisions.
- Pre-warm caches for known dashboards at market open to avoid cold-start latency.
Data validation and sanitization
- Whitelist symbols server-side to avoid arbitrary calls proxied by clients.
- Validate dates (YYYY-MM-DD) and reject out-of-range windows to protect quotas.
- Use strict JSON parsing and assert numeric types on rates before computation.
Real-time vs. historical data handling
- Mark each record with its source (latest, intraday, historical) to avoid accidental mixing when exporting.
- For chart cohesion, prefer a single source type per visualization unless you clearly delineate live vs. historical segments.
Data aggregation and analytics
- When computing returns, always invert ounce-per-USD to USD-per-ounce first, then compute log returns to reduce compounding bias.
- For BOM updates, compute a rolling average (e.g., 30-day) to reduce volatility in customer-facing quotes.
Endpoint-by-endpoint: parameter choices and response varieties
Below, we unify the earlier concepts with additional examples for copper (XCU used as a generic stand-in) and show how different endpoint outputs integrate into your system. Refer to the Metals-API Documentation for the complete parameter matrix and plan-based constraints.
Latest
Purpose: Retrieve the most recent available rates, updated according to your plan (e.g., every 60 or 10 minutes). Typical parameters include access_key, base, and symbols.
{
"success": true,
"timestamp": 1789604739,
"base": "USD",
"date": "2026-09-17",
"rates": {
"XCU": 0.294118,
"XAL": 0.434783
},
"unit": "per troy ounce"
}
Use cases: Live pricing, dashboards, automated margins. Pitfalls: assuming continuous updates during weekends or holidays. Optimization: request all needed symbols in one call.
Historical Rates
Purpose: Snapshot for a specific historical date. Parameters typically include the historical date and access_key, optionally base and symbols.
{
"success": true,
"timestamp": 1789518339,
"base": "USD",
"date": "2026-09-16",
"rates": {
"XCU": 0.295000
},
"unit": "per troy ounce"
}
Use cases: Month-end valuations, backfills. Pitfalls: non-business dates returning previous business day; always check the date field. Optimization: persist snapshots in your DB to avoid re-pulling.
Time-series
Purpose: Obtain daily historical rates between start_date and end_date.
{
"success": true,
"timeseries": true,
"start_date": "2026-09-10",
"end_date": "2026-09-17",
"base": "USD",
"rates": {
"2026-09-10": { "XCU": 0.296000 },
"2026-09-12": { "XCU": 0.295500 },
"2026-09-17": { "XCU": 0.294118 }
},
"unit": "per troy ounce"
}
Use cases: Charting, quant research, rolling aggregations. Pitfalls: missing dates for non-trading days. Optimization: batch symbols per range to reduce calls.
Fluctuation
Purpose: Measure rate changes across a window.
{
"success": true,
"fluctuation": true,
"start_date": "2026-09-10",
"end_date": "2026-09-17",
"base": "USD",
"rates": {
"XCU": {
"start_rate": 0.296000,
"end_rate": 0.294118,
"change": -0.001882,
"change_pct": -0.64
}
},
"unit": "per troy ounce"
}
Use cases: Alerts, dashboards with change badges, risk thresholds. Pitfalls: ignoring unit/base when mixing with other data. Optimization: reuse same date range as your time-series pulls to avoid extra calls.
OHLC
Purpose: Open/High/Low/Close breakdown for charting and intraday risk checks.
{
"success": true,
"timestamp": 1789604739,
"base": "USD",
"date": "2026-09-17",
"rates": {
"XCU": {
"open": 0.295000,
"high": 0.296500,
"low": 0.293500,
"close": 0.294118
}
},
"unit": "per troy ounce"
}
Use cases: Candlesticks, range alarms, integrity checks. Pitfalls: mixing currency bases across days. Optimization: store inverted USD-per-ounce values alongside raw payload for faster UI rendering.
Bid and Ask
Purpose: Retrieve bid/ask quotes and spreads.
{
"success": true,
"timestamp": 1789604739,
"base": "USD",
"date": "2026-09-17",
"rates": {
"XCU": {
"bid": 0.294000,
"ask": 0.294200,
"spread": 0.000200
}
},
"unit": "per troy ounce"
}
Use cases: Execution-aware quoting, spread-sensitive pricing. Pitfalls: confusing mid with tradeable side. Optimization: cache mid for analytics; use side-specific for transactions.
Lowest/Highest
Purpose: Return the low and high for a date, useful for heuristics and guardrails.
{
"success": true,
"base": "USD",
"date": "2026-09-17",
"rates": {
"XCU": {
"lowest": 0.293500,
"highest": 0.296500
}
},
"unit": "per troy ounce"
}
Use cases: Daily risk banding, compliance checks. Pitfalls: not reconciling with OHLC for the same period.
Intraday
Purpose: Finer-grained updates for a single symbol. Parameters will include your access_key and the chosen symbol. Respect your plan’s update cadence to avoid redundant calls.
{
"success": true,
"timestamp": 1789604739,
"base": "USD",
"date": "2026-09-17",
"rates": {
"XCU": 0.294118
},
"unit": "per troy ounce"
}
Supported Symbols
Purpose: Discover all tradable metals and benchmarks your plan can access, including copper variants. Start here to confirm the exact symbol for Westmetall Lower Copper before integrating. Visit the Metals-API Supported Symbols page.
Carat
Purpose: Gold by carat pricing. While not directly applicable to copper workflows, this endpoint is useful if your product mixes precious and industrial metals (e.g., gold-plated connectors with copper cores). If you also handle XAU, consult the docs for parameters. Note: Carat is specific to gold; copper does not use carat grading.
Historical LME
Purpose: Access deep historical data for supported LME symbols (back to 2008). For copper strategies that require LME-aligned series, confirm symbol availability and use this endpoint for long backtests and structural analysis.
A note on Gold (XAU) and cross-commodity analytics
Many institutional dashboards track both copper (a growth-sensitive industrial metal) and gold (a safe-haven precious metal). Metals-API’s uniform response schema across XCU and XAU allows easy cross-commodity analytics, spread modeling, and factor studies. For example, you can examine copper-gold ratios to infer macro risk-on/risk-off regimes. The same endpoints demonstrated here for XCU apply to XAU, with the caveat that carat pricing is available for gold through the dedicated carat endpoint. Confirm gold symbol details, units, and bid/ask availability on the symbols page.
End-to-end example: from API to BOM cost
- Latest: Pull XCU and invert to USD-per-ounce. Suppose XCU=0.294118; USD/oz ≈ 3.4.
- Unit conversion: Move to USD/lb by multiplying USD/oz by 14.5833333.
- Currency conversion: If you invoice in EUR, convert USD to EUR via Convert endpoint.
- Commercial terms: Add your premium per lb or per tonne based on supply chain agreements.
- Risk control: Use Fluctuation to check if the current price is outside a 5-day band; pause quote auto-approval if exceeded.
- UI: Display last updated timestamp (UTC) and a note if the market is closed (e.g., repeating Friday’s price on a Saturday).
Troubleshooting guide
- Empty rates map or symbol missing: Verify the symbol spelling on the symbols list and confirm your plan includes it.
- Unexpected weekend dates: Check the date field; it may reflect last business day. Label the UI accordingly.
- Mismatch in unit math: Confirm unit is “per troy ounce” and that you inverted rates correctly before converting to pounds or tonnes.
- High request counts: Batch symbols per call, cache per the plan update interval, and reduce redundant polling.
- Access denied errors: Ensure your access_key is correct, unexpired, and sent over HTTPS. Regenerate if compromised.
- Inconsistent charts after a deploy: Verify all services use the same base currency and unit conversion constants.
Practical compliance and auditability
- Persist raw JSON payloads with timestamp and a checksum to rebuild any disputed valuation.
- Annotate each record with symbol provenance (e.g., “XCU generic” vs. a specific benchmark like Westmetall Lower).
- Document conversion factors and FX sources so finance and auditors can reproduce calculations.
Integration architecture patterns
- Backend aggregator: A microservice that fetches Metals-API data, normalizes to USD-per-ounce and target units, and exposes a stable internal API to your apps.
- Event-driven updates: On each cache refresh, publish an event (e.g., Kafka) for pricing engines and UIs to subscribe to.
- Warehouse sync: Nightly batch jobs call Time-series to fill any gaps and persist clean, normalized tables for BI tools.
Advanced analytics ideas
- Volatility targeting: Use OHLC-derived ranges to size hedge ratios.
- Spread studies: Analyze copper vs. gold or copper vs. aluminum ratios for macro signals.
- Cost rolling averages: Apply exponentially weighted moving averages (EWMA) to stabilize BOM quotes.
Complete curl example set to operationalize copper
1) Latest with multiple symbols
curl -s "https://metals-api.com/api/latest?access_key=YOUR_API_KEY&base=USD&symbols=XCU,XAL"
{
"success": true,
"timestamp": 1789604739,
"base": "USD",
"date": "2026-09-17",
"rates": {
"XCU": 0.294118,
"XAL": 0.434783
},
"unit": "per troy ounce"
}
2) Historical snapshot (month-end)
curl -s "https://metals-api.com/api/2026-08-30?access_key=YOUR_API_KEY&base=USD&symbols=XCU"
{
"success": true,
"timestamp": 1789518339,
"base": "USD",
"date": "2026-08-28",
"rates": {
"XCU": 0.301234
},
"unit": "per troy ounce"
}
Note the date: if 2026-08-30 was a weekend, you’ll receive the previous business day.
3) Time-series for backfill
curl -s "https://metals-api.com/api/timeseries?access_key=YOUR_API_KEY&base=USD&symbols=XCU&start_date=2026-07-01&end_date=2026-09-17"
{
"success": true,
"timeseries": true,
"start_date": "2026-07-01",
"end_date": "2026-09-17",
"base": "USD",
"rates": {
"2026-07-01": { "XCU": 0.312000 },
"2026-07-02": { "XCU": 0.311500 }
},
"unit": "per troy ounce"
}
4) Fluctuation for alerting
curl -s "https://metals-api.com/api/fluctuation?access_key=YOUR_API_KEY&base=USD&symbols=XCU&start_date=2026-09-10&end_date=2026-09-17"
{
"success": true,
"fluctuation": true,
"start_date": "2026-09-10",
"end_date": "2026-09-17",
"base": "USD",
"rates": {
"XCU": {
"start_rate": 0.296000,
"end_rate": 0.294118,
"change": -0.001882,
"change_pct": -0.64
}
},
"unit": "per troy ounce"
}
5) OHLC for charting
curl -s "https://metals-api.com/api/open-high-low-close/2026-09-17?access_key=YOUR_API_KEY&base=USD&symbols=XCU"
{
"success": true,
"timestamp": 1789604739,
"base": "USD",
"date": "2026-09-17",
"rates": {
"XCU": {
"open": 0.295000,
"high": 0.296500,
"low": 0.293500,
"close": 0.294118
}
},
"unit": "per troy ounce"
}
6) Bid/Ask spread
curl -s "https://metals-api.com/api/bid-ask?access_key=YOUR_API_KEY&base=USD&symbols=XCU"
{
"success": true,
"timestamp": 1789604739,
"base": "USD",
"date": "2026-09-17",
"rates": {
"XCU": {
"bid": 0.294000,
"ask": 0.294200,
"spread": 0.000200
}
},
"unit": "per troy ounce"
}
7) Lowest/Highest range
curl -s "https://metals-api.com/api/lowest-highest/2026-09-17?access_key=YOUR_API_KEY&base=USD&symbols=XCU"
{
"success": true,
"base": "USD",
"date": "2026-09-17",
"rates": {
"XCU": {
"lowest": 0.293500,
"highest": 0.296500
}
},
"unit": "per troy ounce"
}
8) Convert currency for invoicing
After you’ve computed USD per pound for copper, you can convert USD amounts to your billing currency with Convert. See the doc patterns; here is the generic structure from the examples:
curl -s "https://metals-api.com/api/convert?access_key=YOUR_API_KEY&from=USD&to=EUR&amount=10000"
{
"success": true,
"query": {
"from": "USD",
"to": "EUR",
"amount": 10000
},
"info": {
"timestamp": 1789604739,
"rate": 0.9150
},
"result": 9150.0,
"unit": "N/A"
}
Note: The above structure follows the Convert endpoint pattern; use actual supported currency pairs per documentation.
Digital transformation with copper data: from manual spreadsheets to smart systems
Metals-API accelerates the journey from manual spreadsheet updates to live, integrated systems:
- Automated ingestion replaces copy-paste from websites and mitigates keying errors.
- Standardized schemas across metals let you add aluminum (XAL), nickel (XNI), and silver (XAG) without rewriting pipelines.
- Engineering-led pricing enables experimentation—A/B test premiums, roll hedging strategies, or build what-if simulators.
- Future-readiness: As copper markets evolve (e.g., new benchmarks, ESG-linked premiums), your architecture can adopt new symbols and endpoints with minimal code changes.
Where to go next
- Sign up for an API key at the Metals-API Website and start testing with XCU.
- Confirm the exact Westmetall Lower copper symbol on the symbols page and replace XCU once available on your plan.
- Study endpoint options and best practices in the Metals-API Documentation. Build your caching, retry, and unit conversion utilities so they can be reused across teams.
Additional resources
- London Metal Exchange for market microstructure context on base metals.
- CME Group for related futures instruments and hedging education.
- BIS statistics for macro context when relating copper to currency moves.
Conclusion
With Metals-API, integrating Westmetall-style copper benchmarks into your product becomes a straightforward engineering task instead of a manual process. You’ve seen how to fetch the latest copper rate, backfill history, compute moves, derive OHLC and bid/ask structure, handle currency conversion, and build reliable, unit-aware pricing with caching and weekend behavior in mind. The same patterns you used with generic XCU apply to specific copper benchmarks once you confirm their symbols on the Supported Symbols page. Start with a small integration against sandbox dashboards, validate units and currency math, then scale to production with retries, caching, and observability. To begin, visit the Metals-API Website and get a free API key.
FAQ
Which symbol should I use for Westmetall Lower Copper?
Check the exact symbol and your plan access on the Symbols list. If a specialized symbol isn’t available on your plan, prototype with XCU and swap once enabled.
Why do the numbers look inverted?
Rates are “per troy ounce” relative to the base currency; example responses often show ounces per USD. Invert to get USD per ounce. Then convert ounces to pounds or tonnes if needed.
How often are prices updated?
Update frequency depends on your plan (e.g., every 60 minutes or every 10 minutes). Cache responses accordingly and avoid over-polling. See the documentation for details.
What happens on weekends and holidays?
You may receive the last available business day’s data. Always check the date in the response and mark the UI as “stale” if markets are closed.
Can I get bid/ask and OHLC for copper?
Yes, where supported by your plan. Use the Bid/Ask and OHLC endpoints for richer trading tools and integrity checks.
Is there data for gold (XAU) too?
Yes. Metals-API supports gold (XAU) and a carat endpoint for gold-specific grading. The same integration patterns apply, enabling cross-commodity analytics with copper.
How do I secure my API key?
Keep your key on the server, not in client scripts. Use a proxy endpoint, rotate keys periodically, and never commit keys to version control.