API to Get the TCMB (TCMB_RATE) Rate

API to Get the TCMB (TCMB_RATE) Rate

Your team needs to pull the Central Bank of Turkey’s policy rate into an application and keep it accurate through rate decisions and month-to-month changes. By the end of this guide, you’ll know exactly how to fetch, cache, and analyze the TCMB policy rate from interestratesapi.com using seven REST endpoints, read effective dates correctly, compute spreads and loan costs, and ship production-grade integrations.

What TCMB_RATE Represents and How It’s Expressed

TCMB_RATE is the policy rate published by the Central Bank of the Republic of Türkiye (Türkiye Cumhuriyet Merkez Bankası, TCMB). In the Interest Rates API, TCMB_RATE is a central bank benchmark associated with TRY and has a monthly frequency. The value represents an annualized percentage rate (e.g., 37 for 37%).

Illustration: API to Get the TCMB (TCMB_RATE) Rate

Effective dates: for monthly symbols like TCMB_RATE, the API associates each month’s official rate with dates inside that month. When you query a single historical date inside a month, the API returns the month’s policy rate using the last available business day for that month. Time series endpoints may return a daily series where each business day reflects the same monthly policy rate until it changes.

Why it matters: TCMB’s policy rate is a cornerstone for TRY funding costs, bank lending rates, asset pricing, inflation assessments, and macro hedging. Developers use it to drive dashboards, risk models, loan comparisons, and scenario analysis.

Base URL, Authentication, and Request Method

All endpoints are GET-only and live under the same base URL: https://interestratesapi.com/api/v1/

  • HTTP method: GET (no POST/PUT/DELETE)
  • Authentication: append api_key as a query parameter
  • Format: JSON responses

Example base pattern:

https://interestratesapi.com/api/v1/<endpoint>?...&api_key=YOUR_API_KEY

Explore the platform at interestratesapi.com. When you’re ready to test in your stack, grab a key here: Register. For docs and ecosystem details, see the MCP.

1) Discoverability: /symbols — Find and Inspect Rate Identifiers

Use /symbols to list available benchmarks and filter by currency, category, or provider. For TCMB_RATE, you’ll typically filter by category=central_bank and base=TRY to narrow your catalog. Below is the documented cURL and JSON example (note: the response shows a USD instrument as a general illustration of the schema):

curl -s "https://interestratesapi.com/api/v1/latest?api_key=YOUR_API_KEY&symbols=TCMB_RATE"
{
    "success": true,
    "date": "2026-09-30",
    "base": "TRY",
    "rates": {
        "TCMB_RATE": 37
    },
    "dates": {
        "TCMB_RATE": "2026-09-30"
    },
    "currencies": {
        "TCMB_RATE": "TRY"
    },
    "base_filter_note": null
}

Key fields:

  • symbol: the identifier you use in other endpoints (e.g., TCMB_RATE).
  • frequency: “monthly” for TCMB_RATE (the example above shows a daily instrument to illustrate structure).
  • currency_code: TRY for TCMB_RATE.

Python (requests)

import requests

params = {"category": "central_bank", "base": "TRY", "api_key": "YOUR_API_KEY"}
r = requests.get("https://interestratesapi.com/api/v1/symbols", params=params)
data = r.json()
print(data.get("success"), data.get("count"))

JavaScript (fetch)

const url = "https://interestratesapi.com/api/v1/symbols?category=central_bank&base=TRY&api_key=YOUR_API_KEY";
const response = await fetch(url);
const data = await response.json();
console.log(data.success, data.count);

PHP

<?php
$query = http_build_query([
'category' => 'central_bank',
'base' => 'TRY',
'api_key' => 'YOUR_API_KEY'
]);
$ch = curl_init("https://interestratesapi.com/api/v1/symbols?$query");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$resp = curl_exec($ch);
curl_close($ch);
$data = json_decode($resp, true);
echo $data['success'] ? "OK" : "ERR";
?>

2) Latest: /latest — Get the Current TCMB Rate

Use /latest to pull the most recent value and its effective date. For monthly rates like TCMB_RATE, the response date typically reflects the final business day with data for that month.

Official cURL (verbatim)

Official JSON (verbatim)

How to read it:

  • rates.TCMB_RATE: the policy rate value, expressed in percent (annualized). Interpret “37” as 37%.
  • date: consolidated date for response aggregation.
  • dates.TCMB_RATE: the effective date for TCMB’s rate in the payload (2026-09-30 here).
  • currencies.TCMB_RATE: the currency association (TRY).

Python (requests)

import requests

params = {"symbols": "TCMB_RATE", "api_key": "YOUR_API_KEY"}
r = requests.get("https://interestratesapi.com/api/v1/latest", params=params)
data = r.json()

