Banco Central do Brasil: Technical Reference
Technical reference
This page is the interface specification for the Banco Central do Brasil integration: components, flow, bulletin layout and configuration. It is written for the team implementing the exchange.
For what this integration does and how it is configured, see Banco Central do Brasil.
Components
| Name | Type | Version | Stage | Role |
|---|---|---|---|---|
| BancoCentralBrazil-ExchangeRates | Automation | 4 | Active | Daily at 20:00 UTC: downloads the BCB closing bulletin and updates the buy and sell rate of each matching currency |
The automation has one sub-workflow, UpdateCurrencyRateSW, run once for each matched currency.
Source: BancoCentralBrazil-ExchangeRates - (Automation v4).json.
How It Works
RateDatereads the optionaldatefrom the request body (#HttpRequest), removes dashes and uses it when it has 8 characters. Otherwise it uses the current UTC date formatted asyyyyMMdd.GetBcbRatesdownloads the bulletin of that date from the BCB, a CSV file named after the date (yyyyMMdd). It is an external call with no authentication.BcbBulletinAvailablebranches on the HTTP status.200continues.404goes toExitNoBulletin, which returns200and leaves the rates unchanged. Any other status goes toExitBcbUnavailable, which returns502.ParseBcbRates(CsvMap) reads the file with;as delimiter and no header row.GetCurrenciescallsGET /api/v3/currencies.BuildUpdates(ApplyTemplate) goes through the currencies, skips the default one, resolves the ISO code fromIsoCodeor fromExternalId, and looks for a bulletin row with the same code. Decimal commas become dots. The result is a JSON array of{ id, isoCode, buy, sell }.UpdateCurrenciesloops over that array and runsUpdateCurrencyRateSWfor each item. It callsPATCH /api/v3/currencies/{id}with{"buy":{"value":…},"sell":{"value":…}}.
Bulletin Layout
The CSV file has no header row and uses ; as field separator. The automation reads these columns:
| Column | Content | Used for |
|---|---|---|
Field4 | Currency symbol (ISO code) | Matching against the ISO code of the currency |
Field5 | Buy rate (taxa de compra), in BRL | Buy rate of the currency |
Field6 | Sell rate (taxa de venda), in BRL | Sell rate of the currency |
The other columns (date, BCB currency code, type and the two parities) are not used.
External System Contact Points
- BCB: the public closing-bulletin download, one CSV per date. The dataset is published as open data under the name Taxas de câmbio - todos os boletins diários.
- Skills Workflow API:
GET /api/v3/currenciesandPATCH /api/v3/currencies/{id}.
Configuration
- Schedule:
Daily, every 1 day, at 20:00 UTC. - Request body, for manual runs only: optional
date, asyyyyMMddoryyyy-MM-dd. - No configuration keys, system parameters, named queries or webhooks are used.
- When importing the automation into an environment, set the
tenantIdof the definition to the tenant of that environment, and give the scheduler auserIdthat is valid in that tenant.