Bangladeshi Taka (BDT) - N/A Price Today: Live FX Rate for API Integration

Metals-API 8 min read
Bangladeshi Taka (BDT) - N/A Price Today: Live FX Rate for API Integration

You need to display or compute the live Bangladeshi Taka (BDT) FX rate in your app—whether that’s pricing jewelry and copper shipments in BDT, converting payouts for a fintech product, or normalizing research datasets. By the end of this guide, you’ll fetch the latest USD⇄BDT rates from Metals-API, parse the response, cache it safely, and convert any amount without guessing at units or base currency.

What you’ll build with BDT today

This walkthrough focuses on two endpoints that matter for a BDT integration:

Illustration: Bangladeshi Taka (BDT) - N/A Price Today: Live FX Rate for API Integration
  • Latest Rates: fetch the current USD⇄BDT exchange rate you can display or use in calculations.
  • Convert: compute amounts in BDT or USD without writing your own math, or use the returned rates from the Latest endpoint to do it client-side.

If you also need a multi-day chart or backtests, review the Time-Series endpoint and other features in the Documentation. For symbol availability (currencies and metals), check the Symbols page.

How Metals-API structures FX rates for BDT

Metals-API defaults to a USD base. That means rates in the Latest response are relative to 1 USD. When you request BDT, you’ll typically work with:

  • rates.BDT: how many BDT per 1 USD (BDT per USD).
  • rates.USDBDT: the inverted quote, i.e., USD per 1 BDT (USD per BDT), when available.
  • rates.USD: included as 1 for clarity (1 USD per USD).

This dual representation is convenient. If you want to price a USD item in BDT, multiply by rates.BDT. If you want to normalize a BDT-denominated amount to USD, multiply by rates.USDBDT.

Fetch the live USD⇄BDT rate

The Latest endpoint returns the most recent exchange rates, updated according to your plan’s refresh interval. Copy and run:

curl "https://metals-api.com/api/latest?access_key=YOUR_API_KEY&symbols=BDT,USD,USDBDT"

Example JSON (use these exact values as a reference for field names and structure):

{"success":true,"timestamp":1792282080,"date":"2026-10-18","base":"USD","rates":{"BDT":123.1036535,"USD":1,"USDBDT":0.008123235757580501}}

What you’ll actually use in code:

  • timestamp: Unix epoch seconds for when the payload was generated. Store and log this for cache and audit.
  • date: Calendar date of the rate snapshot.
  • base: Always "USD" by default.
  • rates.BDT: BDT per 1 USD (multiply USD amounts by this value to get BDT).
  • rates.USDBDT: USD per 1 BDT (multiply BDT amounts by this value to get USD).

Python example: show rate and convert amounts

Below is a concise Python script that calls the Latest endpoint, prints the live rate, and converts both USD→BDT and BDT→USD locally using the returned fields. This avoids an extra Convert API call when you only need simple arithmetic.

import os
import requests
from decimal import Decimal, ROUND_HALF_UP

API_KEY = os.getenv("METALS_API_KEY", "YOUR_API_KEY")
URL = "https://metals-api.com/api/latest"

params = {
"access_key": API_KEY,
"symbols": "BDT,USD,USDBDT"
}

r = requests.get(URL, params=params, timeout=10)
r.raise_for_status()
data = r.json()

if not data.get("success"):
raise RuntimeError(f"Metals-API error: {data}")

ts = data["timestamp"] # Unix epoch seconds
date = data["date"] # YYYY-MM-DD of the snapshot
base = data["base"] # Should be 'USD'
rates = data["rates"]
bdt_per_usd = Decimal(str(rates["BDT"]))
usd_per_bdt = Decimal(str(rates["USDBDT"]))

print(f"Snapshot date: {date} (base {base}, ts={ts})")
print(f"1 USD = {bdt_per_usd} BDT")
print(f"1 BDT = {usd_per_bdt} USD")

# Example conversions without calling Convert endpoint:
usd_amount = Decimal("250.00")
bdt_amount = (usd_amount * bdt_per_usd).quantize(Decimal("0.01"), rounding=ROUND_HALF_UP)
print(f"{usd_amount} USD => {bdt_amount} BDT")

bdt_amount2 = Decimal("5000")
usd_amount2 = (bdt_amount2 * usd_per_bdt).quantize(Decimal("0.01"), rounding=ROUND_HALF_UP)
print(f"{bdt_amount2} BDT => {usd_amount2} USD")

Notes:

  • Use Decimal for currency math to avoid floating-point rounding artifacts.
  • If you need official conversions with metadata from the API, call the Convert endpoint; otherwise local math with the latest payload is sufficient and saves requests.

Working with the Convert endpoint for BDT

The Convert endpoint lets you send an amount and get a computed result directly from the API. Typical use cases: server-side quotes, vouchers, or internal reconciliations when you prefer the API to return an authoritative result instead of doing local math. Refer to the Convert section in the Documentation for request parameters and response fields. You can convert USD→BDT or BDT→USD by setting from and to accordingly.

