How to Get the Bahamian Dollar (BSD) Price using a REST API in 2026
You need to programmatically fetch the Bahamian Dollar (BSD) price so your app can quote amounts, convert payments, and backfill analytics—without maintaining your own FX feed. By the end of this guide, you will query BSD with a single REST call, parse a real JSON response, and optionally convert amounts to/from BSD using Metals-API.
What “BSD price” means in practice
When you request currency rates from Metals-API, all values are returned relative to a base currency. By default, the base is USD. In that setup:
- rates.BSD is how many BSD you get for 1 USD.
- rates.USD is how many USD for 1 USD (always 1 when base=USD).
- rates.USDBSD is the explicit USD/BSD pair (USD per 1 BSD or vice versa depending on naming—see the JSON explanation below for how to use it).
This guide shows how to pull BSD using the latest endpoint for real-time values and the convert endpoint to compute amounts. If you also need historical series, the time-series endpoint is available—see the linked docs for parameters and limits.
Endpoint choices for BSD
Two endpoints cover most BSD use cases:
- Latest rates: Get the current BSD price relative to USD (or another base if supported by your plan).
- Convert: Convert an arbitrary amount USD↔BSD using Metals-API’s conversion endpoint.
For a complete list of symbols, including BSD and additional currencies, refer to the Metals-API Supported Symbols. If you’re new to the API, start with the Metals-API Documentation and create an API key via Register.
Quick start: Get the current BSD rate
This call requests the latest rate with a USD base and filters for BSD and USD.
cURL request
curl "https://metals-api.com/api/latest?access_key=YOUR_API_KEY&symbols=BSD,USD"
Official JSON response example
{"success":true,"timestamp":1791850080,"date":"2026-10-13","base":"USD","rates":{"BSD":1,"USD":1,"USDBSD":1}}
How to read this response
- success: API call succeeded.
- timestamp: UNIX epoch for when this snapshot was generated (treat as seconds; use UTC when converting).
- date: Calendar date of the snapshot.
- base: The base currency. Here it’s USD.
- rates.BSD: BSD per 1 USD.
- rates.USD: USD per 1 USD (1 when base=USD).
- rates.USDBSD: The explicit USD↔BSD pair included in the payload. With base=USD, you typically use rates.BSD (BSD per USD) to convert USD to BSD, and its reciprocal for BSD to USD. If rates.USDBSD is present, prefer it to avoid reciprocals—read it as the direct pair supplied in the response and apply according to your conversion direction.
Note: Currency responses may not include a “unit” field. Unit fields matter for metals (e.g., per troy ounce). For currency-only queries like BSD, the returned rates are simple currency ratios.
JavaScript example: Parse BSD and convert amounts
async function fetchBsdRate() {
const url = "https://metals-api.com/api/latest?access_key=YOUR_API_KEY&symbols=BSD,USD";
const res = await fetch(url, { method: "GET" });
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const data = await res.json();
// Sanity checks
if (!data.success) throw new Error("API reported failure");
const { timestamp, date, base, rates } = data;
// Prefer an explicit pair if included
// With base=USD:
// - rates.BSD means BSD per 1 USD
// - rates.USDBSD can be used where an explicit pair is desired
const bsdPerUsd = rates.BSD;
const usdPerUsd = rates.USD; // should be 1 when base=USD
// USD -> BSD
function usdToBsd(amountUsd) {
return amountUsd * bsdPerUsd;
}
// BSD -> USD (reciprocal if you only have BSD per USD)
function bsdToUsd(amountBsd) {
if (bsdPerUsd === 0) throw new Error("Zero rate");
return amountBsd / bsdPerUsd;
}
return {
asOf: new Date(timestamp * 1000).toISOString(),
date,
base,
bsdPerUsd,
usdPerUsd,
convertUsdToBsd: usdToBsd,
convertBsdToUsd: bsdToUsd
};
}
// Example usage:
fetchBsdRate()
.then(({ asOf, bsdPerUsd, convertUsdToBsd, convertBsdToUsd }) => {
console.log("Snapshot as of (UTC):", asOf);
console.log("BSD per 1 USD:", bsdPerUsd);
const invoiceUsd = 250;
console.log(`Invoice ${invoiceUsd} USD in BSD:`, convertUsdToBsd(invoiceUsd));
const paymentBsd = 1000;
console.log(`Payment ${paymentBsd} BSD in USD:`, convertBsdToUsd(paymentBsd));
})
.catch(console.error);
When to use the convert endpoint
Use the convert endpoint to compute one-off conversions server-side with Metals-API’s current rate logic. This is helpful when you do not want to manually invert or cache rates in your application logic.
cURL request: convert USD to BSD
curl "https://metals-api.com/api/convert?access_key=YOUR_API_KEY&from=USD&to=BSD&amount=1000"
This asks the API to convert 1,000 USD into BSD using the latest available rate.
cURL request: convert BSD to USD
curl "https://metals-api.com/api/convert?access_key=YOUR_API_KEY&from=BSD&to=USD&amount=1000"
This converts 1,000 BSD into USD. Response fields include the queried amount, the rate used, and the computed result. For detailed field descriptions and availability per plan, consult the Documentation.
Practical details that save time
1) Base currency and inversion
- Default base is USD. In the latest response above, rates.BSD is BSD per 1 USD. To go the other direction (BSD to USD), invert unless the pair you need is provided explicitly in the payload.
- If your plan supports changing base, you can request a different base (e.g., base=BSD) to receive other rates relative to BSD. Check availability in the docs before relying on it.
2) Timestamps and timezone
- timestamp is a UNIX epoch in seconds. Treat it as UTC for consistent storage and display.
- date is the reporting calendar date. If you de-duplicate or cache by date, use both timestamp and date for safety.
3) Caching and request efficiency
- Cache the latest BSD rate for the lifetime that suits your UX and compliance needs, then refresh. If your UI shows “as of” times, most users accept refresh intervals aligned to your plan’s update cadence.
- Batch symbols when possible. For example, query symbols=BSD,USD,EUR if you quote those together, to save calls.
- Respect idempotence on the client: if you re-try after a timeout, ensure you do not duplicate downstream actions dependent on the conversion result.
4) Weekends and market closures
- FX markets generally have lower liquidity or closures on weekends/holidays. The latest endpoint may return the last available snapshot until a new one is published.
- In UI, display an “as of” timestamp so users know when the rate last updated.
5) Units: currencies vs metals
- Currency-to-currency rates are unitless ratios (no “troy ounce” unit). If you later integrate metal prices alongside BSD, metals data includes a unit context such as per troy ounce. Keep those code paths separate to avoid incorrect math.
6) Validation and fallbacks
- Always check success and presence of expected keys (rates.BSD, timestamp) before using values.
- If a symbol is unavailable in your plan, use the Symbols list to verify support and naming.
Add historical context: time-series for BSD
To analyze how BSD moved over time relative to USD (or another supported base), the time-series endpoint returns daily snapshots between start_date and end_date. This is useful for trend charts, VaR backtests, or pricing audits. Since parameters and limits vary by plan, review the Documentation for exact usage and date ranges.
Common workflows for BSD in production
Real-time quoting in checkout or POS
- At page load or POS session start, fetch latest BSD and cache it for a sensible period (e.g., a few minutes, aligned to your plan’s update interval).
- Convert amounts locally using the cached rate for instant UX, and re-validate server-side with a fresh call if compliance requires it.
Portfolio valuation and risk
- Use time-series to backfill historical BSD values for valuation snapshots.
- If you mix metals and currencies (e.g., gold holdings priced in BSD), segregate units in your code and normalize metals to a currency using metals rates before converting to BSD.
ERP and invoicing
- For auditability, store the timestamp and rate used on each invoice or journal entry.
- If you require end-of-day consistency, pull a rate at a fixed cutover time and apply it across that day’s postings.
Why BSD matters in digital metals and data workflows
Digital transformation in metals, manufacturing, and fintech increasingly spans multi-currency checkout, hedging dashboards, and cross-border settlement. By pairing BSD with metals pricing, developers can unify exposure reporting: for example, price copper or gold sourced in USD, roll into BSD for a Bahamian entity’s books, and analyze fluctuations. With Metals-API’s JSON responses and composable endpoints, you can integrate BSD conversions the same way you integrate metals data, keeping the stack consistent as you scale analytics and smart pricing logic.
Security, reliability, and governance
- Store the API key securely (environment variables or a secrets manager). Rotate as part of your standard key hygiene.
- Log timestamp, base, and the exact rate used for each conversion to enable deterministic reconciliations.
- If your use case is safety-critical (e.g., financial reporting), implement dual-sourcing and cross-checks, then fall back to the last known good value with clear UX labeling.
For metadata and developer tooling beyond the public endpoints, explore MCP.
Testing and rollout checklist
- Verify BSD appears in the Supported Symbols.
- Implement latest and convert flows in a sandbox project with your API key.
- Add monitoring on HTTP status, success flag, and latency.
- Cache rates and display “as of” timestamps to users.
- Document your inversion logic and unit handling for code reviewers.
Troubleshooting tips
- Unexpected null or NaN in totals: Ensure you read the correct side of the pair (BSD per USD vs USD per BSD), and avoid dividing by zero if a field is missing.
- Rates appearing stale: Check timestamp and your cache TTL. If it’s a weekend or holiday, last-known values may persist until the next update.
- Symbol errors: Re-check BSD spelling and that your plan includes currency access. Use the symbols endpoint to validate available codes.
Additional resources
- Metals-API website: Product overview and features
- API reference: Metals-API Documentation
- BSD and FX background: BIS Triennial FX survey
FAQ
Q: How do I convert a user-entered amount in BSD to USD?
A: Either invert the BSD per USD rate (BSD→USD) from the latest response or call the convert endpoint with from=BSD, to=USD and the user-entered amount. Prefer the explicit pair if present in the payload.
Q: What timezone should I use for the timestamp?
A: Treat timestamp as a UNIX epoch in seconds and convert/display in UTC to avoid ambiguity across regions and DST changes.
Q: Can I change the base to BSD and get other currencies relative to BSD?
A: Some plans support changing the base. Check the Documentation for availability and usage before relying on it.
Q: What happens on weekends?
A: The latest endpoint typically returns the most recent snapshot. Your app should surface an “as of” time and decide whether to accept the cached rate or defer real-time conversions until markets resume.
Q: Are there free trials?
A: Metals-API does not offer a free trial. You can review plans and obtain an API key by visiting the Register page.
Ready to ship BSD quoting and conversion? Get your API key now at Register, explore endpoint details in the Documentation, and check out developer tooling in MCP. If you’ll also price metals against BSD, confirm symbol coverage via the Symbols list.