tcmb = data["rates"]["TCMB_RATE"]
as_of = data["dates"]["TCMB_RATE"]
print(f"TCMB policy rate: {tcmb}% (as of {as_of})")

JavaScript (fetch)

const resp = await fetch(
"https://interestratesapi.com/api/v1/latest?symbols=TCMB_RATE&api_key=YOUR_API_KEY"
);
const data = await resp.json();
const rate = data.rates.TCMB_RATE;
const asOf = data.dates.TCMB_RATE;
console.log(`TCMB policy rate: ${rate}% (as of ${asOf})`);

PHP

<?php
$query = http_build_query([
'symbols' => 'TCMB_RATE',
'api_key' => 'YOUR_API_KEY'
]);
$ch = curl_init("https://interestratesapi.com/api/v1/latest?$query");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$resp = curl_exec($ch);
curl_close($ch);
$data = json_decode($resp, true);
echo "TCMB policy rate: " . $data['rates']['TCMB_RATE'] . "% (as of " . $data['dates']['TCMB_RATE'] . ")";
?>

3) Historical: /historical — Value on a Specific Date

/historical yields the value for a particular date. For monthly symbols, the API uses the last day with data in that month if you choose any date within the month.

Note: JSON blocks in this guide may show illustrative values as documented examples. Your live responses will reflect current and historical TCMB data. Read rates.TCMB_RATE as a percent (annualized). For monthly TCMB_RATE, ensure your app maps any in-month query to the correct month’s effective value.

Python (requests)

import requests

params = {"date": "2025-06-15", "symbols": "TCMB_RATE", "api_key": "YOUR_API_KEY"}
r = requests.get("https://interestratesapi.com/api/v1/historical", params=params)
print(r.json())

JavaScript (fetch)

const u = "https://interestratesapi.com/api/v1/historical?date=2025-06-15&symbols=TCMB_RATE&api_key=YOUR_API_KEY";
const res = await fetch(u);
console.log(await res.json());

PHP

<?php
$query = http_build_query([
'date' => '2025-06-15',
'symbols' => 'TCMB_RATE',
'api_key' => 'YOUR_API_KEY'
]);
$ch = curl_init("https://interestratesapi.com/api/v1/historical?$query");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$resp = curl_exec($ch);
curl_close($ch);
echo $resp;
?>

4) Time Series: /timeseries — Historical Window for TCMB_RATE

Pull a range of values across dates for plotting, analytics, and backtesting. Monthly TCMB_RATE typically appears as the same value on each business day of a month until the policy changes. This makes charting straightforward and lets you calculate rolling measures without missing dates.

Key fields:

  • rates.TCMB_RATE: date-indexed map of values; one entry per business day within the requested range.
  • frequencies.TCMB_RATE: frequency label of the observable in your response payload.

Python (requests)

import requests

params = {
"start": "2025-10-28",
"end": "2026-10-28",
"symbols": "TCMB_RATE",
"api_key": "YOUR_API_KEY",
}
r = requests.get("https://interestratesapi.com/api/v1/timeseries", params=params)
series = r.json()["rates"]["TCMB_RATE"]
for d, v in list(series.items())[:3]:
print(d, v)

JavaScript (fetch)

const urlTs = "https://interestratesapi.com/api/v1/timeseries?start=2025-10-28&end=2026-10-28&symbols=TCMB_RATE&api_key=YOUR_API_KEY";
const tsResp = await fetch(urlTs);
const tsData = await tsResp.json();
console.log(Object.entries(tsData.rates.TCMB_RATE).slice(0, 3));

PHP

<?php
$query = http_build_query([
'start' => '2025-10-28',
'end' => '2026-10-28',
'symbols' => 'TCMB_RATE',
'api_key' => 'YOUR_API_KEY'
]);
$ch = curl_init("https://interestratesapi.com/api/v1/timeseries?$query");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$resp = curl_exec($ch);
curl_close($ch);
echo $resp;
?>

5) Fluctuation: /fluctuation — Change Stats for a Period

Use /fluctuation to summarize changes and extrema between two dates. This is helpful for monthly performance snapshots, rate-change alerts, and dashboards.

Key fields per symbol:

  • start_value, end_value: values at the edges of your window.
  • change and change_pct: absolute and percentage difference.
  • high, low: extremes over the window.

Python (requests)

import requests

params = {
"start": "2025-10-28",
"end": "2026-10-28",
"symbols": "TCMB_RATE",
"api_key": "YOUR_API_KEY",
}
r = requests.get("https://interestratesapi.com/api/v1/fluctuation", params=params)
fx = r.json()["rates"]["TCMB_RATE"]
print(f"Δ={fx['change']} ({fx['change_pct']}%) range=[{fx['low']}, {fx['high']}]")