Quick reference: reading the BDT payload

Field Meaning Typical use
rates.BDT BDT per 1 USD Multiply USD amounts to get BDT totals
rates.USDBDT USD per 1 BDT Multiply BDT amounts to get USD totals
timestamp Unix epoch seconds Cache key, audit, staleness checks

Production details that save time

Base currency and inversion

By default, Metals-API returns exchange rates with USD as base. For BDT:

  • rates.BDT answers: “How many BDT is 1 USD?”
  • rates.USDBDT answers: “How many USD is 1 BDT?”

If you normalize prices to USD internally, prefer rates.USDBDT for fewer operations. If you display prices to Bangladeshi customers, use rates.BDT for fast USD→BDT calculations.

Timestamps, weekends, and market hours

  • Use timestamp to determine staleness. It’s a Unix epoch value; treat it as UTC.
  • FX markets trade continuously during the week and pause on weekends; your plan’s refresh interval dictates how often rates update. If you fetch during a closure, the timestamp and date reflect the last available update.

Caching and rate efficiency

  • Cache the full latest payload keyed by date+timestamp. Memory TTL at or just below your plan’s update interval avoids extra calls.
  • Coalesce concurrent requests: if many user actions need the same rate, serve the cached snapshot within your TTL window.
  • If you also query metals in the same app session, request all needed symbols in one call (e.g., symbols=BDT,USD,USDBDT,XAU) to reduce round trips.

Rounding and display

  • Retain full precision internally; round only for display or payment boundaries.
  • For BDT, two decimal places are common in UI, but your ledger may store more decimals to limit cumulative rounding error.

Error handling

  • Check success in the JSON. If false, inspect the error payload (see Documentation).
  • Fall back: If Latest fails, you can temporarily serve a cached snapshot with a staleness banner until the next successful call.

BDT in multi-asset workflows

Many teams quote metals or manufactured goods to Bangladeshi buyers and settle in BDT, while sourcing inputs in USD. Metals-API lets you pull both FX and metal benchmarks in the same call. If you decide to extend beyond BDT, confirm symbol support on the Symbols page and use one Latest request with multiple symbols to keep your pricing page fast.

For a high-level look at plans and market coverage, visit MCP. Note: Metals-API does not offer a free trial; choose the plan that matches your update frequency and symbol needs. Copper Monthly is $19.99/mo as a reference point for entry pricing; confirm current options on the site.

Security and deployment tips

  • Store YOUR_API_KEY on the server or in a secure secret manager. Avoid embedding keys in client-side code.
  • If your frontend needs rates, proxy through your backend and add a minimal cache layer.
  • Log the timestamp and rate used for every priced transaction to enable reproducible audits.

Extending your BDT integration

  • Time-series analysis: For backtests, hedging research, or chart widgets, query historical windows with the Time-Series endpoint (see Documentation).
  • Server-side conversion: Use Convert when you need an authoritative result and metadata in a single call.
  • Symbol discovery: Validate coverage of BDT and any other currencies in your workflow via Symbols.

Testing checklist

  • Fetch Latest with symbols=BDT,USD,USDBDT and verify both directions of conversion.
  • Unit test Decimal rounding for representative amounts (e.g., 0.01 USD, 1 USD, 10,000 BDT).
  • Simulate weekend fetches to confirm your cache and staleness UI.
  • Load test burst traffic using a single cached snapshot per refresh window.

Additional resources

  • API home: Metals-API overview and product information.
  • Docs: parameters, error formats, and additional endpoints in the Documentation.
  • Symbol coverage: find BDT and other supported codes on Symbols.
  • Get an API key: Register and start integrating.
  • Market Coverage Plans: find a plan aligned with your update cadence at MCP.
  • For macro context or validation alongside your integration, consult reliable financial references such as Bloomberg Currencies or Reuters FX Markets.
  • Back to product home: Metals-API website.

FAQ

  • Is the BDT rate quoted per 1 USD or per 1 BDT?
    In the Latest payload, rates.BDT is BDT per 1 USD. If present, rates.USDBDT is USD per 1 BDT. Use whichever orientation your calculation needs.
  • Do I need the Convert endpoint if I already have Latest?
    Not necessarily. For simple math, multiplying by rates.BDT or rates.USDBDT is enough. Use Convert when you want the API to return the computed amount and associated metadata, or to standardize results server-side.
  • How should I cache the BDT rate?
    Cache the entire Latest payload for a TTL that matches or is slightly below your plan’s update interval. Use the timestamp to gate refreshes and avoid redundant calls.
  • What happens on weekends or holidays?
    If the market is closed, the API serves the most recent available snapshot. Your timestamp and date may reflect the last update time; consider showing a subtle “Last updated at …” in your UI.
  • Is there a free trial?
    No. Metals-API does not offer a free trial. Review market coverage and plans at MCP and register to obtain your key.

Ready to wire BDT into your pricing, payouts, and dashboards? Get your API key in minutes and ship today: Register. For parameters, symbols, and error formats, keep the Documentation handy while you build.