Brazil Central Bank & Finance Calculators (x402)

v2.7.1
io.github.brunopompeo1/br-fin-calculators-x402 Checked 1 hour ago Published 6 days ago

BCB SGS inflation (IPCA/IGPM/SELIC/CDI), official PTAX FX & Price/SAC loans via x402 Base USDC.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

br_correct_monetary_value Brazil monetary correction (official BCB SGS indices)

Restates a BRL amount between two dates with the official Central Bank of Brazil SGS series (IPCA, IGPM, INPC, SELIC or CDI) and returns the corrected amount, accumulated percentage, compounding factor, SGS series id and month count. Use it for contract and rent readjustment, judicial arrears, inflation-adjusted pricing and receivable updates. Do not use it to convert between currencies (use br_convert_ptax_fx) or to build installment plans (use br_simulate_loan_amortization). Read-only and idempotent: it writes nothing and the same window plus index always returns the same figure, so a retry…

ParameterTypeDescription
amountBRL *numberNominal amount in BRL to restate, as a plain number (10000 means R$ 10.000,00). Must be greater than zero.
endDate *stringInclusive end of the correction window as YYYY-MM-DD. Must be on or after startDate; if it falls in a month BCB has not published, that month is skipped instead of failing.
index *stringOfficial BCB SGS series to apply. IPCA is headline consumer inflation and the default choice for judicial and general contract correction; IGPM is the market standard for commercial rent; INPC tracks…
startDate *stringInclusive start of the correction window as YYYY-MM-DD. The BCB series is monthly, so any day inside a month selects that whole month.
aiSummarybooleanWhen true (the default), appends aiExecutiveBrief, a one-sentence Portuguese summary generated at the edge. Set false to cut roughly 80 ms of latency and the extra tokens.
includeBreakdownbooleanWhen true, also returns monthlyBreakdown with each month's rate and running factor. Enlarges the payload but costs nothing extra and adds no latency.

br_convert_ptax_fx Brazil official PTAX currency conversion (BCB Olinda)

Converts an amount between BRL, USD, EUR and GBP at the official Central Bank of Brazil PTAX rate and returns the converted amount, the BRL equivalent and every PTAX bulletin used. Use it whenever a figure must stand up to Brazilian tax, accounting or audit scrutiny, including import and export invoices, transfer pricing and cross-border contracts. Do not use it for a tradable market or retail spread quote, nor for inflation restatement over time (use br_correct_monetary_value). Read-only and idempotent for a given date; omitting date returns the most recent published bulletin, so a later retr…

ParameterTypeDescription
amount *numberAmount to convert, expressed in the 'from' currency, as a plain number (1000 means 1.000,00).
from *stringSource currency. PTAX is always quoted against BRL, so a non-BRL pair such as USD to EUR is routed through BRL using both bulletins.
to *stringTarget currency. Must differ from 'from' for the conversion to be meaningful.
aiSummarybooleanWhen true (the default), appends aiExecutiveBrief, a one-sentence Portuguese summary. Set false to cut roughly 80 ms of latency.
datestringOptional reference date as YYYY-MM-DD. Omit it for the latest published bulletin. The lookup scans the 10 days up to this date, so a weekend or holiday resolves to the previous business day; a future…

br_simulate_loan_amortization Price and SAC loan amortization simulator

Simulates a Brazilian loan or financing under the Price (constant installment) and SAC (constant principal) systems and returns installment values, total paid, total interest and, on request, the full month-by-month table. Use it to compare financing offers, size an installment plan, or expose interest cost before a credit decision. Do not use it to restate a past amount by an inflation index (use br_correct_monetary_value) or to convert currency (use br_convert_ptax_fx). Deterministic, read-only and fully computed at the edge with no external data source, so identical input always returns ide…

ParameterTypeDescription
monthlyInterestRatePct *numberNominal monthly interest rate in percent, not a decimal fraction: 1.49 means 1,49% per month, roughly 19,4% per year. Pass 0 for an interest-free plan, in which case Price splits the principal evenly.
months *integerTerm in months. Values are floored and clamped to the 1..420 range (420 months is the 35-year ceiling of Brazilian mortgage practice).
principal *numberFinanced amount in BRL, as a plain number (50000 means R$ 50.000,00). Negative values are clamped to zero.
aiSummarybooleanWhen true (the default), appends aiExecutiveBrief, a one-sentence Portuguese summary. Set false to cut roughly 80 ms of latency.
includeSchedulebooleanWhen true, each requested system also returns its full schedule array. With BOTH and a long term this can mean hundreds of rows, so leave it false when only totals matter.
systemstringAmortization system to compute. PRICE keeps the installment constant and back-loads principal; SAC keeps principal constant so installments start higher and fall, with less total interest. BOTH (the d…