DEV Community

cendyandreoli
cendyandreoli

Posted on Edited on

Reading Brazil's credit card revolving rate from the central bank API (no key needed)

Brazil's central bank (Banco Central do Brasil) publishes the average revolving credit card rate for individuals as series 25477 in its SGS time-series service. The API is public, needs no key and returns JSON.

curl -s "https://api.bcb.gov.br/dados/serie/bcdata.sgs.25477/dados?formato=json&dataInicial=01/09/2025&dataFinal=30/09/2026"
Enter fullscreen mode Exit fullscreen mode

Each row looks like {"data":"01/09/2026","valor":"15.29"}. The value is the monthly rate in percent, as a string, and the date is always day 01 of the month.

What I got

  • September 2026: 15.29% per month.
  • September 2025: 15.23% per month.
  • The monthly rate stayed between 14.90% (Jan 2026) and 15.44% (May 2025) over the last 24 months.

Turning monthly into yearly

The API gives monthly only. The yearly rate is (1 + m)^12 - 1:

m = 0.1529
print(round(((1 + m) ** 12 - 1) * 100, 2))  # 451.44
Enter fullscreen mode Exit fullscreen mode

R$ 1,000 left untouched for 12 months at that rate becomes about R$ 5,514 (1000 * 1.1529 ** 12). In Brazil, Law 14.690/2023 caps interest and fees at 100% of the original debt, so the real ceiling is double.

Gotchas

  • valor is a string with a dot, not a comma.
  • Date params use dd/mm/aaaa, not ISO.
  • The series is the average reported by institutions, not the rate on your card.

I put the full 24-month table and the method on a page (in Portuguese), with sentences ready to cite: https://tobbofin.com/calculadoras/juros-do-cartao-banco-central/. I work on Tobbo, a personal finance app for Android that connects to Brazilian banks through Open Finance. The page is ours.

Source: Banco Central do Brasil, SGS series 25477, checked on 2026-11-09.

Top comments (1)

Collapse
 
eqvero profile image
Eqvero •

One operational quirk we ran into with Bacen's SGS endpoints: series revisions happen without notice. When the central bank updates preliminary monthly banking aggregates, they quietly overwrite the valor string for earlier dates without bumping an ETag or timestamp. If your pipeline uses INSERT IGNORE or caches by month, you end up permanently storing preliminary figures. We had to switch our ingestion to an explicit upsert keyed on (serie_id, data) so monthly backfills stay current.

Another detail to watch in production is SGS gateway behavior during monthly updates. If you query wide date windows, the endpoint frequently hangs with a 504 Gateway Timeout instead of failing fast. Batching the dataInicial/dataFinal window into rolling 12-month blocks with exponential backoff makes the polling rock solid.

For CET reconciliation against Open Finance data, card statements in Brazil compute the effective annual rate using 252 business days rather than a straight (1 + m)^12 calendar compounding, which can cause a small basis-point mismatch between the SGS series and the actual statement line.