Platinum Apr 2027 (PLJ27) - Per Troy Ounce Price API in Multiple Currencies: Getting Started Guide for Developers
You need to quote, hedge, or mark-to-market a Platinum April 2027 contract (PLJ27) in multiple currencies, and you want the number per troy ounce that your app, ERP, or pricing engine can consume. In this guide you’ll query PLJ27 with Metals-API, read both “USD per ounce” and “ounces per USD,” convert amounts between currencies, and ship a production-safe integration.
What you will build: multi-currency PLJ27 pricing per troy ounce
We’ll focus on two endpoints you actually need for a PLJ27 workflow:
- Latest Rates: fetch current PLJ27 in a single call, including both directions (oz per USD and USD per oz).
- Convert: convert arbitrary amounts between currencies and PLJ27 ounces.
We’ll also cover essential details that save time: units (troy ounces vs grams), base currency behavior, timestamps/timezones, caching, and weekend/holiday behavior. For the full list of features and symbols, use the Documentation and the up-to-date Symbols catalog.
PLJ27 and platinum in context: per-ounce pricing for clean-tech supply chains
Platinum (XPT) is integral to green technology and sustainable innovation—from fuel cells and green hydrogen catalysts to emissions reduction. When you price a forward month like PLJ27 in your trading, manufacturing, or procurement system, you typically want “USD per troy ounce,” and often “EUR/GBP/JPY per troy ounce,” too. Metals-API returns unambiguous, per–troy ounce units so your conversions to grams or kilograms remain consistent across BOMs, RFQs, or hedging models.
Metals-API powers real-time and historical metals data for digital tools: quant dashboards, risk systems, automated quoting, and smart procurement workflows. Explore the platform at metals-api.com and the MCP tooling at Metals-API MCP for composable pricing.
Endpoint 1: fetch the latest PLJ27 price in multiple currencies
The Latest Rates endpoint returns PLJ27 relative to a base (by default USD). Crucially, the response includes both:
- rates.PLJ27 — ounces per 1 USD (oz/USD)
- rates.USDPLJ27 — USD per 1 ounce (USD/oz)
That dual representation makes multi-currency math straightforward and avoids accidental inversion errors.
Copy-paste curl request
This request asks for PLJ27 and its USD-quoted inverse in one call:
curl "https://metals-api.com/api/latest?access_key=YOUR_API_KEY&symbols=PLJ27,USDPLJ27,USD"
Official JSON response example
Below is a real Metals-API response for PLJ27. Use these exact field names in your integration:
{"success":true,"timestamp":1790986200,"date":"2026-10-03","base":"USD","rates":{"PLJ27":0.00058109128944157,"USD":1,"USDPLJ27":1720.9000000000037}}
How to read it:
- base: "USD" — all rates are relative to 1 USD unless an inverse is provided.
- rates.PLJ27: 0.00058109128944157 — ounces per 1 USD (oz/USD). Multiply by USD to get ounces.
- rates.USDPLJ27: 1720.9000000000037 — USD per 1 troy ounce (USD/oz). Multiply by ounces to get USD.
- timestamp/date: last updated time. Use it for caching and to detect market pauses.
Using the fields you actually need
- Display “USD per troy ounce”: show rates.USDPLJ27 directly.
- Convert USD budget to ounces: ounces = usd_amount * rates.PLJ27.
- Convert ounces to USD: usd = ounces * rates.USDPLJ27.
- Transform to other currencies: first convert to USD with your FX rate, then multiply by rates.PLJ27 or rates.USDPLJ27 as needed.
Endpoint 2: convert amounts between PLJ27 and currencies
For quoting, invoicing, or settlement, you often need to convert an amount between currencies and PLJ27. Use the Convert endpoint to avoid manual inversion and reduce arithmetic errors. See parameter options in the Documentation. Below we show the logic using Latest Rates to keep the flow simple and explicit for PLJ27; in production, Convert helps consolidate steps.
Python example: get USD/oz and convert to grams and other currencies
This script fetches PLJ27 once, computes USD/oz, converts an example ounces amount to USD, and shows a grams conversion. Replace YOUR_API_KEY with your key.
import requests
API_KEY = "YOUR_API_KEY"
URL = "https://metals-api.com/api/latest"
SYMBOLS = "PLJ27,USDPLJ27,USD"
resp = requests.get(URL, params={"access_key": API_KEY, "symbols": SYMBOLS}, timeout=10)
resp.raise_for_status()
data = resp.json()
if not data.get("success"):
raise SystemExit(f"API error: {data}")
timestamp = data["timestamp"]
base = data["base"] # "USD"
oz_per_usd = data["rates"]["PLJ27"] # oz per 1 USD
usd_per_oz = data["rates"]["USDPLJ27"] # USD per 1 oz (preferred for display/pricing)
# Example: price 15.75 oz in USD
ounces = 15.75
usd_total = ounces * usd_per_oz
# Convert ounces to grams for BOM or procurement (1 troy oz = 31.1034768 g)
TROY_OZ_TO_G = 31.1034768
grams = ounces * TROY_OZ_TO_G
print(f"Timestamp: {timestamp}")
print(f"USD per oz (PLJ27): {usd_per_oz:.4f}")
print(f"{ounces} oz = ${usd_total:,.2f}")
print(f"{ounces} oz = {grams:,.2f} g")
In a multi-currency app, combine Metals-API metals rates with your FX source, or use Metals-API currency rates if available on your plan, then:
- USD → EUR per oz: (USD/oz) × (USD→EUR FX)
- EUR → USD per oz: (EUR/oz) × (EUR→USD FX)
If you rely on a single API, check your plan for currency coverage in the Documentation.
Key implementation details that save time
1) Units and conversions
- All rates in the examples are per troy ounce. 1 troy ounce = 31.1034768 grams = 0.0311034768 kg.
- To convert USD/oz to USD/g: divide by 31.1034768. To convert USD/g to USD/oz: multiply by 31.1034768.
- When presenting metric units in sustainability or clean-energy procurement workflows, show both oz and g to reduce ambiguity.
2) Base currency and inversion
- Default base is USD. rates.PLJ27 means “oz per 1 USD.”
- The API can also return “USD per oz” as rates.USDPLJ27. Prefer this for display and settlement.
- Never invert manually if the inverse is provided; use rates.USDPLJ27 directly to avoid rounding drift.
3) Timestamps and timezone
- timestamp is a UNIX epoch (seconds). Use it to verify freshness and for caching keys.
- date is provided as YYYY-MM-DD. Align your UI and logs to the same timezone boundary you use for reporting cutoffs.
4) Caching and polling strategy
- Update frequencies depend on plan. Do not poll faster than your plan’s update cadence—cache by timestamp or round-robin a short-lived in-memory cache (e.g., 30–90s within your app) to reduce calls.
- Serve cached PLJ27 to non-critical views; always pass through fresh quotes to trading/hedging flows.
5) Market pauses, weekends, and holidays
- When markets are closed, the timestamp may not advance. Use the last known timestamp to detect stale conditions.
- If your app needs a value during closures, use the last close (OHLC or Historical endpoint) with a visual “as of” indicator.
6) Validation, precision, and rounding
- Store raw floats/decimals from the API. Apply display rounding only at the UI layer.
- For invoicing, agree to a rounding policy (e.g., 2–4 decimals for currency, 3–5 for weights) and keep it consistent across systems.
Putting PLJ27 into a multi-currency workflow
Two common flows for platinum-intensive, clean-tech manufacturing and trading stack neatly on the Metals-API Latest Rates:
- Mark-to-market: pull PLJ27 once per interval, store timestamp, expose USD/oz and oz/USD to pricing and risk.
- Quote build: compute base component costs in grams or kilograms (via troy-oz conversion), apply scrap/yield factors, then price in the customer’s currency using your FX rate.
For team visibility, write both rates.PLJ27 and rates.USDPLJ27 to your telemetry and alert if either is missing. That reduces on-call noise during market closures or network retries.
Optional: backfill and analytics
If you need historical PLJ27 to backfill charts or compute moving averages/volatility, the Historical or Time-series endpoints are available. Use them to query any date since the service’s historical coverage allows. For parameters, limits, and examples, see the Documentation. Avoid mixing PLJ27 with spot XPT in the same series unless your model explicitly accounts for term structure.
Troubleshooting checklist
- Got a number that looks inverted? Ensure you’re using rates.USDPLJ27 for USD per ounce, not rates.PLJ27.
- Seeing stale data? Check timestamp and your plan’s update frequency; reduce polling or raise cache TTL during closures.
- Unexpected currency output? Confirm the base is USD and use explicit FX multipliers for non-USD currencies.
- Symbol not found? Verify PLJ27 is supported on your plan via the Symbols list.
Practical examples you can ship
Example A: expose “USD per oz” and “oz per USD” in your service
- Call Latest with symbols=PLJ27,USDPLJ27,USD once per refresh cycle.
- Persist: timestamp, USDPLJ27, PLJ27.
- Serve: /platinum/plj27?unit=usd_per_oz returns USDPLJ27; ?unit=oz_per_usd returns PLJ27.
Example B: customer-facing quote in EUR per gram
- Fetch USDPLJ27 (USD per oz) from Latest.
- Convert to USD per gram: usd_per_g = USDPLJ27 / 31.1034768.
- Apply FX to EUR: eur_per_g = usd_per_g × USD→EUR FX.
- Compute BOM: grams_needed × eur_per_g × (1 + fees/markup).
Security and operations
- Do not hardcode keys in client apps; keep keys server-side and proxy requests.
- Use short timeouts and retries with jitter for resilience.
- Log the timestamp, symbol, and both directions (PLJ27 and USDPLJ27) for auditability.
Where to find what you need
- Register for an API key: Register
- Learn endpoint parameters and response fields: Documentation
- Verify PLJ27 support and explore other symbols: Symbols
- MCP composable pricing workflows: MCP
Additional background on units and market conventions: What is a troy ounce?
FAQ
Q: What’s the difference between PLJ27 and spot platinum (XPT)?
A: PLJ27 represents a specific forward month code, while XPT typically refers to spot. Treat them as distinct instruments; don’t mix them in the same pricing series unless your model includes the forward curve.
Q: How do I get “USD per troy ounce” directly?
A: Use rates.USDPLJ27 from the Latest endpoint. It’s already the USD/oz inverse of PLJ27 and avoids manual inversion drift.
Q: Can I price in EUR, GBP, or JPY?
A: Yes. Fetch USD/oz for PLJ27, then apply your USD→target-currency FX rate to obtain target-currency/oz. If your plan includes currency rates, you can use them directly; see the Documentation for FX coverage details.
Q: Why isn’t the timestamp changing on weekends?
A: Markets may be paused. Serve the last value with an “as of” note and resume polling when markets reopen. You can also query Historical/Time-series for end-of-day values.
Q: How frequently should I poll?
A: Match your plan’s update frequency. Cache by timestamp or with a short TTL, and avoid polling faster than updates occur.
Ready to integrate PLJ27 into your trading, fintech, or manufacturing stack? Get your API key and start shipping with Metals-API: Register. For deeper features and examples, visit metals-api.com and the full Documentation.