Skip to main content

BCRA API Connector

PyPI version Python Versions Documentation Status Coverage License: MIT Tests Contributor Covenant

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 debtor information, historical debts, and rejected checks by CUIT/CUIL.
  • 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-After on 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).

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.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bcra-connector 1.0.1
File Size Uploaded
bcra_connector-1.0.1.tar.gz 125.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bcra-connector 1.0.1
File Interpreter ABI Platform
bcra_connector-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 169.4 kB

Release files / bcra_connector-1.0.1.tar.gz

Download URL bcra_connector-1.0.1.tar.gz
Size 125.5 kB
Tags Source
SHA-256 checksum
How to use checksums
86879b1f6bb3a4faceb86958e0b5473985cc17e8b096e8c77c888dd6580fbf15
BLAKE2b-256 checksum
How to use checksums
7bef225f1b3051ac945d7bdb410927c3abb182c1a9a4556b573a55d49f644fa3
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 27, 2026.

Transparency log

Release files / bcra_connector-1.0.1-py3-none-any.whl

Download URL bcra_connector-1.0.1-py3-none-any.whl
Size 43.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6242bfec3695d6f2677b1f118ed4179bea4347976fcc2a4cb434e2f00cade79d
BLAKE2b-256 checksum
How to use checksums
22f8fa3894d04eaff69c4b3790d33657f57da7bd6770eefc1a632306ad7c42f6
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 27, 2026.

Transparency log

Release history Release notifications | RSS feed

1.2.0

2 release files

1.1.0

2 release files

This release

1.0.1 This release

2 release files

1.0.0

2 release files

0.13.0

2 release files

0.12.0

2 release files

0.11.0

2 release files

0.10.0

2 release files

0.9.4

2 release files

0.9.3

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page