# Banco Central do Brasil

> Read the Banco Central do Brasil's official data: any of its thousands of economic time series (the Selic rate, IPCA inflation, exchange rates, credit and activity indicators) and the official PTAX exchange rates for a period. No account or API key required.

App · 4 actions. Web page: https://docs.lodol.com/docs/integrations/banco-central-do-brasil

## Actions

### Get latest series values

Get the most recent values of a Banco Central do Brasil time series (SGS), up to 20, oldest first, plus the latest value on its own. Handy for 'what is the Selic rate now?'. No API key required.

**Inputs**

- Series (`series`, text, required): The SGS series code: 432 is the Selic target rate, 433 monthly IPCA inflation, 1 the US dollar, 189 the IGP-M. Find other codes at https://www3.bcb.gov.br/sgspub/.
- Number of values (`count`, number): How many of the latest values to get, from 1 to 20. From 1 to 20. Default: `10`.

**Outputs**

- `count` (number): How many values came back. 0 when the period has none.
- `first_date` (text): The date of the oldest value, as YYYY-MM-DD.
- `latest_date` (text): The date of the most recent value, as YYYY-MM-DD.
- `latest_value` (number): The most recent value. Empty when no values came back.
- `series_code` (number): The SGS series code that was read, e.g. 432.
- `series_name` (text): What the series measures and its unit, for well-known series (e.g. 'Selic target rate set by Copom (% per year)'). Empty for other codes.
- `values` (list): The values, oldest first.

**Example output**

```json
{
  "count": 3,
  "first_date": "2026-07-01",
  "latest_date": "2026-09-01",
  "latest_value": 0.82,
  "series_code": 433,
  "series_name": "IPCA consumer price inflation (% change in the month)",
  "values": [
    {
      "date": "2026-07-01",
      "end_date": null,
      "value": 0.07
    },
    {
      "date": "2026-08-01",
      "end_date": null,
      "value": -0.32
    },
    {
      "date": "2026-09-01",
      "end_date": null,
      "value": 0.82
    }
  ]
}
```

### Get PTAX exchange rates

Get the official PTAX exchange rates of a currency in reais for each business day of a period (up to a year): the closing rate by default, or every bulletin of the day. The PTAX closing rate is the reference used in Brazilian contracts and invoices. No API key required.

**Inputs**

- Start date (`start_date`, date, required): The first day to include.
- End date (`end_date`, date): The last day to include. Leave empty for just the start date.
- Currency (`currency`, text): The currency to get rates for. US dollar by default. One of: `USD` (US dollar (USD)), `EUR` (Euro (EUR)), `GBP` (Pound sterling (GBP)), `JPY` (Japanese yen (JPY)), `CHF` (Swiss franc (CHF)), `CAD` (Canadian dollar (CAD)), `AUD` (Australian dollar (AUD)), `DKK` (Danish krone (DKK)), `NOK` (Norwegian krone (NOK)), `SEK` (Swedish krona (SEK)). Default: `USD`.
- Bulletins (`bulletins`, text): The closing rate only (one a day), or the opening and intermediate bulletins too. One of: `closing` (Closing rate only), `all` (Every bulletin). Default: `closing`.

**Outputs**

- `count` (number): How many bulletins came back.
- `currency` (text): The currency's three-letter code, e.g. 'USD'.
- `end_date` (text): The last day asked for, as YYYY-MM-DD.
- `latest_buy_rate` (number): The most recent closing buying rate, in reais.
- `latest_date` (text): The day of the most recent closing rate, as YYYY-MM-DD.
- `latest_sell_rate` (number): The most recent closing selling rate, in reais.
- `rates` (list): The bulletins, oldest first. Weekends and Brazilian holidays have none.
- `start_date` (text): The first day asked for, as YYYY-MM-DD.

**Example output**

```json
{
  "count": 2,
  "currency": "EUR",
  "end_date": "2026-10-16",
  "latest_buy_rate": 5.7076,
  "latest_date": "2026-10-16",
  "latest_sell_rate": 5.7088,
  "rates": [
    {
      "bulletin": "closing",
      "buy_parity": 1.1203,
      "buy_rate": 5.6592,
      "date": "2026-10-15",
      "sell_parity": 1.1205,
      "sell_rate": 5.6609,
      "time": "13:05:33"
    },
    {
      "bulletin": "closing",
      "buy_parity": 1.1231,
      "buy_rate": 5.7076,
      "date": "2026-10-16",
      "sell_parity": 1.1232,
      "sell_rate": 5.7088,
      "time": "13:04:14"
    }
  ],
  "start_date": "2026-10-15"
}
```

### Get series values

Get the values of any Banco Central do Brasil time series (SGS) between two dates, oldest first: the Selic rate, IPCA inflation, exchange rates, credit and activity indicators. Up to 10 years of a daily series at a time. No API key required.

**Inputs**

- Series (`series`, text, required): The SGS series code: 432 is the Selic target rate, 433 monthly IPCA inflation, 1 the US dollar, 189 the IGP-M. Find other codes at https://www3.bcb.gov.br/sgspub/.
- Start date (`start_date`, date, required): The first day to include.
- End date (`end_date`, date): The last day to include. Leave empty for today.

**Outputs**

- `count` (number): How many values came back. 0 when the period has none.
- `first_date` (text): The date of the oldest value, as YYYY-MM-DD.
- `latest_date` (text): The date of the most recent value, as YYYY-MM-DD.
- `latest_value` (number): The most recent value. Empty when no values came back.
- `series_code` (number): The SGS series code that was read, e.g. 432.
- `series_name` (text): What the series measures and its unit, for well-known series (e.g. 'Selic target rate set by Copom (% per year)'). Empty for other codes.
- `values` (list): The values, oldest first.

**Example output**

```json
{
  "count": 3,
  "first_date": "2026-09-01",
  "latest_date": "2026-09-03",
  "latest_value": 14.0,
  "series_code": 432,
  "series_name": "Selic target rate set by Copom (% per year)",
  "values": [
    {
      "date": "2026-09-01",
      "end_date": null,
      "value": 14.0
    },
    {
      "date": "2026-09-02",
      "end_date": null,
      "value": 14.0
    },
    {
      "date": "2026-09-03",
      "end_date": null,
      "value": 14.0
    }
  ]
}
```

### List PTAX currencies

List the currencies the Banco Central do Brasil publishes official PTAX exchange rates for, with how each one's parity with the dollar is quoted. No API key required.

**Inputs**: None.

**Outputs**

- `count` (number): How many currencies there are.
- `currencies` (list): The currencies, by code.

**Example output**

```json
{
  "count": 2,
  "currencies": [
    {
      "code": "EUR",
      "name": "Euro",
      "parity_quoted_as": "US dollars per unit of the currency",
      "parity_type": "B"
    },
    {
      "code": "USD",
      "name": "D\u00f3lar dos Estados Unidos",
      "parity_quoted_as": "units of the currency per US dollar",
      "parity_type": "A"
    }
  ]
}
```
