Central Bank of Madagascar Exchange Rate API: Official MGA (Ariary) Rates as JSON
The Central Bank of Madagascar publishes the official exchange rates that accounting, tax, and customs rules in Madagascar reference — published official rates, not moving market prices. This guide shows how to pull them as JSON: via a REST endpoint or the zero-dependency central-bank-of-madagascar-exchange-rate npm package.
/api/v1/central-bank/bfm/history?source=USD&target=MGA).What the BFM publishes
- The daily MID closing rate for 19 currencies in ariary per unit — 4,400.38 per US dollar and 4,974.65 per euro on the table dated 24 September 2026.
- The currencies of Madagascar's trade — USD, EUR, GBP, CHF, JPY, CAD and the Nordic units, the rand, the Mauritian rupee and the Djibouti franc, the Indian rupee and the yuan, the Asia-Pacific dollars (AUD, HKD, SGD, NZD) and the SDR.
- Set by the interbank market itself — the Marché Interbancaire de Devises (MID) is the platform on which Malagasy banks trade foreign currency under the central bank's supervision, and the BFM publishes its closing rate as the day's official figure, with the bank's own date on every response.
- History back to September 2023 in our API, queryable by exact date or as a series — from 4,498.82 per dollar on the first table to 4,716.55 at the March 2025 low point of the ariary and 4,400.38 today.
The ariary floats — there is no peg or band to fall back on — which is exactly why the BFM's published MID rate matters: it is the figure Malagasy customs, the tax administration and the banks convert at, not a bureau or street quote. The API serves that number, dated, for every currency the bank prints.
Why official rates, not market rates
A live mid-market feed answers "what is USD/MGA trading at right now?" — the right tool for checkouts and dashboards. But accountants, auditors, and tax authorities ask a different question: "which rate were you required to use for this date?" That answer comes from the Central Bank of Madagascar's published rates, and it never changes after publication.
Get the latest rates (REST)
curl "https://allratestoday.com/api/v1/central-bank/bfm/latest" \
-H "Authorization: Bearer YOUR_API_KEY" The response is the bank's most recent published data — every rate and the publication date. The latest rates are available on every plan, including the free tier (300 requests/month, no credit card).
The npm SDK
npm install central-bank-of-madagascar-exchange-rate import { getRate, getLatestRates } from 'central-bank-of-madagascar-exchange-rate';
// One pair at the official BFM rate
const pair = await getRate('USD', 'MGA', { apiKey: 'art_live_...' });
console.log(pair.rate, pair.rate_date);
// The bank's full published table
const table = await getLatestRates({ apiKey: 'art_live_...' });
console.log(table.rate_date, table.rates.length); Zero dependencies, TypeScript types included, and it runs anywhere fetch exists — Node 18+, Bun, Deno, and edge runtimes.
Historical rates for an invoice date
import { getRatesForDate, getHistory } from 'central-bank-of-madagascar-exchange-rate';
// The official rates for an invoice date — non-publication days return
// the most recent published date, flagged via published_on_requested_date.
const day = await getRatesForDate('2026-06-30', { apiKey: 'art_live_...' });
// Time series for one pair
const series = await getHistory(
{ source: 'USD', target: 'MGA', from: '2026-01-01' },
{ apiKey: 'art_live_...' }
); Historical dates and time series need a paid plan; the latest rates stay free.
Published vs derived pairs
If the BFM does not print a pair directly, the API resolves it from the bank's published rates — an inverse, or a cross rate via MGA — and flags it derived: true with the method used. Official and computed values are never silently mixed, which is exactly the distinction an auditor will ask about.
The MID rate since September 2023
Our archive starts on 22 September 2023, when the dollar closed at 4,498.82 ariary and the euro at 4,786.74, and holds every published table since — the slide to 4,716.55 per dollar in March 2025, the recovery to 4,133.13 in April 2026 and the 4,400.38 of late September 2026. For a past invoice date, one call returns the rate the interbank market closed at that day; non-publication days resolve to the last table set and are flagged.
FAQ
Does the Central Bank of Madagascar have an official exchange rate API?
The BFM publishes its official rates on its own site, and AllRatesToday serves the same published rates as clean JSON via REST or the central-bank-of-madagascar-exchange-rate npm package. The latest rates are free (300 requests/month); historical dates need a paid plan.
How often do Central Bank of Madagascar rates update?
Once per business day, as the closing rate of the interbank foreign-exchange market (MID) for 19 currencies in ariary per unit; the bank usually posts a day's table the following morning. Every API response carries the bank's own rate date, and weekends and holidays resolve to the last published table.
Can I get the BFM rate for a past date, like an invoice date?
Yes. The /central-bank/bfm/rates-for-date endpoint returns the official rates for any archived date. Non-publication days resolve to the most recent published date and are flagged via published_on_requested_date.
Official Central Bank of Madagascar rates, as JSON
The latest rates are free — 300 requests/month, no credit card.
Get your free API key