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).
- 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 retry logic with exponential backoff and safe failure handling.
- Developer Friendly:
- Full Type Hinting for better IDE support.
- Bilingual context (Spanish API / English Wrapper).
- Detailed debug logging.
- Configurable: Options for SSL verification, retries, and timeouts.
Full documentation, including installation instructions, usage examples, and API reference, is available at:
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.
Get up and running in seconds:
from bcra_connector import BCRAConnector
# Initialize the connector
connector = BCRAConnector()
# 1. List principal variables published by BCRA
variables = connector.get_principales_variables()
print(f"Found {len(variables)} variables.")
# 2. Get the latest value for a specific variable (e.g., using the ID of the first one)
if variables:
target_var = variables[0]
print(f"Fetching data for: {target_var.descripcion} (ID: {target_var.idVariable})")
latest = connector.get_latest_value(target_var.idVariable)
print(f"Latest Value: {latest.valor} on {latest.fecha}")
# 3. Get historical data (last 30 days)
# (Note: Date range filtering is handled by the API or post-processing)Contributions are welcome! Please read our:
For vulnerability reports, please review our Security Policy.
See CHANGELOG.md for a list of changes and version updates.
This project is licensed under the MIT License - see the LICENSE file for details.
This project is not officially affiliated with or endorsed by the Banco Central de la República Argentina. Use at your own risk.