You need reliable, machine-readable history for the ECB Deposit Facility rate (symbol: ECB_DEPOSIT) to drive lending logic, risk dashboards, or treasury analytics. By the end of this article you will fetch multi-year time series, point-in-time values, OHLC aggregates for charting, fluctuation stats, and even compute loan spreads and payments—all using the Interest Rates API with GET requests authenticated via an api_key parameter.
What you get when you ask for ECB_DEPOSIT
ECB_DEPOSIT is the European Central Bank’s deposit facility rate. In the API it is a central bank rate denominated in EUR with a “daily” frequency. Values are returned as a percentage per annum (numeric), and dates are ISO (YYYY-MM-DD). When you request “latest,” you also receive the effective date for each symbol in a dedicated dates map. Historical and time series endpoints return date-stamped values keyed by day.
All endpoints are under the same base URL and use the query parameter api_key for authentication:
- Base URL: https://interestratesapi.com/api/v1/
- HTTP method: GET only
- Authentication: ?api_key=YOUR_API_KEY (never a header)
You can explore capabilities at Explore Interest Rates API features and Try Interest Rates API. When you are ready to build, use Register to obtain your API key.
Multi-year history first: /timeseries for ECB_DEPOSIT
The /timeseries endpoint is the fastest way to retrieve a continuous ECB_DEPOSIT history between two dates. It returns a per-day map for each requested symbol, along with frequency and currency metadata.
cURL (copy/paste)
curl -s "https://interestratesapi.com/api/v1/latest?api_key=YOUR_API_KEY&symbols=ECB_DEPOSIT"
Python (requests)
import requests
url = "https://interestratesapi.com/api/v1/timeseries"
params = {
"start": "2025-11-08",
"end": "2026-11-08",
"symbols": "ECB_DEPOSIT",
"api_key": "YOUR_API_KEY"
}
resp = requests.get(url, params=params)
resp.raise_for_status()
data = resp.json()
# Access the ECB_DEPOSIT series:
series = data["rates"]["ECB_DEPOSIT"] # dict of "YYYY-MM-DD" -> value
frequency = data.get("frequencies", {}).get("ECB_DEPOSIT") # "daily"
currency = data.get("currencies", {}).get("ECB_DEPOSIT") # "USD" in sample
# Example: iterate chronologically
for day, value in sorted(series.items()):
# value is the interest rate in percent per annum for that effective date
pass
JavaScript (fetch)
async function fetchEcbDepositSeries() {
const url = "https://interestratesapi.com/api/v1/timeseries?start=2025-11-08&end=2026-11-08&symbols=ECB_DEPOSIT&api_key=YOUR_API_KEY";
const res = await fetch(url);
if (!res.ok) throw new Error("HTTP " + res.status);
const data = await res.json();
const series = data.rates.ECB_DEPOSIT; // object keyed by date
return series;
}
fetchEcbDepositSeries().then(series => {
// e.g., transform to arrays for charting
const dates = Object.keys(series).sort();
const values = dates.map(d => series[d]);
});
PHP
<?php
$base = "https://interestratesapi.com/api/v1/timeseries";
$query = http_build_query([
"start" => "2025-11-08",
"end" => "2026-11-08",
"symbols" => "ECB_DEPOSIT",
"api_key" => "YOUR_API_KEY"
]);
$url = $base . "?" . $query;
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$body = curl_exec($ch);
if ($body === false) {
throw new Exception("cURL error: " . curl_error($ch));
}
curl_close($ch);
$data = json_decode($body, true);
$series = $data["rates"]["ECB_DEPOSIT"];
?>
Official sample JSON
{
"success": true,
"date": "2026-11-07",
"base": "EUR",
"rates": {
"ECB_DEPOSIT": 2.5
},
"dates": {
"ECB_DEPOSIT": "2026-11-07"
},
"currencies": {
"ECB_DEPOSIT": "EUR"
},
"base_filter_note": null
}
How to read it:
- rates.ECB_DEPOSIT is a date-keyed map. Each key is an ISO date, each value is the rate (percent per annum) effective on that date.
- frequencies.ECB_DEPOSIT indicates the symbol’s nominal frequency (“daily”).
- currencies.ECB_DEPOSIT echoes the currency code for that symbol.
Date-range strategies and business days
Central bank policy rates like ECB_DEPOSIT change at discrete times but are represented daily. Expect repeated values across weekdays and no entries for weekends/holidays unless the API normalizes values across business days. When building charts or model inputs:
- Sort by date and forward-fill if a continuous daily index is required for analytics that expect every business day.
- When backtesting, align decision dates by the reported “effective” date within the series.
- Cache stable historical windows locally, and refetch the most recent 7–14 days as a rolling update window.
Point-in-time lookups: /historical
Use /historical for a single date check—great for reproducible reports and audit logs. If the date falls on a weekend or holiday, the API will return the value applicable on the last day with data within the month for monthly symbols. For daily symbols like ECB_DEPOSIT, request the precise date; if no value exists for a non-business day, handle this in your client by shifting to the previous business day or querying a short /timeseries range and taking the latest available.
cURL
Sample JSON
rates.ECB_DEPOSIT is the percent value for that date. For reproducibility, store both date and rate in your system of record.
Build OHLC aggregates for candlestick charts: /ohlc
When you need chart-friendly data, the /ohlc endpoint returns open, high, low, and close for weekly, monthly, or quarterly periods, computed on the fly from daily values. For ECB_DEPOSIT, monthly or quarterly OHLC helps visualize policy phases.
cURL
Sample JSON
Interpretation tips:
- period uses YYYY-MM for monthly, YYYY-Wxx for weekly (when applicable), or YYYY-Qx for quarterly.
- data_points counts how many daily observations contributed to the OHLC calculation for that period. This helps verify completeness.
Chart.js example (browser)
The snippet below fetches OHLC for ECB_DEPOSIT and renders a basic candlestick-like view. Adapt to your charting library as needed.
<div id="chart-container"><canvas id="ecbDepositChart"></canvas></div>
<script>
async function fetchOhlc() {
const url = "https://interestratesapi.com/api/v1/ohlc?symbols=ECB_DEPOSIT&period=monthly&start=2025-11-08&end=2026-11-08&api_key=YOUR_API_KEY";
const res = await fetch(url);
if (!res.ok) throw new Error("HTTP " + res.status);
const data = await res.json();
return data.rates.ECB_DEPOSIT; // array of { period, open, high, low, close, data_points }
}
(async () => {
const ohlc = await fetchOhlc();
const labels = ohlc.map(p => p.period);
const closes = ohlc.map(p => p.close);
// Minimal line chart on closes; replace with a candlestick plugin if desired
const ctx = document.getElementById("ecbDepositChart").getContext("2d");
new Chart(ctx, {
type: "line",
data: {
labels,
datasets: [{
label: "ECB_DEPOSIT (Close, % p.a.)",
data: closes,
borderColor: "#1f77b4",
fill: false
}]
},
options: {
responsive: true,
scales: {
y: { title: { display: true, text: "% p.a." } },
x: { title: { display: true, text: "Period (YYYY-MM)" } }
}
}
});
})();
</script>
Fluctuation analytics over a range: /fluctuation
Use /fluctuation to compute deltas across an interval without downloading the entire series client-side. It returns start and end values, absolute and percentage change, plus the high and low within the window.
cURL
Sample JSON
Use change and change_pct for quick trend annotations on dashboards or to trigger business logic (e.g., refinance workflows) when changes exceed a threshold.
Latest value for ECB_DEPOSIT
For user-facing interfaces or real-time checks, call /latest for ECB_DEPOSIT. The official sample below shows the exact request and response format. Values are illustrative; do not hard-code.
Official cURL (must match exactly)
Official JSON (must match exactly)
Key fields:
- rates.ECB_DEPOSIT: percent per annum.
- dates.ECB_DEPOSIT: effective date for that rate.
- date: the API’s batch date; use the per-symbol dates map for symbol-specific effective dates if aggregating multiple symbols.
JavaScript quick-start for latest
async function latestEcbDeposit() {
const res = await fetch("https://interestratesapi.com/api/v1/latest?api_key=YOUR_API_KEY&symbols=ECB_DEPOSIT");
if (!res.ok) throw new Error("HTTP " + res.status);
const json = await res.json();
const rate = json.rates.ECB_DEPOSIT;
const effectiveDate = json.dates.ECB_DEPOSIT;
return { rate, effectiveDate };
}
Compute spreads and loan payments
There are two common computations to build on top of ECB_DEPOSIT:
- Spread: difference between two rates (e.g., ECB_MRO minus ECB_DEPOSIT).
- Monthly payment: amortized payment from an annual rate r.
Spread formula:
spread = rate_A - rate_B // both in percent p.a.
Monthly payment formula for principal P, annual rate r (percent), and term n months:
i = (r / 100) / 12
payment = P * i / (1 - (1 + i)^(-n))
To compare total simple-interest costs between two symbols at their latest rates, you can also use /convert.
cURL: rate comparison
Sample JSON
difference.rate_spread is the simple arithmetic spread in percentage points. Use this as a quick benchmark for pricing and portfolio what-ifs.
End-to-end Python data pipeline (fetch → pandas → export CSV/Parquet)
The script below pulls a multi-year ECB_DEPOSIT series, normalizes to a DataFrame indexed by date, and writes both CSV and Parquet files. Adjust the date range to your requirements.
Python pipeline
import requests
import pandas as pd
from datetime import datetime
API = "https://interestratesapi.com/api/v1/timeseries"
PARAMS = dict(
start="2025-11-08",
end="2026-11-08",
symbols="ECB_DEPOSIT",
api_key="YOUR_API_KEY"
)
# 1) Fetch
resp = requests.get(API, params=PARAMS, timeout=30)
resp.raise_for_status()
payload = resp.json()
# 2) Extract the per-day series
series = payload["rates"]["ECB_DEPOSIT"] # dict: date -> value (% p.a.)
# 3) Normalize into DataFrame
# Sort by date to ensure chronological order
items = sorted(series.items(), key=lambda kv: kv[0])
df = pd.DataFrame(items, columns=["date", "ecb_deposit"])
df["date"] = pd.to_datetime(df["date"], format="%Y-%m-%d", utc=False)
df = df.set_index("date").sort_index()
# 4) Optional: align to a business-day index and forward-fill gaps
# bidx = pd.bdate_range(df.index.min(), df.index.max(), tz=None)
# df = df.reindex(bidx).rename_axis("date")
# df["ecb_deposit"] = df["ecb_deposit"].ffill()
# 5) Export
df.to_csv("ecb_deposit_timeseries.csv", float_format="%.6f")
df.to_parquet("ecb_deposit_timeseries.parquet", index=True)
print("Rows:", len(df))
print(df.head())
Notes:
- The API returns the rate in percent per annum as a float. Keep values as-is to avoid unit confusion.
- If your models require a business-day index with no gaps, resample or reindex and forward-fill cautiously.
- Parquet is recommended for large histories due to compression and schema preservation.
Operational details that save time
Authentication and HTTP method
- Authentication is via the api_key query parameter only, e.g. ?api_key=YOUR_API_KEY.
- All endpoints use GET. There are no POST, PUT, or DELETE endpoints.
Error handling and rate limits
- 401: Missing, invalid, or revoked api_key.
- 403: Account without an active plan.
- 404: No symbols matched or no data for the requested date/range (may include details on available ranges).
- 422: Validation error (date formats, invalid symbol, etc.).
- 429: Request quota exhausted. The response includes Retry-After and X-RateLimit-* headers (X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset) to help you back off and retry.
Publication cadence and business days
- ECB_DEPOSIT is marked “daily” in the catalogue. Policy rates update on decision days and then persist until changed. Your daily series will contain repeated values across many days.
- Non-business days typically have no new observations. If your chart or model requires every business day, forward-fill last known values locally.
Caching
- Historical windows are stable; cache them aggressively (e.g., keyed by start/end/symbols).
- For rolling analytics, refresh only the tail window (e.g., last 14 business days) to minimize requests.
Discoverability with /symbols
If you need to confirm the symbol metadata for ECB_DEPOSIT or to discover related ECB rates (e.g., ECB_MRO, ECB_MLF), query /symbols with filters.
Use this to programmatically build allowlists or UI selectors. See the MCP page for endpoint behavior.
Putting it together in production
- Normalize units early: store ECB_DEPOSIT as a float representing percent per annum (e.g., 2.5 means 2.5%).
- Preserve effective dates: for latest, use the per-symbol dates map; for historical/timeseries, the daily keys are authoritative.
- Handle gaps and weekends explicitly: align to your business calendar, forward-fill only when economically meaningful.
- Monitor for 404 and 422: log the full URL and params so you can diagnose symbol or range issues quickly.
- Automate exports: keep CSV/Parquet snapshots versioned for reproducibility in backtests and audits.
When you are ready to build, Get started with Interest Rates API and Try Interest Rates API for ECB_DEPOSIT in your stack.
FAQ
Q1: What unit is ECB_DEPOSIT returned in?
A: Percent per annum as a float. For example, 2.5 represents 2.5% p.a. Convert to monthly (divide by 12) only in your client when needed for loan math.
Q2: How do I interpret the effective date for latest?
A: Use the dates map per symbol (dates.ECB_DEPOSIT). When requesting multiple symbols, each may have a different effective date; do not rely solely on the top-level date field.
Q3: Are weekends and holidays included?
A: Daily central bank rates often persist across non-business days without new observations. Use /timeseries and forward-fill to create continuous business-day indices if required.
Q4: What if I get a 404 for a historical date?
A: It means there is no data for the symbol/range requested. Check the details field (if present) for available ranges, or adjust your query window using /timeseries to find the nearest available effective date.
Q5: Can I compute spreads between ECB_DEPOSIT and another ECB rate?
A: Yes. Call /latest (or /timeseries) for both ECB_DEPOSIT and the comparison symbol (e.g., ECB_MRO), then compute spread = rate_A − rate_B. For a quick total-interest comparison on a simple loan, use /convert.
If you are building lending, treasury, or analytics features that depend on ECB_DEPOSIT, you can be live in minutes. Generate an API key via Register and review endpoint behavior in MCP. Then start fetching ECB_DEPOSIT with the GET endpoints above from Try Interest Rates API.