Get Belize Dollar (BZD) - N/A prices using this API for historical lookups
You need the live Belize Dollar (BZD) rate to drive pricing, P&L, or risk logic—right now. By the end of this guide, you’ll be able to query Metals-API’s /latest endpoint to fetch the current BZD rate, interpret the response correctly (including inversion), and wire it into workflows like real-time catalog repricing and threshold alerts—while caching efficiently to save requests.
What BZD is and who needs its live price
The Belize Dollar (BZD) is the official currency of Belize. Developers and analysts working on FX-aware features—like quoting jewelry or metals products to Belize-based customers, converting BZD-denominated costs in an ERP, or tracking cross-currency margin—need a reliable, programmatic way to retrieve the current BZD rate.
Metals-API provides real-time and historical market data for precious/industrial metals and currencies in a single, consistent JSON API. That means you can key your BZD conversions to the same data backbone you trust for gold, silver, and base metals—streamlining analytics and product logic as your stack evolves.
Fetch the current BZD rate with /latest
We’ll use the Latest Rates endpoint to request real-time data with USD as the base currency. In this setup, rates are quoted as “units of quote currency per 1 USD.” For BZD, the field you’ll typically read is rates.BZD.
cURL request
curl -s "https://metals-api.com/api/latest?access_key=YOUR_API_KEY&base=USD&symbols=BZD,USDBZD,USD"
Notes:
- access_key is your API key. If you don’t have one, you can create a free key here.
- base=USD requests quotes relative to USD.
- symbols=BZD,USDBZD,USD focuses the response on fields relevant to BZD workflows.
Python example
import requests
from datetime import datetime, timezone
API_URL = "https://metals-api.com/api/latest"
params = {
"access_key": "YOUR_API_KEY",
"base": "USD",
"symbols": "BZD,USDBZD,USD"
}
resp = requests.get(API_URL, params=params, timeout=10)
resp.raise_for_status()
data = resp.json()
# --- Read fields you will use ---
# Base currency (should be "USD" here)
base = data.get("base")
# UNIX timestamp (seconds since epoch, UTC)
ts = data.get("timestamp")
as_utc = datetime.fromtimestamp(ts, tz=timezone.utc)
# Rates dictionary
rates = data.get("rates", {})
# 1 USD in BZD (primary field for most conversions)
usd_to_bzd = rates.get("BZD")
# If present: 1 BZD in USD (convenience inverse)
bzd_to_usd_direct = rates.get("USDBZD")
# If USDBZD is not present, you can compute it:
bzd_to_usd_computed = (1.0 / usd_to_bzd) if (usd_to_bzd and usd_to_bzd != 0) else None
print("Base:", base)
print("As of (UTC):", as_utc.isoformat())
print("USD -> BZD:", usd_to_bzd)
print("BZD -> USD (direct):", bzd_to_usd_direct)
print("BZD -> USD (computed):", bzd_to_usd_computed)
Sample JSON response and how to interpret it
Below is a real response you’ll receive when calling the /latest endpoint for BZD with base=USD and symbols including BZD.
{"success":true,"timestamp":1791072540,"date":"2026-10-04","base":"USD","rates":{"BZD":2.011843,"USD":1,"USDBZD":0.4970566788760356}}
What to read and why it matters:
- success: true indicates the request was processed successfully.
- timestamp: 1791072540 is the UNIX time in seconds (UTC). Use it for cache validation and auditability.
- date: "2026-10-04" is the calendar date associated with this snapshot.
- base: "USD" means every rate is measured per 1 USD.
- rates: a map of symbol to numeric rate:
- rates.BZD = 2.011843 means 1 USD equals 2.011843 BZD.
- rates.USD = 1 is present when base=USD.
- rates.USDBZD = 0.4970566788760356 is the inverse pair (1 BZD equals ~0.4970567 USD) provided for convenience.
Inversion guidance:
- To compute BZD→USD when only rates.BZD is present, invert it: BZDUSD = 1 / rates.BZD.
- If rates.USDBZD is present (as in the example), you can use it directly without inverting.
Units note:
- Currency responses do not include a unit field. Interpret rates as “units of quoted currency per 1 base currency.”
- If later you request metals in BZD (e.g., XAU with base=BZD), metals responses include a unit like “per troy ounce.” Convert troy ounces to grams using 1 ozt = 31.1034768 g if you need per-gram pricing.
Two practical integrations using BZD
1) Repricing a catalog for BZD
Scenario: Your product catalog is in USD, but a storefront view should show live BZD prices.
Flow:
- Call /latest with base=USD and symbols=BZD.
- Read rates.BZD and timestamp.
- For each product, BZD_price = USD_price × rates.BZD.
- Cache rates.BZD until the next scheduled refresh (see caching below), display “As of: timestamp (UTC)” to set expectations.
Fields used:
- rates.BZD for conversion
- timestamp for staleness/UX messaging
2) Alert on a threshold (e.g., BZD strengthens vs USD)
Scenario: Trigger a Slack alert when 1 BZD buys more than 0.50 USD.
Flow:
- Call /latest with base=USD and symbols=BZD,USDBZD (or compute inverse).
- Compute bzd_to_usd = rates.USDBZD if present, else 1 / rates.BZD.
- If bzd_to_usd >= 0.50, send an alert. Include the timestamp to avoid duplicates (only alert on new timestamps).
Fields used:
- rates.BZD and/or rates.USDBZD for the threshold condition
- timestamp to deduplicate alerts and to record when the condition was met
Caching and refresh frequency
Metals-API’s /latest data is updated at plan-specific intervals (for example, every 60 minutes or every 10 minutes depending on plan). Always consult the update cadence for your subscription. You can find endpoint parameters and plan behaviors in the API documentation.
Recommended caching strategy:
- Key cache entries by (endpoint, base, symbols) and the last seen timestamp. If the next response has the same timestamp, continue serving cached conversions.
- Set TTL to your plan’s update interval plus a small buffer. On cache hit, avoid calling the API unnecessarily.
- For storefronts, prefetch on a schedule (cron or serverless timer) and store the last value+timestamp in your database or KV cache.
Non-trading days and weekends:
- FX markets are generally active 24×5. On weekends and major holidays, expect the last available snapshot to persist until markets reopen.
- Your UI should surface the timestamp so users know exactly when the rate was captured (UTC).
Symbols, units, and future-proofing
Symbol correctness matters. Before you ship, verify codes in the Supported Symbols directory. For BZD, the primary code you’ll use is BZD; you may also see convenience pairs like USDBZD in the response you receive.
If you expand to quote metals directly in BZD, remember that metals are quoted per troy ounce by default. If a product’s BOM or weight-based pricing requires grams or kilograms, convert from troy ounces (31.1034768 grams per ozt) consistently on the client or service layer.
For account and key management or to explore additional capabilities, see the Metals-API MCP.
Where to go next
This article focused on the /latest endpoint for live BZD. If you need day-over-day changes, ranges, or backfills, explore the historical and time-series endpoints in the Documentation. Also review the Metals-API site for platform-overview context and roadmap.
Additional references
- Central Bank of Belize for local monetary policy context.
- IMF Data for macroeconomic series that can complement FX modeling.
- Foreign Exchange (Investopedia) for concept refreshers.
FAQ
Q: What does rates.BZD represent when base=USD?
A: It’s the number of Belize Dollars per 1 US Dollar. Multiply a USD amount by rates.BZD to convert to BZD.
Q: I need BZD→USD. Should I invert or use USDBZD?
A: If rates.USDBZD is present, use it directly. Otherwise compute 1 / rates.BZD. Both represent “USD per 1 BZD.”
Q: How do I avoid over-calling the API?
A: Cache by (base, symbols) and reuse results until the timestamp changes or your refresh interval elapses. Many teams refresh on the plan’s update cadence.
Q: What timezone is the timestamp?
A: The timestamp is a UNIX epoch in seconds (UTC). Convert it to your user’s timezone only for display; keep UTC for logs and cache keys.
Q: Can I price metals in BZD?
A: Yes. Request metals with base=BZD. Metals responses include a unit like “per troy ounce.” Convert to grams if needed using 31.1034768 g per ozt.
Get your API key and start shipping: Register. Then consult the Symbols and the Documentation to finalize your requests.