MDL.md API
Free REST API for Moldova exchange rates, credits and deposits.
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
/api/v1/rates
Official BNM rate for today or a specified date.
| Parameter | Type | Description |
|---|---|---|
date | string | Date, 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"
/api/v1/rates/{date}
Official BNM rate for a specific date, including currency names.
| Parameter | Type | Description |
|---|---|---|
date | string | Requested 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"
/api/v1/rates/commercial
Commercial bank rates (buy/sell) by operation type.
| Parameter | Type | Description |
|---|---|---|
date | string | Date, optional (YYYY-MM-DD). Default: today. |
region | string | Filter by region, optional. |
type | string | cash | card | transfer. Default: cash. |
Response fields: success, date, type, count, data[].
curl "https://mdl.md/api/v1/rates/commercial?type=cash"
/api/v1/convert
Converts an amount from one currency to another at the BNM rate.
| Parameter | Type | Description |
|---|---|---|
from | string | Source currency (EUR). Default: EUR |
to | string | Target currency (MDL). Default: MDL |
amount | number | Amount to convert, must be positive. Default: 1 |
date | string | Date, 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"
/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"
/api/v1/history/{currency}
BNM rate history and the commercial average for a currency.
| Parameter | Type | Description |
|---|---|---|
currency | string | Currency code in the path (EUR, USD…) |
days | integer | Number of days (1–365). Default: 30 |
Response fields: success, currency, days, bnm[], commercial_avg[].
curl "https://mdl.md/api/v1/history/EUR?days=30"
/api/v1/credits
Bank credit products, with filters and sorting.
| Parameter | Type | Description |
|---|---|---|
type | string | credit | mortgage | auto | express | all. Default: all |
amount | integer | Credit amount (minimum 1000), optional. |
term | integer | Term in months, optional (1–360) |
term_days | integer | Exact term in days (express products), optional (1–365) |
sort | string | dae | rate | payment | overpayment. Default: dae |
salary_card | boolean | 1 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"
/api/v1/deposits
Bank deposit products, with filters and sorting.
| Parameter | Type | Description |
|---|---|---|
currency | string | MDL | USD | EUR. Default: MDL |
type | string | term | savings | demand | accumulative | children | all. Default: all |
amount | integer | Deposit amount (minimum 100), optional. |
term | integer | Term in months, optional (1–360) |
sort | string | effective | 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"
/api/v1/track-click
Records a click event (internal use, called by the site).
JSON body (Content-Type: application/json):
| Parameter | Type | Description |
|---|---|---|
event_type | string | Required: ad | credit_detail | credit_apply |
target_id | integer | Optional |
target_label | string | Optional |
target_url | string | Optional |
page_url | string | Optional |
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"}'
