BCRA API Connector
A Python connector for the BCRA (Banco Central de la República Argentina) APIs, covering Principal Variables/Monetary Statistics, Cheques, Exchange Rate Statistics, and Central de Deudores (Debtor Registry).
Features
- Comprehensive Data Access: Fetch Principal Variables, Monetary Statistics, Checks information, Exchange Rates, and Debtor Registry data.
- Central de Deudores: Query current and historical debts and rejected checks by CUIT/CUIL. Current debts carry what explains each classification: normal since, days in arrears, refinancings and legal situation (concurso, quiebra).
- DataFrame Support: Convert API responses to pandas DataFrames with
to_dataframe()methods. - Historical Data: Easily retrieve and analyze historical time series for any variable.
- Robustness: Built-in retries with exponential backoff that honour
Retry-Afteron 429/503, a client-side rate limiter, and typed exceptions (BCRANotFoundError,BCRARateLimitError,BCRAServerError). - Privacy: CUIT/CUIL numbers are masked (
30********2) in the connector's logs and in the messages of the exceptions it raises, so they are safe to log or send to an error tracker. - Developer Friendly:
- Full Type Hinting for better IDE support.
- Bilingual context (Spanish API / English Wrapper).
- Detailed debug logging.
- Configurable: Options for SSL verification (or a CA bundle), retries, rate limiting, timeouts and a custom
requests.Session.
Documentation
Full documentation, including installation instructions, usage examples, and API reference, is available at:
Installation
pip install bcra-connector
# With pandas support for DataFrame conversion
pip install "bcra-connector[pandas]"
For detailed installation instructions and requirements, see our Installation Guide.
Quick Start
Get up and running in seconds:
from bcra_connector import BCRAConnector
connector = BCRAConnector()
# 1. Catalog of monetary series, with each one's latest value
variables = connector.monetarias.list()
print(f"Found {len(variables)} series")
# 2. Latest value of a series, by ID (1 = Reservas internacionales)
latest = connector.monetarias.latest(1)
print(f"Reserves: {latest.valor} on {latest.fecha}")
# 3. Last 30 days of a series, by name (newest first, as the API returns it)
history = connector.monetarias.history("Reservas internacionales", days=30)
for point in history[:5]:
print(point.fecha, point.valor)
# 4. Official exchange rate: pesos per dollar
usd_ars = connector.cambiarias.pair("USD", "ARS", days=7)
print(f"USD/ARS on {usd_ars[-1]['fecha']}: {usd_ars[-1]['tasa']}")
Rate Limits
The BCRA doesn't publish rate limits, but it does enforce them: the Central de Deudores has
answered 429 Too Many Requests at about 5 requests per second. The connector throttles
itself to 2 requests per second by default, a conservative guess rather than an official
limit, and on a 429 or 503 waits what the server's Retry-After asks (up to 30 seconds).
RateLimitConfig(calls, period) is a sustained rate: once the first calls requests have
gone out back to back, the rest are spaced period / calls seconds apart. With the default,
a long loop sends one request every half second.
The limiter lives in each connector instance: several processes or workers don't coordinate
with each other, so if they share the API, splitting the budget is up to your application.
See Configuration to
change the limit (rate_limit=) or the cap (max_retry_after=).
Contributing
Contributions are welcome! Please read our:
Security
For vulnerability reports, please review our Security Policy.
Change Log
See CHANGELOG.md for a list of changes and version updates.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Disclaimer
This project is not officially affiliated with or endorsed by the Banco Central de la República Argentina. Use at your own risk.
Metadata
Release files for bcra-connector 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| bcra_connector-1.2.0.tar.gz | 128.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bcra_connector-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 173.7 kB
Release files / bcra_connector-1.2.0.tar.gz
| Download URL | bcra_connector-1.2.0.tar.gz |
|---|---|
| Size | 128.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
505ac31a7d388ba9acfe94cec323a5628aa63852eeeba890444c2a1ef4b8ba5f
|
|
BLAKE2b-256 checksum How to use checksums |
8096e4532d60de1d68575196e10358a3844051fab0dd1f7332f436a016801f09
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.
Transparency logRelease files / bcra_connector-1.2.0-py3-none-any.whl
| Download URL | bcra_connector-1.2.0-py3-none-any.whl |
|---|---|
| Size | 44.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
034d54af08e015ad3658d0ae56f543d76765677ee331477d8e16dc8579df24d4
|
|
BLAKE2b-256 checksum How to use checksums |
7d8d4700d10021b95f5739e1df520213ddeac0a7aa1e4565988688361d3ee241
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.
Transparency log