JavaScript (fetch)

const uFl = "https://interestratesapi.com/api/v1/fluctuation?start=2025-10-28&end=2026-10-28&symbols=TCMB_RATE&api_key=YOUR_API_KEY";
const flRes = await fetch(uFl);
const fl = (await flRes.json()).rates.TCMB_RATE;
console.log(fl.start_value, fl.end_value, fl.change, fl.change_pct);

PHP

<?php
$query = http_build_query([
'start' => '2025-10-28',
'end' => '2026-10-28',
'symbols' => 'TCMB_RATE',
'api_key' => 'YOUR_API_KEY'
]);
$ch = curl_init("https://interestratesapi.com/api/v1/fluctuation?$query");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$resp = curl_exec($ch);
curl_close($ch);
echo $resp;
?>

6) OHLC: /ohlc — Candlestick Aggregations

OHLC is computed on-the-fly from the daily series. For monthly TCMB_RATE, these aggregations can still be useful for charting and month-level summaries. Choose period=weekly, monthly, or quarterly.

Key fields per bucket:

  • open, high, low, close: computed from the underlying daily sequence.
  • data_points: how many daily observations contributed to that period.

Python (requests)

import requests

params = {
"symbols": "TCMB_RATE",
"period": "monthly",
"start": "2025-10-28",
"end": "2026-10-28",
"api_key": "YOUR_API_KEY",
}
r = requests.get("https://interestratesapi.com/api/v1/ohlc", params=params)
ohlc = r.json()["rates"]["TCMB_RATE"]
for row in ohlc:
print(row["period"], row["open"], row["close"], row["data_points"])

JavaScript (fetch)

const uO = "https://interestratesapi.com/api/v1/ohlc?symbols=TCMB_RATE&period=monthly&start=2025-10-28&end=2026-10-28&api_key=YOUR_API_KEY";
const oRes = await fetch(uO);
const oData = await oRes.json();
console.log(oData.rates.TCMB_RATE);

PHP

<?php
$query = http_build_query([
'symbols' => 'TCMB_RATE',
'period' => 'monthly',
'start' => '2025-10-28',
'end' => '2026-10-28',
'api_key' => 'YOUR_API_KEY'
]);
$ch = curl_init("https://interestratesapi.com/api/v1/ohlc?$query");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$resp = curl_exec($ch);
curl_close($ch);
echo $resp;
?>

7) Convert: /convert — Compare Loan Interest Costs Using TCMB_RATE

/convert estimates total interest cost for a simple loan using the latest rates of two symbols, helping you compare benchmarks or compute a spread instantly. This is handy if you benchmark TRY loans against another policy rate or interbank index.

Key outputs:

  • from/to.rate: the latest annualized percentages used.
  • total_interest and total_payment: simple-loan estimates for the amount and term in months.
  • difference.rate_spread: spread between the two benchmarks.

Python (requests)

import requests

params = {
"from": "TCMB_RATE",
"to": "ECB_MRO",
"amount": 100000,
"term_months": 12,
"api_key": "YOUR_API_KEY",
}
r = requests.get("https://interestratesapi.com/api/v1/convert", params=params)
cmp = r.json()
print(cmp["difference"]["rate_spread"], cmp["difference"]["interest_saved"])

JavaScript (fetch)

const uC = "https://interestratesapi.com/api/v1/convert?from=TCMB_RATE&to=ECB_MRO&amount=100000&term_months=12&api_key=YOUR_API_KEY";
const cRes = await fetch(uC);
const cData = await cRes.json();
console.log(cData.difference);

PHP

<?php
$query = http_build_query([
'from' => 'TCMB_RATE',
'to' => 'ECB_MRO',
'amount' => 100000,
'term_months' => 12,
'api_key' => 'YOUR_API_KEY'
]);
$ch = curl_init("https://interestratesapi.com/api/v1/convert?$query");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$resp = curl_exec($ch);
curl_close($ch);
echo $resp;
?>

Correctly Handling Dates, Frequency, Business Days, and Caching

Effective dates for TCMB_RATE:

  • Monthly cadence: the policy rate is treated as monthly. When you query any in-month date, you’ll receive that month’s rate; the API uses the last available business day for that month in /historical.
  • Daily rows in time series: even for monthly benchmarks, /timeseries will show business-day rows populated with the current policy value, which aids plotting and OHLC computations.

Business days and holidays: financial time series skip weekends and non-business days. If you query days without new observations, you will see the last published value propagated to subsequent business days until a policy change. This aligns with how policy rates are used in most analytic pipelines.

