How to Get the LME Aluminium Bid (LME-ALUB) - Per Troy Ounce Price via API and convert values to local currency with FX rates
Symbol: LME Aluminium Bid (LME-ALUB) →
You need the live LME Aluminium Bid (symbol LME-ALUB) priced per troy ounce, and you want to display it in your user’s local currency. By the end of this guide you will 1) pull the latest LME-ALUB price, 2) read the USD-per-ounce value directly, and 3) convert that value into any currency using the API’s FX conversion—ready to plug into dashboards, pricing engines, alerts, or models.
What “LME-ALUB per troy ounce” means and which symbols to request
LME-ALUB is the LME Aluminium Bid symbol. Metals-API returns metals data with USD as the base by default, and units are per troy ounce unless noted otherwise. For LME-ALUB, the latest endpoint can return both:
- LME-ALUB — the “per USD” rate (troy ounces you get for 1 USD)
- USDLME-ALUB — the inverted “USD per troy ounce” rate (price per oz in USD)
In most applications (quotes, P&L, invoices), you want USD per troy ounce. To avoid manual inversion, request both symbols and read USDLME-ALUB directly. You can find the symbol codes on the LME and metals lists here: Metals-API Supported Symbols.
If you need the market context for LME aluminium specifications, see the London Metal Exchange site: London Metal Exchange.
Request the latest LME-ALUB and USD per troy ounce
Use the latest endpoint and ask for both LME-ALUB and USDLME-ALUB in a single call. Replace YOUR_API_KEY with your key from the registration page.
curl "https://metals-api.com/api/latest?access_key=YOUR_API_KEY&symbols=LME-ALUB,USDLME-ALUB,USD"
Sample response (official):
{"success":true,"timestamp":1793578080,"date":"2026-11-02","base":"USD","rates":{"LME-ALUB":10.47595307513,"USD":1,"USDLME-ALUB":0.09545670860000398}}
How to read this
- timestamp/date: When the data was last updated (Unix seconds and YYYY-MM-DD). Treat times as UTC.
- base: USD is the base currency for the returned rates.
- rates.LME-ALUB: Ounces per 1 USD (oz/USD). You would invert it to get USD per ounce if USDLME-ALUB was not present.
- rates.USDLME-ALUB: USD per troy ounce (USD/oz). This is the field most apps use for pricing or charting.
- rates.USD: For convenience, often 1 when base is USD.
Convert the USD/oz price into a local currency using FX
Once you have rates.USDLME-ALUB (USD per troy ounce), use the convert endpoint to translate that amount into any currency—for example, EUR, GBP, JPY, or a LatAm currency your customers pay with. The workflow is two-step: latest → convert.
- Call latest to get rates.USDLME-ALUB.
- Pass that amount to /api/convert with from=USD and to=<LOCAL_CURRENCY>.
Example convert call (the amount to convert is the USD/oz value you just fetched):
curl "https://metals-api.com/api/convert?access_key=YOUR_API_KEY&from=USD&to=EUR&amount=0.09545670860000398"
Note: The convert endpoint is for currency conversion. The metals price is already embedded in the USD amount you pass (USDLME-ALUB). This avoids any ambiguity about units.
For endpoint and parameter details, see the Metals-API Documentation.
End-to-end example in Python
This script fetches the LME-ALUB USD/oz price and converts it to a local currency (set LOCAL_CCY). It also shows how to turn troy ounces into kilograms for industrial planning.
import os
import time
import requests
API_KEY = os.getenv("METALS_API_KEY", "YOUR_API_KEY")
LOCAL_CCY = os.getenv("LOCAL_CCY", "EUR") # e.g., EUR, GBP, JPY, MXN
def get_latest_lme_alub_usd_per_oz():
url = "https://metals-api.com/api/latest"
params = {
"access_key": API_KEY,
"symbols": "LME-ALUB,USDLME-ALUB,USD"
}
r = requests.get(url, params=params, timeout=10)
r.raise_for_status()
data = r.json()
if not data.get("success"):
raise RuntimeError(f"Latest error: {data}")
# Prefer USD per oz if provided:
usd_per_oz = data["rates"].get("USDLME-ALUB")
if usd_per_oz is None:
# Fallback: invert ounces per USD
oz_per_usd = data["rates"]["LME-ALUB"]
usd_per_oz = 1.0 / oz_per_usd
return {
"usd_per_oz": usd_per_oz,
"timestamp": data.get("timestamp"),
"date": data.get("date")
}
def convert_usd_amount_to_local(amount_usd, to_ccy):
url = "https://metals-api.com/api/convert"
params = {
"access_key": API_KEY,
"from": "USD",
"to": to_ccy,
"amount": amount_usd
}
r = requests.get(url, params=params, timeout=10)
r.raise_for_status()
data = r.json()
if not data.get("success"):
raise RuntimeError(f"Convert error: {data}")
return data["result"] # local currency per troy ounce
def ounces_to_kilograms(oz):
# 1 troy ounce = 31.1034768 grams
return oz * 31.1034768 / 1000.0
def main():
latest = get_latest_lme_alub_usd_per_oz()
usd_per_oz = latest["usd_per_oz"]
local_per_oz = convert_usd_amount_to_local(usd_per_oz, LOCAL_CCY)
# Show also per-kilogram values commonly used in manufacturing
kg_per_oz = ounces_to_kilograms(1.0)
usd_per_kg = usd_per_oz / kg_per_oz
local_per_kg = local_per_oz / kg_per_oz
print(f"Date (UTC): {latest['date']} Timestamp: {latest['timestamp']}")
print(f"LME-ALUB price: {usd_per_oz:.8f} USD/oz")
print(f"LME-ALUB price: {local_per_oz:.8f} {LOCAL_CCY}/oz")
print(f"LME-ALUB price: {usd_per_kg:.4f} USD/kg")
print(f"LME-ALUB price: {local_per_kg:.4f} {LOCAL_CCY}/kg")
if __name__ == "__main__":
main()
Why this pattern is robust
- It reads USDLME-ALUB directly (no manual inversion errors).
- It separates metal pricing from FX conversion, so you can cache each step independently.
- It explicitly handles troy ounce → kilogram conversion for industrial BOMs and ERP integrations.
Units, base currency, and conversions you’ll actually use
- Unit: Metals-API returns values per troy ounce by default. A troy ounce equals 31.1034768 grams. If you price in metric:
- USD/kg = (USD/oz) / (0.0311034768)
- USD/metric-tonne = (USD/kg) × 1000
- Base currency: The base is USD unless you specify otherwise. That’s why you see fields like LME-ALUB (oz/USD) and USDLME-ALUB (USD/oz).
- Timestamps: Treat timestamps as Unix seconds in UTC. Align caches and chart labels accordingly.
- Local currency display: Always convert the per-oz USD price using the convert endpoint so your UI shows consistent FX-aligned pricing.
If you want a quick refresher on troy ounces, see Troy weight (Wikipedia).
Practical caching, non-trading days, and update cadence
- Caching: Cache the latest LME-ALUB response for your plan’s update frequency (for example, 60 min or 10 min). You can also cache FX conversions separately for a shorter period if your FX source updates more frequently.
- Weekends/closures: LME trading days impact how often true bid/ask values change. On weekends or holidays, the API may continue returning the last available rate with a stable timestamp/date—design your UI to indicate “as of” times.
- Retry/backoff: Network hiccups happen. Implement simple retries with exponential backoff and fail-open to the last cached price if appropriate for your application.
- Precision: Keep at least 6–8 decimals internally for per-oz prices to avoid rounding drift when multiplying by large quantities.
Bid/Ask vs. last rate notes
When your plan includes bid/ask, you can retrieve bid and ask side-by-side. For many procurement and quoting workflows, the bid is the key reference for inventory value calculations. If you need bid/ask detail for LME-ALUB specifically, check availability and parameters in the Documentation and confirm symbol support in Symbols.
Smart integration patterns for pricing, ERP, and analytics
- Two-tier cache:
- Tier 1: Cache the latest metals payload (LME-ALUB + USDLME-ALUB) for the full update interval.
- Tier 2: Cache currency conversion results for a shorter period to reflect FX quickly without hammering the metals endpoint.
- Normalization layer: Standardize your application’s internal unit to USD/kg. Convert all incoming prices to USD/kg immediately, then convert for display only at the UI boundary.
- Alerts: Trigger notifications when USDLME-ALUB or local-currency-per-kg crosses thresholds. Use the timestamp to ensure you’re alerting on fresh data.
- Historical backfills: For backtesting or charting, combine time-series metals data with the convert endpoint for period-aligned FX normalization. See time-series and historical endpoints in the Documentation.
Symbol reference you will use repeatedly
| Symbol | Meaning | Typical usage |
|---|---|---|
| LME-ALUB | Troy ounces of aluminium per 1 USD (oz/USD) | Invert to get USD/oz when USDLME-ALUB is not returned |
| USDLME-ALUB | USD per troy ounce (USD/oz) | Use directly for pricing, charts, invoicing |
| USD | Base currency (often 1 when base=USD) | Reference for FX conversions and sanity checks |
Common mistakes to avoid
- Forgetting units: Metals are per troy ounce by default, not avoirdupois ounces. Always convert with 31.1034768 g/oz.
- Inversion errors: If you only read LME-ALUB (oz/USD) but need USD/oz, invert precisely or use USDLME-ALUB when available.
- Mixing metals and FX in a single step: Keep metal retrieval (latest) separate from FX conversion so you can cache, test, and debug each independently.
- Dropping timestamps: Store the timestamp/date with every price and display “as of” on customer-facing screens.
Security, endpoints, and next steps
- API key: Pass your key in access_key. Store it securely server-side, not in public JS.
- Endpoints used here:
- /api/latest for LME-ALUB and USDLME-ALUB
- /api/convert for converting USD per oz to local currency per oz
- Explore additional endpoints (historical, time-series, OHLC) as your use case expands: see Documentation.
- Get your API key here: Register.
- For managed connectivity, routing, and controls, see MCP.
Aluminium, data, and the road ahead
As more procurement, hedging, and ERP functions move into automated workflows, the LME-ALUB bid becomes a live signal inside pricing rules, MOQ calculations, and supply risk simulations. Lightweight integrations—one latest call to get USD/oz, one convert to display local currency—open the door to streaming monitors, alerting, and analytics. Combined with basic unit conversions (oz → kg → tonne), this data plugs straight into production and finance pipelines.
FAQ
Q: Which field is the actual “USD per troy ounce” price for LME-ALUB?
A: Use rates.USDLME-ALUB from the latest response. If it’s absent for your plan, invert rates.LME-ALUB (USD/oz = 1 ÷ oz/USD).
Q: How do I convert the USD/oz price into my local currency?
A: Call /api/convert with from=USD, to=<LOCAL_CCY>, and amount=<USDLME-ALUB>. The result is your local currency per troy ounce.
Q: How should I handle weekends or holidays?
A: Expect the last available price to persist with the same timestamp/date. Display “as of” and cache appropriately to avoid confusing end users.
Q: Can I get historical LME-ALUB for backtesting?
A: Yes—use the historical and time-series endpoints to fetch past data, then pair with /api/convert for FX-normalized history. Refer to the Documentation for parameters and date ranges.
Q: How do I switch from ounces to kilograms or tonnes?
A: Use 1 troy ounce = 31.1034768 grams. USD/kg = (USD/oz) / 0.0311034768, and USD/tonne = USD/kg × 1000.
Ready to pull LME Aluminium Bid into your product? Get an API key and start integrating in minutes: Register. For architecture controls at scale, check out MCP.