The Electronic Data Delivery System (EVDS) maintained by the Central Bank of the Republic of Turkey (CBRT / TCMB) is the primary authoritative source for macroeconomic time series in Turkey. It archives historical exchange rates, CPI/PPI inflation indices, reserve figures, balance of payments, and banking credit volumes. Rather than manually exporting CSV files each morning, developers and quantitative analysts can automate ingestion using the official EVDS REST API.
Step 1: Creating an EVDS Account and Generating an API Key
- Navigate to the official portal: evds2.tcmb.gov.tr.
- Click on Register / Sign Up and complete account creation using a valid email address.
- Once logged in, click your profile name in the top navigation bar and select API Key.
- Click Generate New API Key. Copy the alphanumeric string and store it securely (e.g., in an environment variable).
Step 2: Understanding Series Codes and API Endpoints
The base endpoint for data retrieval is:
https://evds2.tcmb.gov.tr/service/evds/series={SERIES_CODE}&startDate={DD-MM-YYYY}&endDate={DD-MM-YYYY}&type=json
Popular series codes include:
TP.DK.USD.A.YTL: US Dollar (USD) Selling Exchange RateTP.DK.EUR.A.YTL: Euro (EUR) Selling Exchange RateTP.FG.J0: Consumer Price Index (CPI / TÜFE, 2003=100)
Step 3: Complete Python Data Extraction Script
import requests
import pandas as pd
API_KEY = "YOUR_EVDS_API_KEY"
SERIES = "TP.DK.USD.A.YTL"
START_DATE = "01-01-2024"
END_DATE = "01-11-2024"
url = (
f"https://evds2.tcmb.gov.tr/service/evds/"
f"series={SERIES}&startDate={START_DATE}&endDate={END_DATE}&type=json"
)
headers = {"key": API_KEY}
response = requests.get(url, headers=headers)
if response.status_code == 200:
data = response.json()
items = data.get("items", [])
df = pd.DataFrame(items)
# Clean and parse date
df["Tarih"] = pd.to_datetime(df["Tarih"], format="%d-%m-%Y")
df[SERIES] = pd.to_numeric(df[SERIES].str.replace(",", "."), errors="coerce")
df = df.dropna(subset=[SERIES])
print(df.tail())
else:
print(f"API Error HTTP {response.status_code}: {response.text}")