Caching suggestions:

  • Latest value: cache TCMB_RATE’s latest response for the current month and invalidate on known decision days or after the last business day of the month.
  • Historical and timeseries: cache per month or per quarter depending on your dashboard’s refresh pattern.
  • Respect rate limits: on HTTP 429, back off per Retry-After header. Track X-RateLimit-Remaining and X-RateLimit-Reset to avoid burst limits.

Link these fundamentals to your app logic so consumers see consistent values across modules. If you mix endpoints, ensure you normalize on the same effective date before comparing or aggregating results.

Computing Spreads, Monthly Payments, and Annualized Math

Rates are returned as annualized percentages. For calculations:

  • Spread (in percentage points): spread_pp = rateA - rateB
  • Monthly (decimal) rate: r_m = (rate_annual / 100) / 12
  • Simple interest over N months on principal P: interest = P × (rate_annual / 100) × (N / 12)
  • Amortized payment (annuity) with monthly rate r_m for N months: payment = P × r_m / (1 - (1 + r_m)^(-N))

Do not hardcode any sample numbers in production. Pull TCMB_RATE via /latest, derive r_m, and compute payments or spreads dynamically at request time or during scheduled batch updates. If you prefer a server-side shortcut, the /convert endpoint returns simple-loan totals and spreads between two symbols using the latest rates so you can compare TCMB_RATE to another benchmark immediately.

Integration Use Cases for TCMB_RATE

  • TRY loan dashboards: show current TCMB policy rate alongside bank lending references to contextualize borrower APR changes.
  • Treasury and ALM: monitor /fluctuation windows for policy inflections that affect funding and reinvestment strategies.
  • Macro research: build /timeseries charts with /ohlc overlays to annotate policy cycles and regime shifts.
  • Pricing and risk: plug monthly TCMB_RATE into scenario engines; simulate cashflow sensitivity with amortization formulas using the derived monthly rate.
  • Loan comparisons: call /convert to compare TCMB against ECB_MRO or other policy benchmarks when evaluating currency or rate exposure.

For more details and endpoints, see interestratesapi.com and the MCP.

Error Handling and Reliability

Common error contracts:

  • 401: Missing or invalid api_key.
  • 403: Account without active plan.
  • 404: No symbols matched or no data for requested date/range (may include details with available ranges).
  • 422: Validation error (e.g., wrong date format or invalid symbol).
  • 429: Request quota exhausted — watch Retry-After and X-RateLimit-* headers.

Production tips:

  • Validate symbols against /symbols before allowing them into downstream jobs.
  • Centralize GET calls; set timeouts and retries with exponential backoff for transient failures.
  • Normalize dates: always store the returned dates.TCMB_RATE per response to keep front-end displays and backtests consistent.

End-to-End Example Flow for TCMB_RATE

Below is a recommended sequence for a robust pipeline:

  1. Discovery: query /symbols with base=TRY and category=central_bank to confirm TCMB_RATE exists and note frequency=monthly.
  2. Latest snapshot: fetch /latest for TCMB_RATE and cache the JSON, parsing rates and dates maps.
  3. Analytics: pull /timeseries for your chart window; compute /fluctuation and plot /ohlc for fast analysis.
  4. Calculations: convert the annual percent into a monthly decimal, then derive payment or NPV metrics as needed.
  5. Comparisons: use /convert to summarize spread effects on simple-loan costs across two benchmarks.

This pattern covers most use cases from dashboards to portfolio tooling and lets you scale safely with caching and normalized date semantics.

FAQ

Q1: What unit is TCMB_RATE returned in?
A: It’s an annualized percentage rate. A value of 37 should be interpreted as 37%, not 0.37.

Q2: How do I interpret dates for monthly TCMB_RATE?
A: Use dates.TCMB_RATE to determine the effective date for the returned value. For /historical within a month, the API uses the last available business day in that month.

Q3: Why does /timeseries show daily entries for a monthly rate?
A: The API provides values per business day to simplify plotting, OHLC computation, and rolling-window analytics. The daily entries reflect the same policy rate until it changes.

Q4: How should I cache results?
A: Cache /latest for the current month and invalidate on decision days or the last business day. Cache /timeseries by month or quarter. Respect 429 Retry-After and track X-RateLimit-* headers.

Q5: Can I compare TCMB_RATE to another benchmark directly?
A: Yes. Use /convert to compare simple-loan interest costs and compute spreads between TCMB_RATE and another symbol such as ECB_MRO based on the latest values.

Ship your integration with a production key: Register. Explore the ecosystem and documentation via the MCP, and learn more about benchmarks at interestratesapi.com.

Ready to get started?

Get your API key and start validating bank data in minutes.

Get API Key