MDL.md API

Free REST API for Moldova exchange rates, credits and deposits.

All responses are JSON. The API is public, requires no key and can be called directly from a browser or server. Please credit "MDL.md" as the source when you use the data.

Basics

Base URL https://mdl.md/api/v1
Format JSON (Content-Type: application/json; charset=utf-8)
Authentication None required — public API.
CORS Access-Control-Allow-Origin: * · open for all origins.
Version X-API-Version: v1

Every response includes a boolean success field. On error, an error field describes the problem and the HTTP status is 4xx or 5xx.

{
  "success": true,
  ...
}

{
  "success": false,
  "error": "Currency not found or no rates for this date"
}

Rate limiting

The limit is 300 requests per hour per IP address. Every response includes the headers below.

Header Description
X-RateLimit-Limit Maximum requests per hour (300).
X-RateLimit-Remaining Requests remaining in the current window.
X-RateLimit-Reset Unix timestamp when the limit resets.
Retry-After Seconds to wait (sent only with a 429 response).

When the limit is exceeded the API responds with HTTP 429 and a Retry-After: 3600 header.

Endpoints

GET /api/v1/rates

Official BNM rate for today or a specified date.

ParameterTypeDescription
datestringDate, optional (YYYY-MM-DD). Default: today.

Response fields: success, date, source (BNM), rates[]currency, rate, nominal, change, change_percent.

curl "https://mdl.md/api/v1/rates"
curl "https://mdl.md/api/v1/rates?date=2026-07-01"
GET /api/v1/rates/{date}

Official BNM rate for a specific date, including currency names.

ParameterTypeDescription
datestringRequested date in the path (YYYY-MM-DD)

Response fields: success, date, source, rates[]currency, rate, nominal, change_value, change_percent, name_ro, name_ru, name_en.

curl "https://mdl.md/api/v1/rates/2026-07-01"
GET /api/v1/rates/commercial

Commercial bank rates (buy/sell) by operation type.

ParameterTypeDescription
datestringDate, optional (YYYY-MM-DD). Default: today.
regionstringFilter by region, optional.
typestringcash | card | transfer. Default: cash.

Response fields: success, date, type, count, data[].

curl "https://mdl.md/api/v1/rates/commercial?type=cash"
GET /api/v1/convert

Converts an amount from one currency to another at the BNM rate.

ParameterTypeDescription
fromstringSource currency (EUR). Default: EUR
tostringTarget currency (MDL). Default: MDL
amountnumberAmount to convert, must be positive. Default: 1
datestringDate, optional (YYYY-MM-DD). Default: today.

Response fields: success, data. Returns 400 if the amount is not positive and 404 if the currency is missing or no rates exist for the date.

curl "https://mdl.md/api/v1/convert?from=EUR&to=MDL&amount=100"
GET /api/v1/banks

List of active banks and exchange offices, with coordinates for the map.

No parameters.

Response fields: success, count, data[]id, name, slug, type, website, city, region, latitude, longitude, is_24h.

curl "https://mdl.md/api/v1/banks"
GET /api/v1/history/{currency}

BNM rate history and the commercial average for a currency.

ParameterTypeDescription
currencystringCurrency code in the path (EUR, USD…)
daysintegerNumber of days (1–365). Default: 30

Response fields: success, currency, days, bnm[], commercial_avg[].

curl "https://mdl.md/api/v1/history/EUR?days=30"
GET /api/v1/credits

Bank credit products, with filters and sorting.

ParameterTypeDescription
typestringcredit | mortgage | auto | express | all. Default: all
amountintegerCredit amount (minimum 1000), optional.
termintegerTerm in months, optional (1–360)
term_daysintegerExact term in days (express products), optional (1–365)
sortstringdae | rate | payment | overpayment. Default: dae
salary_cardboolean1 for salary-card clients, optional.

Response fields: success, count, filters, data[].

curl "https://mdl.md/api/v1/credits?type=credit&amount=100000&term=36&sort=dae"
GET /api/v1/deposits

Bank deposit products, with filters and sorting.

ParameterTypeDescription
currencystringMDL | USD | EUR. Default: MDL
typestringterm | savings | demand | accumulative | children | all. Default: all
amountintegerDeposit amount (minimum 100), optional.
termintegerTerm in months, optional (1–360)
sortstringeffective | rate | term | amount | bank. Default: effective

Response fields: success, count, filters, data[].

curl "https://mdl.md/api/v1/deposits?currency=MDL&type=term&sort=effective"
POST /api/v1/track-click

Records a click event (internal use, called by the site).

JSON body (Content-Type: application/json):

ParameterTypeDescription
event_typestringRequired: ad | credit_detail | credit_apply
target_idintegerOptional
target_labelstringOptional
target_urlstringOptional
page_urlstringOptional

Response fields: success.

curl -X POST "https://mdl.md/api/v1/track-click" \
  -H "Content-Type: application/json" \
  -d '{"event_type":"ad","target_label":"leaderboard","page_url":"/ro"}'