Get Dysprosium (DYS) - Per Ounce prices using this API (REST endpoint)
Get Dysprosium (DYS) — per ounce prices — into your stack to power real-time pricing, backtests, and risk controls. In this guide, we show how to query Dysprosium in a per–troy-ounce unit using the Metals-API REST endpoints, interpret the JSON responses you’ll actually use, and wire the data into trading tools, ERP systems, and pricing engines. We’ll also cover advanced tactics: unit conversion between grams, kilograms, and troy ounces; base currency handling; smart caching; weekend/holiday logic; OHLC and bid/ask integration; and how to scale your ingestion reliably. If you’re new to Dysprosium markets, we include market context and how rare earths like DYS (and Neodymium) fit into EVs, wind turbines, and next-gen tech — and why robust, automated price feeds are now table stakes.
Why track Dysprosium (DYS) per ounce with a REST API?
Whether you’re a commodities desk quoting spot surcharges, a manufacturer indexing contract clauses, or a fintech app displaying price charts, streaming accurate Dysprosium per-ounce pricing keeps you competitive. Rare earths are increasingly central to magnet technology for EV drivetrains and renewable infrastructure. DYS is volatile, liquidity can be patchy, and merchant spreads vary — which creates a strong need for:
- Normalized units (per troy ounce) for apples-to-apples comparisons across metals and dashboards.
- Programmatic access to latest and historical prices for repricing, backtesting, and scenario analysis.
- Bid/ask data to estimate executable levels and model slippage.
- OHLC and time-series to power analytics and risk reports.
Metals-API provides real-time and historical precious and industrial metals prices with a simple JSON REST surface, so you can resolve Dysprosium to consistent units and currencies in one place. Start from the Metals-API Website, browse the Metals-API Supported Symbols to confirm Dysprosium’s symbol (DYS), and integrate in minutes using the Metals-API Documentation.
Confirming Dysprosium symbol and units before you code
First step: check that Dysprosium is available and confirm its symbol (commonly DYS) and default unit. Metals-API data is returned in standardized units and is by default relative to USD, with unit metadata returned alongside rates. Symbols evolve as coverage expands, so always verify on the official symbols list:
- Reference: Complete list of supported metals and currencies
- Look for: Dysprosium, symbol, base unit (per troy ounce), and any alternate syntaxes.
If DYS is present, you’ll request it just like any other metal (e.g., XAU or XAG). If DYS is temporarily unavailable for a specific endpoint, you can still build a robust integration by:
- Querying a broader endpoint (latest/historical) including multiple metals and filtering for DYS when present.
- Falling back to available endpoints (e.g., historical if intraday is not supported for the symbol).
- Defensive coding: alert on missing symbols and degrade gracefully without breaking downstream systems.
Core concepts you must get right (before writing a single line of code)
- Base currency: By default, exchange rates are relative to USD. The JSON includes a base field you can trust for conversion math.
- Units: The API denotes “unit”: "per troy ounce" in responses. Convert to grams or kilograms using exact factors (1 troy ounce = 31.1034768 grams).
- Timestamps and timezones: Use response timestamp and date. Map to UTC in your systems; document local conversions clearly to avoid off-by-one-day bugs in historical windows.
- Market schedules: Some metals have thin or off-market days. Handle weekends/holidays and consider staleness checks versus the timestamp field.
- Caching: Aggressively cache repeated requests and normalize refresh cadence to your plan’s update interval to conserve quota and reduce latency.
Quick start: Get Dysprosium per ounce via Latest Rates
Once you have an API key from the Metals-API Website (sign up free to test), call the Latest endpoint to fetch DYS alongside other metals. The response includes base currency, timestamp, and unit, which drive downstream conversions.
Example: curl request for latest Dysprosium
curl -s "https://metals-api.com/api/latest?access_key=YOUR_ACCESS_KEY&base=USD&symbols=DYS,XAU,XAG"
Notes:
- Replace YOUR_ACCESS_KEY with your key. Obtain one here: Get a free API key.
- symbols is comma-separated. Include DYS and any benchmarks you monitor.
- base can be set to other currencies if supported by your plan; otherwise the default is USD.
Representative JSON (structure)
The Latest Rates endpoint returns JSON like this. The sample below shows the structure and fields to expect. Values are illustrative; do not hard-code numeric examples.
{
"success": true,
"timestamp": 1789605887,
"base": "USD",
"date": "2026-09-17",
"rates": {
"DYS": 0.000123,
"XAU": 0.000482,
"XAG": 0.03815
},
"unit": "per troy ounce"
}
Field breakdown you will actually use:
- success: Boolean indicating a valid payload.
- timestamp: Unix epoch seconds. Use for freshness checks and to align with your time-series index.
- base: Currency your prices are relative to. Default is USD. If base is USD, a rate is ounces per USD.
- date: ISO date string for the data snapshot.
- rates: Object keyed by symbol. Each value is “units of that metal per 1 base currency unit,” with unit indicated by the “unit” field.
- unit: Expected to be “per troy ounce” for metals endpoints; ensure you persist this to avoid unit ambiguity.
Interpreting Dysprosium rate values correctly
Rates are often fractional because they represent troy ounces per USD. For product pricing you usually want USD per troy ounce. To invert:
- If rates.DYS = r_oz_per_usd, then USD per troy ounce = 1 / r_oz_per_usd.
- For grams: USD per gram = (USD per troy ounce) / 31.1034768.
To quote in EUR, either:
- Query with base=EUR (if enabled), or
- Get USD-based metals and obtain USD/EUR from the same API (currency coverage) and convert locally.
A complete JavaScript example: latest DYS to per-ounce and per-kg pricing
The following example demonstrates calling the Latest endpoint, extracting DYS, converting to USD per troy ounce and per kilogram, and handling staleness using timestamp.
// Replace with your real key and consider vaulting it securely (e.g., env var, secret manager).
const ACCESS_KEY = process.env.METALS_API_KEY;
async function fetchLatestDys() {
const url = "https://metals-api.com/api/latest?access_key=" + ACCESS_KEY + "&base=USD&symbols=DYS";
const res = await fetch(url, { method: "GET" });
if (!res.ok) throw new Error("HTTP " + res.status);
const json = await res.json();
if (!json.success) {
throw new Error("API error: " + JSON.stringify(json));
}
const unit = json.unit; // expect "per troy ounce"
const base = json.base; // "USD"
const ts = json.timestamp; // unix seconds
const dysRate = json.rates?.DYS; // ounces per 1 USD
if (!dysRate || unit !== "per troy ounce" || base !== "USD") {
throw new Error("Unexpected payload format for DYS");
}
// Convert ounces-per-USD to USD-per-ounce
const usdPerOz = 1.0 / dysRate;
const gramsPerTroyOunce = 31.1034768;
const usdPerGram = usdPerOz / gramsPerTroyOunce;
const usdPerKg = usdPerGram * 1000;
return {
timestamp: ts,
base,
unit,
usdPerOz,
usdPerGram,
usdPerKg
};
}
fetchLatestDys()
.then(console.log)
.catch(console.error);
Important implementation details:
- Always check unit and base in responses. Persist both with your price snapshots.
- Instrument freshness: if now() - timestamp exceeds your tolerance, fall back to previous data and alert.
- Avoid tight polling that outpaces your plan’s update interval. Align refresh to documentation guidance.
Dysprosium markets: context for developers and product teams
Dysprosium is a heavy rare earth element used to enhance high-temperature performance in NdFeB permanent magnets, crucial for EV traction motors and direct-drive wind turbines. Supply chains are concentrated, and pricing can reflect long-term contracts, merchant premiums, and occasional liquidity gaps. For developers, this means:
- Volatility bursts: your notifications and hedging tools must react quickly when spreads widen.
- Unit fragmentation: quotes appear per kg more often than per troy ounce in some merchandizing contexts. Your app should support toggling units with exact conversions.
- Benchmark alignment: consider referencing related rare earths (e.g., Neodymium) for cross-hedging indicators and correlation analytics.
For broader market intelligence, consider reading USGS rare earths summaries and EV supply chain outlooks from reputable analysts. For background context, the IMF Data portal and London Metal Exchange provide useful macro and industrial metals insights.
Neodymium (ND) and the digital transformation of rare earths markets
Neodymium’s role complements Dysprosium in permanent magnets. As metals pricing digitizes, developers are fusing:
- Real-time APIs like Metals-API for standardized pricing streams.
- Algorithmic analytics for anomaly detection in magnet feedstock costs.
- Smart technology integration: ERP and MES systems automatically update BOM costing using metadata-rich endpoints.
- Future trends: IoT-enabled inventory that reprices buffer stocks in near-real-time, integrated with hedging triggers.
These patterns extend to DYS: data pipelines ingest spot and historical prices, compute risk-adjusted surcharges per product SKU, and push quotes to e-commerce front-ends. The combination of Latest, Historical, Time-Series, OHLC, Fluctuation, and Bid/Ask endpoints enables a full market-aware application stack.
Using Historical data for Dysprosium backfills and valuation
Historical rates are available back to published coverage windows. You query by date and extract DYS just as with Latest. This is essential for:
- Backfilling charts when users pan/zoom.
- Valuing inventory at period-end (e.g., month-end marks).
- Benchmark regressions and sensitivity analysis.
Representative Historical response (structure)
{
"success": true,
"timestamp": 1789519487,
"base": "USD",
"date": "2026-09-16",
"rates": {
"DYS": 0.000124
},
"unit": "per troy ounce"
}
Practical notes:
- Use exact dates in YYYY-MM-DD. For weekends/holidays, if no quote exists, design fallbacks (e.g., nearest prior business day), or reflect a gap in your chart intentionally.
- Document timezone assumptions. Align “date” with your users’ expectations to avoid confusion in earnings cutoffs.
Time-series for Dysprosium: daily panels for analytics
The Time-Series endpoint returns daily rates between start_date and end_date. Developers use this to hydrate dataframes for trend detection, volatility estimation, and model training.
{
"success": true,
"timeseries": true,
"start_date": "2026-09-10",
"end_date": "2026-09-17",
"base": "USD",
"rates": {
"2026-09-10": { "DYS": 0.000125 },
"2026-09-12": { "DYS": 0.000126 },
"2026-09-17": { "DYS": 0.000123 }
},
"unit": "per troy ounce"
}
Implementation guidance:
- Expect missing days; don’t assume a continuous series. Forward-fill only when appropriate for your analytics, and clearly mark imputed data.
- Validate that timeseries is true in the payload.
- Always persist unit and base so your analysis layer can convert consistently.
Fluctuation for Dysprosium: percent moves over windows
The Fluctuation endpoint summarizes change between two dates. It’s perfect for alerting (“DYS 7-day change exceeds X%”), portfolio P&L reporting, or product repricing thresholds.
{
"success": true,
"fluctuation": true,
"start_date": "2026-09-10",
"end_date": "2026-09-17",
"base": "USD",
"rates": {
"DYS": {
"start_rate": 0.000125,
"end_rate": 0.000123,
"change": -0.000002,
"change_pct": -1.6
}
},
"unit": "per troy ounce"
}
Production tips:
- Use change_pct thresholds for alerting to normalize across symbols.
- Persist start_rate and end_rate to support drill-down displays without refetching.
- When change and change_pct disagree with your local calculations, re-check inversion logic. Remember: rates are ounces per USD.
OHLC for Dysprosium: better candlesticks and trade modeling
Open/High/Low/Close fields create robust charts and improve entry/exit modeling. Dysprosium’s liquidity can vary, so having a transparent range is helpful for slippage assumptions.
{
"success": true,
"timestamp": 1789605887,
"base": "USD",
"date": "2026-09-17",
"rates": {
"DYS": {
"open": 0.000124,
"high": 0.000126,
"low": 0.000122,
"close": 0.000123
}
},
"unit": "per troy ounce"
}
Usage patterns:
- Compute true range and ATR-style indicators for alerts and risk controls.
- For valuation, use close; for worst-case sensitivity, use low/high bands.
- Always show the unit and base to users to avoid misinterpretation.
Bid/Ask for Dysprosium: spreads and executable estimates
Bid/Ask matters for quoting and execution modeling. For DYS, spreads can reflect liquidity conditions. The endpoint provides bid, ask, and spread explicitly so your price engine can decide reference points.
{
"success": true,
"timestamp": 1789605887,
"base": "USD",
"date": "2026-09-17",
"rates": {
"DYS": {
"bid": 0.000122,
"ask": 0.000124,
"spread": 0.000002
}
},
"unit": "per troy ounce"
}
Operational guidance:
- Mid-price = (bid + ask) / 2 in ounces per USD. Convert to USD/oz by inverting.
- Quoting logic: for sell quotes, consider ask; for buy quotes, consider bid; for indicative displays, consider mid.
- Alert on widening spreads to switch to conservative pricing or inform sales desks.
Conversion math: USD/oz, grams, kilograms, and currency options
- Ounces-per-USD (API) to USD-per-ounce: invert the rate.
- USD-per-ounce to USD-per-gram: divide by 31.1034768.
- USD-per-ounce to USD-per-kg: multiply USD-per-gram by 1000.
- Alternate base: Query base=EUR (if available in your plan). Otherwise, convert using currency rates fetched from the same API.
Always ensure you store the conversion factor in a single, well-tested utility with unit tests. Many pricing inaccuracies come from silent unit drift when teams copy/paste incomplete snippets.
Converting amounts with the Convert endpoint
When you need to convert an amount from USD to a metal or vice versa, the Convert endpoint simplifies the math, returning the target quantity plus the effective rate used.
{
"success": true,
"query": {
"from": "USD",
"to": "DYS",
"amount": 1000
},
"info": {
"timestamp": 1789605887,
"rate": 0.000123
},
"result": 0.123,
"unit": "troy ounces"
}
How to use this:
- For a USD budget, get direct ounces of DYS quickly.
- To estimate order fills or set min/max purchase sizes in your UI.
- Persist query and info sections for auditability.
Intraday Dysprosium: higher-frequency snapshots
Some plans provide intraday endpoints for single symbols. For DYS, intraday can improve alerting and short-term hedging when spreads move quickly. Align your polling interval to your plan’s recommended cadence and backoff aggressively on errors to protect quota.
Example structure for intraday (responses will be for a single symbol and compressed accordingly; confirm exact fields in the Metals-API Documentation):
{
"success": true,
"timestamp": 1789605887,
"base": "USD",
"symbol": "DYS",
"rate": 0.000123,
"unit": "per troy ounce"
}
Implementation tips:
- Fan out intraday polling across services to avoid thundering herds.
- Cache by symbol with a short TTL; expose in-memory and distributed caches for low-latency reads.
- Use circuit breakers; if the upstream is degraded, serve last-known-good and degrade UI with banners.
Lowest/Highest and OHLC endpoints for risk controls
Beyond intraday, two specialized endpoints help set bounds and validate anomalies:
- Lowest/Highest for a given date: check extremes to detect outliers and bound your quote engine.
- OHLC for a given date: prefer close for end-of-day accounting; show range to explain price variance.
Structures are similar to the OHLC sample shown earlier. For lowest-highest, you’ll receive daily extrema per symbol. Validate against your own computed extrema from time-series to cross-check integrity.
Practical production patterns for Dysprosium data
- Price staleness watchdog: if timestamp is older than your threshold, block new orders or apply conservative margins.
- Graceful degradation: if an endpoint fails, switch to a simpler one (e.g., Latest instead of Intraday, or Historical nearest date) and display a status banner.
- Reconciliation jobs: nightly jobs compare your stored OHLC, Lowest/Highest, and Latest snapshots to detect drifts or ingestion gaps.
- Versioned schema: store base, unit, and symbol with each row; never assume defaults in downstream joins.
Error handling and recovery strategies
- Always inspect "success". If false, read error fields (documented in the API docs) and implement exponential backoff with jitter.
- Timeouts: set reasonable connect/read timeouts; treat hangs as failures and failover to cached data.
- Data validation: ensure rates are positive, finite numbers; reject NaN/Infinity early.
- Idempotency: your storage writes should be idempotent by (symbol, date, timestamp) to avoid duplicates on retries.
Authentication and key management
- API Key: pass it via access_key query parameter.
- Do not hardcode in client-side code; proxy requests from a server you control. Use environment variables or secret managers.
- Rotate keys regularly and monitor for abuse (unexpected request spikes).
Rate limiting, quotas, and backpressure
Plans determine update frequency and request volume. Build your client to:
- Batch symbols in one request (e.g., symbols=DYS,XAU,XAG) rather than multiple singles.
- Poll at or below the data refresh rate to avoid redundant calls.
- Introduce token buckets or leaky-bucket logic in your client to smooth bursts.
- Respond to 429 or documented throttle signals by backing off and serving cached values.
Caching architecture to save requests and speed UX
- Edge CDN cache for public chart tiles or non-sensitive endpoints (server-side).
- In-memory cache (e.g., Redis) keyed by (endpoint, base, symbols, date-range) with TTL aligned to refresh intervals.
- Immutable archival store (e.g., object storage or time-series DB) for daily historical snapshots.
- Client-level conditional fetch: do not re-request data if timestamp hasn’t changed.
Security best practices
- Store keys in vaults; never embed in mobile/web apps without a secure backend.
- Enforce HTTPS; validate TLS certs.
- Input sanitization: validate symbols and date strings to prevent injection into logs or dashboards.
- Audit logging: store request IDs, timestamps, and hashes of payloads for post-incident analysis.
Data governance and lineage
- Record the endpoint name, parameters, base, unit, and timestamp with each stored record.
- Use semantic versioning for your internal schemas; include a unit_version to guard against future changes.
- Provenance: reference Metals-API as the source in your metadata catalogs.
Designing a Dysprosium pricing service
A common architecture:
- Ingestion layer: cron or event-driven functions fetch Latest (and Intraday if applicable) for DYS and peers.
- Normalizer: ensures correct base, unit, and calculates USD/oz, USD/g, USD/kg fields.
- Cache/store: write to Redis for hot reads; persist to a relational or time-series database for history.
- API facade: a thin internal service that provides /prices/dys/latest, /prices/dys/ohlc?date=..., /prices/dys/timeseries endpoints to downstream teams.
- Monitoring: checks timestamp staleness, response latency, and error rates; emits alerts to Slack/Teams.
Comparing symbols and units you’ll likely use
| Symbol | Metal | Default Unit | Notes |
|---|---|---|---|
| DYS | Dysprosium | per troy ounce | Confirm availability on the Supported Symbols page; often quoted per kg in some markets, convert precisely. |
| XAU | Gold | per troy ounce | Useful as a precious benchmark for dashboards and correlation. |
| XAG | Silver | per troy ounce | Often included in UI alongside industrials for user familiarity. |
| XPT | Platinum | per troy ounce | Industrial precious; adds context to spreads and vol. |
For a definitive list and any updates to Dysprosium’s symbol or unit, check the Metals-API Supported Symbols.
OHLC, Lowest/Highest, and Fluctuation together: building a robust analytics layer
Combine these endpoints for resilient analytics:
- Daily close values from OHLC for returns calculations.
- Lowest/Highest to set alert thresholds and guardrails on anomaly detection (e.g., extreme gaps or fat-finger data in alternate sources).
- Fluctuation to quickly power P&L and change-percentage leaderboards without recomputing deltas in every query.
Cache each layer with coherent keys and TTLs so your BI dashboards don’t re-compute the same day repeatedly.
Handling weekends, holidays, and market closures
- Expect missing dates; do not extrapolate silently. Forward-fill only in UI contexts where you clearly label the value as last close.
- For compliance or accounting, use the exact date’s “close” from OHLC if available; otherwise formalize a policy (e.g., previous business day).
- Build a trading calendar abstraction to pre-compute valid days for your metal universe.
End-to-end example: from Latest DYS to a customer quote
- Fetch Latest for DYS with base=USD; verify unit=per troy ounce.
- Invert to USD/oz; convert to USD/kg for manufacturing quotes.
- Apply contract fee logic and buffer based on current bid/ask spread.
- If timestamp staleness exceeds threshold, fall back to yesterday’s close and increase margin.
- Render to UI with source attribution and last-updated time.
curl and JSON walkthrough with fields you’ll use daily
Here’s a concrete curl and the JSON fields to plumb through your code paths. We’ll include XAU/XAG for parity testing; your production code should target DYS explicitly.
curl -s "https://metals-api.com/api/latest?access_key=YOUR_ACCESS_KEY&base=USD&symbols=DYS,XAU,XAG"
{
"success": true,
"timestamp": 1789605887,
"base": "USD",
"date": "2026-09-17",
"rates": {
"DYS": 0.000123,
"XAU": 0.000482,
"XAG": 0.03815
},
"unit": "per troy ounce"
}
- Use timestamp for freshness and for sorting snapshots in your DB.
- Use rates.DYS to compute USD/oz and user-facing units.
- Log unit and base in every message you emit downstream.
Flawless unit handling: troy ounce vs gram vs kilogram
- 1 troy ounce = 31.1034768 grams (exact by definition for finance-grade conversions).
- USD/oz to USD/g: divide by 31.1034768. USD/g to USD/kg: multiply by 1000.
- Validate results with invariants: (USD/kg) / 1000 ≈ USD/g; invert back to match raw rates if needed.
Build a single tested conversion library and reference it everywhere in your services and BI notebooks.
Data modeling: storing Dysprosium correctly
- Primary key suggestion: (symbol, timestamp) or (symbol, date, source) depending on granularity.
- Columns: base, unit, rate_raw_oz_per_base, usd_per_oz, usd_per_g, usd_per_kg, spread fields when available.
- Index: date-based partitioning, symbol sharding for performance.
Performance: scaling requests and minimizing latency
- Batch symbols per request; avoid N calls for N symbols.
- Use HTTP keep-alive; reuse connections.
- Apply gzip/deflate if the client stack supports it automatically.
- Pre-warm caches before market opens or reporting cutoffs.
Testing strategy
- Contract tests: validate JSON schema keys (success, timestamp, base, unit, rates[symbol]).
- Fuzz unit tests: randomize rates and ensure conversion invariants hold (invert twice yields original).
- Chaos tests: simulate API errors/timeouts; verify your fallbacks and UI banners.
Observability and alerting
- Metrics: request latency, success rate, error codes, cache hit ratio, data staleness.
- Logs: include correlation IDs and endpoint names to trace issues.
- Alerts: on staleness breaches, error spikes, unexpected unit/base changes.
Compliance and audit
- Retain daily snapshots for auditability.
- Document the methodology: “Dysprosium prices sourced from Metals-API; USD base; per troy ounce; inverted to USD/oz.”
- Ensure internal risk and finance teams sign off on fallback policies.
End-user UX best practices
- Always show the unit and base next to the price (e.g., “USD per troy ounce”).
- Show last-updated timestamp and staleness warnings when applicable.
- Support quick toggles between oz, g, kg and multiple currencies.
Troubleshooting common pitfalls
- Prices look inverted: Remember the API returns ounces per USD; invert for USD/oz.
- Mismatch with other sites: Check unit (troy ounce vs avoirdupois ounce vs kg) and base currency. Also confirm the timestamp alignment.
- Gaps in time-series: Weekends/holidays and thin markets can cause missing dates. Implement tolerant analytics and visible gaps in charts.
- Spread seems large: Use Bid/Ask endpoint; Dysprosium can have wider spreads. Adjust your quoting model accordingly.
Advanced analytics: combining DYS with peers
- Correlate DYS with Neodymium (ND) and macro proxies to build factor models.
- Use OHLC ranges to compute volatility and value-at-risk proxies for procurement plans.
- Leverage Fluctuation for time-bucketed performance and trend dashboards.
Reference JSON examples from Metals-API (for other metals)
These official examples demonstrate structures identical to what you’ll use with DYS, ensuring your parsers and conversions are correct across symbols. See more in the Metals-API Documentation.
Latest Rates Example (Gold/Silver/Platinum)
{
"success": true,
"timestamp": 1789605887,
"base": "USD",
"date": "2026-09-17",
"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"
}
Historical Rates Example
{
"success": true,
"timestamp": 1789519487,
"base": "USD",
"date": "2026-09-16",
"rates": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915,
"XPD": 0.000748
},
"unit": "per troy ounce"
}
Time-Series Example
{
"success": true,
"timeseries": true,
"start_date": "2026-09-10",
"end_date": "2026-09-17",
"base": "USD",
"rates": {
"2026-09-10": {
"XAU": 0.000485,
"XAG": 0.03825,
"XPT": 0.000915
},
"2026-09-12": {
"XAU": 0.000483,
"XAG": 0.0382,
"XPT": 0.000913
},
"2026-09-17": {
"XAU": 0.000482,
"XAG": 0.03815,
"XPT": 0.000912
}
},
"unit": "per troy ounce"
}
Fluctuation Example
{
"success": true,
"fluctuation": true,
"start_date": "2026-09-10",
"end_date": "2026-09-17",
"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"
}
OHLC Example
{
"success": true,
"timestamp": 1789605887,
"base": "USD",
"date": "2026-09-17",
"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"
}
Bid/Ask Example
{
"success": true,
"timestamp": 1789605887,
"base": "USD",
"date": "2026-09-17",
"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"
}
Convert Example
{
"success": true,
"query": {
"from": "USD",
"to": "XAU",
"amount": 1000
},
"info": {
"timestamp": 1789605887,
"rate": 0.000482
},
"result": 0.482,
"unit": "troy ounces"
}
Swap XAU with DYS where supported to achieve the same flow for Dysprosium.
Metadata discipline: always persist base, unit, and symbol
Most downstream data quality issues trace back to missing metadata. Your ingestion layer should always attach:
- symbol: e.g., DYS
- base: e.g., USD
- unit: per troy ounce
- timestamp and date from the response
- endpoint name and query parameters used
Data privacy and API key security
- Serve metals data to clients from your backend; never expose the Metals-API key in browser/mobile JavaScript.
- Use a secrets manager (AWS Secrets Manager, GCP Secret Manager, HashiCorp Vault).
- Monitor egress logs for unusual patterns that might indicate key leakage.
Release management for your integration
- Staging environment pointing to the same endpoints with a separate key.
- Canary deployment of your price service with automatic rollback on elevated error rates.
- Feature flags to toggle intraday vs latest endpoints without redeploying.
Business continuity and redundancy
- Implement offline modes: if upstream is unreachable, surface cached last-known-good values and restrict trading if your policy requires.
- Backfill tasks: after outages, reconcile missing time buckets using Historical or Time-Series.
- Service-Level Objectives: define target freshness and availability; alert when SLOs are in jeopardy.
Smart technology integration across your stack
- ERP and procurement: auto-update BOM and RFQ templates with the latest DYS USD/kg using your internal pricing service.
- E-commerce: dynamic SKU pricing with guardrails powered by Bid/Ask spreads and OHLC ranges.
- Trading tools: live watchlists with Fluctuation-based alerts and intraday refresh where available.
How to get started right now
- Visit the Metals-API Website and create a free account to obtain an API key.
- Verify Dysprosium’s symbol and availability on the Metals-API Supported Symbols page.
- Read the Metals-API Documentation for endpoint specifics and plan details.
- Implement a minimal ingestion script: Latest → invert to USD/oz → convert to USD/kg → persist with timestamp, base, and unit.
- Add Historical/Time-Series, then OHLC and Bid/Ask for better analytics and execution realism.
Additional resources
- Official Metals-API Documentation
- Official list of supported symbols
- IMF Data Portal for macro context
- London Metal Exchange for broader metals market insights
Conclusion
Dysprosium (DYS) sits at the heart of modern electrification and magnet technology. To price products, manage risk, and deliver credible analytics, you need a robust, metadata-rich price feed with consistent units and currencies. Metals-API delivers exactly that, with streamlined REST endpoints for Latest, Historical, Time-Series, Fluctuation, OHLC, Bid/Ask, and Convert. By implementing precise unit conversion (per troy ounce → grams/kilograms), verifying base currency and timestamps, and layering in caching, error handling, and observability, you can ship a production-grade Dysprosium pricing stack. Start building today on the Metals-API Website, confirm DYS on the Supported Symbols page, and consult the Documentation for endpoint details. Your engineers, analysts, and product teams will have a single source of truth for real-time and historical Dysprosium pricing — powering better quotes, cleaner dashboards, and faster decisions.
FAQ
- Is Dysprosium (DYS) supported? Check the current coverage on the Metals-API Supported Symbols page. Availability may expand over time.
- What unit do I get by default? Metals-API returns “per troy ounce.” Always verify the unit field in each response.
- How do I get USD per ounce? Invert the API’s ounces-per-USD rate: USD/oz = 1 / rate.
- How do I convert to kilograms? USD/kg = (USD/oz ÷ 31.1034768) × 1000.
- What about weekends/holidays? Some dates may have no quotes. Handle gaps explicitly and consider nearest prior business day for reporting if that matches your policy.
- Can I get bid/ask for executable estimates? Yes, use the Bid/Ask endpoint. Use bid for buy-side estimates, ask for sell-side, and mid for indicative display.
- Where do I find endpoint details and usage limits? See the Metals-API Documentation for endpoint specifics and plan features.
- How do I start? Get your key at the Metals-API Website, test Latest with curl, and build from there.