TAXAS

Taxas e índices oficiais

Selic, CDI, IPCA e IGP-M — valor mais recente ou série histórica, direto do Banco Central.

Official rates and indices

Selic, CDI, IPCA and IGP-M — latest value or historical series, straight from the Central Bank.

SYNC resposta na mesma chamada answers in the same call

Endpoints

Endpoints

GET /api/v1/taxas valor mais recente de todos os indicadores conhecidos latest value of every known indicator
GET /api/v1/taxas/{nome} valor mais recente de um indicador an indicator's latest value
GET /api/v1/taxas/{nome}/serie série histórica num intervalo historical series over a date range

Parâmetros

Parameters

NomeNameOndeInDescriçãoDescription
nome path um de selic, cdi, ipca, igpm one of selic, cdi, ipca, igpm
inicio, fim query /serie: obrigatórios, formato YYYY-MM-DD /serie: required, YYYY-MM-DD format

Exemplo

Example

curl https://api.alicercelabs.com.br/api/v1/taxas/selic \
          -H "Authorization: Bearer <token>"
{
          "success": true,
          "data": { "nome": "selic", "valor": 14.25, "data": "2026-08-26" },
          "meta": { "elapsed_ms": 0, "request_id": "..." }
        }

Erros possíveis

Possible errors

StatusMotivoReason
400/serie: inicio/fim ausentes, mal formatados, ou fim anterior a inicio/serie: inicio/fim missing, malformed, or fim before inicio
401token ausente ou inválidomissing or invalid token
404nome não é um dos indicadores conhecidosnome isn't one of the known indicators
429limite de taxa excedidorate limit exceeded

Uma API, duas categorias da BrasilAPI

One API, two BrasilAPI categories

Fonte: Sistema Gerenciador de Séries Temporais do Banco Central (SGS), API pública sem chave — cada indicador é uma série numerada (Selic=11, CDI=12, IPCA=433, IGP-M=189). "Taxas" e "índices" da BrasilAPI são a mesma fonte, só séries diferentes do mesmo mecanismo — por isso viraram uma API só aqui, em vez de duplicar cliente HTTP e cache pra buscar exatamente a mesma coisa duas vezes. Fallback BrasilAPI no valor mais recente se o SGS falhar (a série histórica não tem fallback — a BrasilAPI não expõe range por data nesse endpoint).

Source: the Central Bank's Time Series Management System (SGS), a public API with no key — each indicator is a numbered series (Selic=11, CDI=12, IPCA=433, IGP-M=189). BrasilAPI's "taxas" and "índices" are the same source, just different series of the same mechanism — that's why they became one API here, instead of duplicating an HTTP client and cache to fetch the exact same thing twice. Fallback to BrasilAPI on the latest value if SGS fails (the historical series has no fallback — BrasilAPI doesn't expose a date range on that endpoint).

Usando o SDK

Using the SDK

SDKs oficiais: Go · Python · JavaScript.

Official SDKs: Go · Python · JavaScript.

Valor mais recente

Latest value

import (
	"context"
	"fmt"

	alicercelabs "github.com/alicercelabs/alicercesdk-go"
)

client := alicercelabs.New("alk_...") // ou um token JWT de login/register
ctx := context.Background()

taxa, err := client.Taxas.Get(ctx, "selic")
if err != nil {
	panic(err)
}
fmt.Println(taxa.Valor)
from alicercelabs import AlicerceLabs

client = AlicerceLabs(api_key="alk_...")  # ou um token JWT de login/register

taxa = client.taxas.get("selic")
print(taxa["valor"])
import { AlicerceLabs } from "alicercesdk-javascript";

const client = new AlicerceLabs("alk_..."); // ou um token JWT de login/register

const taxa = await client.taxas.get("selic");
console.log(taxa.valor);

Série histórica

Historical series

serie, err := client.Taxas.Serie(ctx, "igpm", "2026-01-01", "2026-06-01")
fmt.Println(len(serie), "pontos")
serie = client.taxas.serie("igpm", "2026-01-01", "2026-06-01")
print(len(serie), "pontos")
const serie = await client.taxas.serie("igpm", "2026-01-01", "2026-06-01");
console.log(serie.length, "pontos");

Limites

Limits

100/dia · 4/hora sem token, por IP chamador; com token (JWT de login ou API key gerada no painel), 1.000/dia · 41/hora.

100/day · 4/hour without a token, per calling IP; with one (a login JWT or an API key generated in the panel), 1,000/day · 41/hour.