You need the Brazilian SELIC policy rate inside your software, reliably and with minimal friction. By the end of this guide, you will query the SELIC rate over a clean REST API, parse its latest and historical values, compute ranges and candlesticks, and fold it into spread calculations and loan math without guesswork.
What the SELIC (SELIC) Rate Represents
SELIC is Brazil’s central bank target rate that anchors short-term interest rates in BRL. In the Interest Rates API, the SELIC symbol identifies the headline target rate as a percentage per annum. SELIC is modeled as monthly in the symbol catalogue; you should treat the effective date as the day the rate is in force for a given month or the last available day for that month when pulling “historical” by an in-month date.
The JSON payloads return plain numeric percentage values (e.g., 13.75) and an explicit date for each symbol in the dates map. Always interpret the number as percent (not decimal fraction). For example, a value of 13.75 means 13.75% per annum.
Base URL, Authentication, and Method
- Base URL: https://interestratesapi.com/api/v1/
- Method: GET for all endpoints
- Authentication: api_key query parameter
All requests are read-only GET requests and must append ?api_key=YOUR_API_KEY (or pass it as a query parameter when using a client library). Explore the API product and docs at interestratesapi.com and the method catalog at MCP.
Quick Start: Get the Latest SELIC
Use the Latest endpoint to fetch the most recent published SELIC value. The following cURL and JSON response are the official sample. The value is expressed in BRL terms and the number itself is a percent per annum figure.
curl -s "https://interestratesapi.com/api/v1/latest?api_key=YOUR_API_KEY&symbols=SELIC"
{
"success": true,
"date": "2026-09-30",
"base": "BRL",
"rates": {
"SELIC": 13.75
},
"dates": {
"SELIC": "2026-09-30"
},
"currencies": {
"SELIC": "BRL"
},
"base_filter_note": null
}
How to read this:
rates.SELIC: the SELIC rate as a percent per annum.dates.SELIC: the effective date for the value returned.currencies.SELIC: BRL, the currency associated with the rate context.date: the API’s unified as-of date for the response.
Latest in Python (requests)
import requests
resp = requests.get(
'https://interestratesapi.com/api/v1/latest',
params={'symbols': 'SELIC', 'api_key': 'YOUR_API_KEY'}
)
data = resp.json()
selic = data['rates']['SELIC']
selic_date = data['dates']['SELIC']
currency = data['currencies']['SELIC']
print(f"SELIC: {selic}% on {selic_date} ({currency})")
Latest in JavaScript (fetch)
const response = await fetch(
'https://interestratesapi.com/api/v1/latest?symbols=SELIC&api_key=YOUR_API_KEY'
);
const data = await response.json();
const selic = data.rates.SELIC;
const date = data.dates.SELIC;
const currency = data.currencies.SELIC;
console.log(`SELIC: ${selic}% on ${date} (${currency})`);
Latest in PHP
<?php
$url = 'https://interestratesapi.com/api/v1/latest?symbols=SELIC&api_key=YOUR_API_KEY';
$json = file_get_contents($url);
$data = json_decode($json, true);
$selic = $data['rates']['SELIC'];
$date = $data['dates']['SELIC'];
$ccy = $data['currencies']['SELIC'];
echo "SELIC: {$selic}% on {$date} ({$ccy})";
?>
Tip: Cache this response for the remainder of the business day to reduce calls. The SELIC symbol is monthly; you typically won’t see intraday changes. Your app can refresh once per day or when your internal data pipeline rolls over.
Discover the Symbol in the Catalogue
Use the Symbols endpoint to confirm SELIC is available and to inspect its attributes (like frequency and category). You can filter by category central_bank or by currency. The rate is listed under symbol SELIC and category central_bank.
Symbols: cURL
Response format (example structure; values are illustrative as provided in the API reference):
Symbols: Python
import requests
resp = requests.get(
'https://interestratesapi.com/api/v1/symbols',
params={'category': 'central_bank', 'api_key': 'YOUR_API_KEY'}
)
symbols = resp.json()['symbols']
selic_meta = next((s for s in symbols if s['symbol'] == 'SELIC'), None)
print(selic_meta)
Symbols: JavaScript
const res = await fetch(
'https://interestratesapi.com/api/v1/symbols?category=central_bank&api_key=YOUR_API_KEY'
);
const payload = await res.json();
const selic = payload.symbols.find(s => s.symbol === 'SELIC');
console.log(selic);
Symbols: PHP
<?php
$q = 'https://interestratesapi.com/api/v1/symbols?category=central_bank&api_key=YOUR_API_KEY';
$data = json_decode(file_get_contents($q), true);
$selic = null;
foreach ($data['symbols'] as $s) {
if ($s['symbol'] === 'SELIC') { $selic = $s; break; }
}
var_dump($selic);
?>
Get SELIC on a Specific Date
When you need the SELIC value for a particular point-in-time, use the Historical endpoint. For monthly symbols, the API uses the last day with data within the target month if you pass any date inside that month.
Historical: cURL
JSON example (values are illustrative as provided in the API reference):
Historical: Python
import requests
params = {'date': '2025-06-15', 'symbols': 'SELIC', 'api_key': 'YOUR_API_KEY'}
r = requests.get('https://interestratesapi.com/api/v1/historical', params=params)
data = r.json()
value = data['rates']['SELIC']
print(value)
Historical: JavaScript
const url = new URL('https://interestratesapi.com/api/v1/historical');
url.searchParams.set('date', '2025-06-15');
url.searchParams.set('symbols', 'SELIC');
url.searchParams.set('api_key', 'YOUR_API_KEY');
const r = await fetch(url.toString());
const d = await r.json();
console.log(d.rates.SELIC);
Historical: PHP
<?php
$u = 'https://interestratesapi.com/api/v1/historical?date=2025-06-15&symbols=SELIC&api_key=YOUR_API_KEY';
$d = json_decode(file_get_contents($u), true);
echo $d['rates']['SELIC'];
?>
Build a SELIC Time Series
For charting, regressions, or backtesting rule logic, request a date-bounded series. Even though SELIC is monthly in the catalogue, the API’s sample shows daily keys in the returned map and a frequency field to help you understand the granularity.
Time Series: cURL
JSON example (values are illustrative as provided in the API reference):
Time Series: Python
import requests
params = {
'start': '2025-10-31', 'end': '2026-10-31',
'symbols': 'SELIC',
'api_key': 'YOUR_API_KEY'
}
r = requests.get('https://interestratesapi.com/api/v1/timeseries', params=params)
ts = r.json()
series = ts['rates']['SELIC'] # dict of date -> value
print(list(series.items())[:5])
Time Series: JavaScript
const res = await fetch(
'https://interestratesapi.com/api/v1/timeseries?start=2025-10-31&end=2026-10-31&symbols=SELIC&api_key=YOUR_API_KEY'
);
const payload = await res.json();
const series = payload.rates.SELIC;
console.log(Object.entries(series).slice(0, 5));
Time Series: PHP
<?php
$url = 'https://interestratesapi.com/api/v1/timeseries?start=2025-10-31&end=2026-10-31&symbols=SELIC&api_key=YOUR_API_KEY';
$data = json_decode(file_get_contents($url), true);
$series = $data['rates']['SELIC'];
print_r(array_slice($series, 0, 5, true));
?>
Measure SELIC Changes Over a Range
Quantify the level change, percentage change, and extrema with the Fluctuation endpoint. This is useful for dashboards, alerts, and risk attribution.
Fluctuation: cURL
JSON example (values are illustrative as provided in the API reference):
Fluctuation: Python
import requests
p = {'start': '2025-10-31', 'end': '2026-10-31', 'symbols': 'SELIC', 'api_key': 'YOUR_API_KEY'}
d = requests.get('https://interestratesapi.com/api/v1/fluctuation', params=p).json()
fl = d['rates']['SELIC']
print(fl['change'], fl['change_pct'], fl['high'], fl['low'])
Fluctuation: JavaScript
const url = 'https://interestratesapi.com/api/v1/fluctuation?start=2025-10-31&end=2026-10-31&symbols=SELIC&api_key=YOUR_API_KEY';
const data = await (await fetch(url)).json();
const f = data.rates.SELIC;
console.log(f.change, f.change_pct, f.high, f.low);
Fluctuation: PHP
<?php
$u = 'https://interestratesapi.com/api/v1/fluctuation?start=2025-10-31&end=2026-10-31&symbols=SELIC&api_key=YOUR_API_KEY';
$f = json_decode(file_get_contents($u), true)['rates']['SELIC'];
echo "{$f['change']} ({$f['change_pct']}%), high={$f['high']}, low={$f['low']}";
?>
Compute OHLC Candles for SELIC
For charting or analytics that expect candlestick inputs, use OHLC. The endpoint computes candles on-the-fly from daily data for the requested period aggregation.
OHLC: cURL
JSON example (values are illustrative as provided in the API reference):
OHLC: Python
import requests
params = {
'symbols': 'SELIC', 'period': 'monthly',
'start': '2025-10-31', 'end': '2026-10-31',
'api_key': 'YOUR_API_KEY'
}
d = requests.get('https://interestratesapi.com/api/v1/ohlc', params=params).json()
candles = d['rates']['SELIC']
for c in candles:
print(c['period'], c['open'], c['high'], c['low'], c['close'], c['data_points'])
OHLC: JavaScript
const o = await fetch(
'https://interestratesapi.com/api/v1/ohlc?symbols=SELIC&period=monthly&start=2025-10-31&end=2026-10-31&api_key=YOUR_API_KEY'
).then(r => r.json());
console.log(o.rates.SELIC);
OHLC: PHP
<?php
$u = 'https://interestratesapi.com/api/v1/ohlc?symbols=SELIC&period=monthly&start=2025-10-31&end=2026-10-31&api_key=YOUR_API_KEY';
$d = json_decode(file_get_contents($u), true);
print_r($d['rates']['SELIC']);
?>
Compare Interest Costs Using SELIC
If you need a quick comparison of simple-loan interest costs at the latest rate of two symbols, use the Convert endpoint. It returns total interest and total payment for a notional amount and term, plus the spread between the two rates. This is helpful for client-facing tools or internal benchmarking.
Convert: cURL
JSON example (values are illustrative as provided in the API reference):
Convert: Python
import requests
params = {
'from': 'SELIC',
'to': 'ECB_MRO',
'amount': 100000,
'term_months': 12,
'api_key': 'YOUR_API_KEY'
}
d = requests.get('https://interestratesapi.com/api/v1/convert', params=params).json()
print(d['difference']['rate_spread'], d['difference']['interest_saved'])
Convert: JavaScript
const url = 'https://interestratesapi.com/api/v1/convert?from=SELIC&to=ECB_MRO&amount=100000&term_months=12&api_key=YOUR_API_KEY';
const out = await (await fetch(url)).json();
console.log(out.difference.rate_spread, out.difference.interest_saved);
Convert: PHP
<?php
$u = 'https://interestratesapi.com/api/v1/convert?from=SELIC&to=ECB_MRO&amount=100000&term_months=12&api_key=YOUR_API_KEY';
$d = json_decode(file_get_contents($u), true);
echo $d['difference']['rate_spread'] . ' ' . $d['difference']['interest_saved'];
?>
Operational Details That Save Time
- Frequency and effective dates: SELIC is monthly in the symbol catalogue. When you query /historical with a date inside a month, the API returns the last available day in that month with data for that symbol. In /latest, use the
datesmap to read the specific effective date. - Business days and weekends: Central bank target rates do not change every business day. Cache the /latest response for the day (or until your pipeline signals a rate decision or month rollover). For time series used in daily dashboards, a rate can carry forward across multiple days if unchanged.
- Units: JSON numbers are percentages per annum. Do not divide by 100 unless your math library expects a decimal rate (e.g., 13.75% becomes 0.1375).
- Caching: Cache results at the endpoint+query level. For example, you can cache
/latest?symbols=SELICfor 6–24 hours depending on your SLA. For historical/time series with fixed date bounds, you can cache indefinitely. - Error handling: On quota exhaustion, honor the Retry-After and read X-RateLimit-* headers. On 404 with details, surface the available ranges to users. On 422, re-validate your date format (Y-m-d) and symbol.
Computing Spreads, Monthly Payments, and Carry
Spreads: To compute the spread between the latest SELIC and another benchmark (e.g., ECB_MRO), pull both via /latest and subtract: spread_pct = selic_pct - other_pct. If your app requires basis points, multiply by 100: spread_bp = spread_pct * 100.
Simple monthly interest cost: If your product models simple interest (as in the Convert endpoint), total interest over N months is total_interest = principal * (annual_rate_pct / 100) * (N / 12). Monthly interest-only payment would be interest_only_monthly = principal * (annual_rate_pct / 100) / 12. If you use amortizing formulas, convert the annual rate to a monthly rate: r_m = (annual_rate_pct / 100) / 12 and apply the standard annuity formula for EMI. Do not assume compounding unless your product explicitly uses it.
Exposure and carry: For treasury analytics, you can multiply the annualized percentage by your BRL notional to estimate annual carry. When you need more granular PnL attribution, pair /timeseries with /fluctuation to isolate level changes across reporting windows.
Interpreting Key Response Fields
rates: A symbol-to-number map with percent-per-annum values, e.g.,"SELIC": 13.75.dates: The effective date per symbol. Use this as your authoritative timestamp for the rate value.currencies: The currency code in the rate context (SELIC reports with BRL in /latest official sample).frequencies(time series): The server-computed frequency for each symbol, useful for resampling logic.changeandchange_pct(fluctuation): Absolute and percentage change betweenstart_valueandend_value. Null whenstart_valueis zero.open/high/low/closeanddata_points(ohlc): Aggregated candle values and the number of daily observations used for that period.
Common Pitfalls to Avoid
- Using headers for auth: This API authenticates strictly via query parameter
api_key, not headers. - Using POST: All endpoints are GET only.
- Assuming intraday variability: SELIC is monthly; plan refresh at a daily or monthly cadence.
- Dropping the effective date: Persist the date from
dates.SELICto ensure consistent point-in-time analysis. - Unit confusion: The numeric values are percentages, not decimals.
End-to-End Example: Build a Minimal SELIC Dashboard
To assemble an internal dashboard:
- Fetch /latest for SELIC at startup and cache the response for the session. Display the percent and effective date.
- Request a 2–3 year /timeseries to populate a line chart. Use the
frequenciesfield to align x-axis ticks. - Use /fluctuation for YTD and 1Y change widgets, including
change,change_pct, andhigh/low. - Offer a /convert comparison against a peer policy rate (e.g., ECB_MRO) for client education or treasury what-if analysis.
- For candlestick visualizations, call /ohlc with
period=monthly.
If you need to expand beyond SELIC later, discover more central bank and interbank symbols via /symbols. See the method catalog at interestratesapi.com.
FAQ
What does the SELIC number represent in the payload?
It is the SELIC target rate in percent per annum. For example, a value of 13.75 means 13.75% p.a. The dates.SELIC field indicates the specific effective date for that value.
How often does SELIC update?
SELIC is monthly in the symbol catalogue. You won’t typically see day-to-day changes. Refresh daily or around known policy decision windows, and always read the effective date in the response.
How should I cache SELIC responses?
Cache /latest for the business day or until your job cycle detects a new month or policy event. Historical, timeseries, fluctuation, and OHLC outputs with fixed dates can be cached indefinitely.
How do I compute a spread from SELIC to another rate?
Call /latest for both symbols and compute spread_pct = selic_pct - other_pct. Convert to bp via spread_bp = spread_pct * 100. If you need simple interest cost comparisons, use /convert.
What errors should I handle?
Expect 401 for missing/invalid keys, 403 for inactive accounts, 404 when data is unavailable for the date/range, 422 for validation errors (e.g., invalid date format), and 429 for rate limits. Read Retry-After and X-RateLimit-* headers on 429.
Get Your Key and Ship
Register to obtain your API key and start building with the SELIC rate today. Use the method catalog at MCP for endpoint details, and sign up here: Register. Learn more about the platform at interestratesapi.com and get your integration into production with a minimal surface area.