bcraapi


Namebcraapi JSON
Version 2.0.0 PyPI version JSON
download
home_pagehttps://github.com/Jaldekoa/BCRA-Wrapper
SummaryPython API for Banco Central de la República Argentina (BCRA)
upload_time2024-12-19 13:48:41
maintainerNone
docs_urlNone
authorJon Aldekoa
requires_pythonNone
licenseNone
keywords
VCS
bugtrack_url
requirements pandas requests pytest setuptools
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # bcraapi: Python API for BCRA (Banco Central de la República Argentina)
![Tests](https://github.com/Jaldekoa/BCRA-Wrapper/actions/workflows/python-package.yml/badge.svg)

bcraapi is a Python wrapper for BCRA APIs provided by Banco Central de la República Argentina itself.
It makes use of requests and pandas and returns the data in a pandas DataFrame.

The BCRA API does not require tokens or registration, so do not hesitate to use it.

## Installation
```commandline
pip install bcraapi
```

## APIs of the BCRA

- ### Estadísticas cambiarias v1.0
You will be able to access to resources related to exchange rate information published by the BCRA.

- ### Cheques denunciados v1.0
You will be able to consult reported, lost, stolen or adulterated checks. The information available here is provided by the financial entities operating in the country and is published without alterations.

- ### Estadísticas v3.0
You will be able to access resources related to the main and monetary variables information published by the BCRA. 

- ### Central de Deudores v1.0
You will be able to access resources related to the main variables information published by the BCRA. 


## API Cheques denunciados v1.0
### Entidades
Method to obtain the list of all the banking entities in the country with their respective entity code.

```python
from bcraapi import cheques

df = cheques.entidades()
```
#### Returns 
DataFrame with the list of all the banking entities in the country with their respective entity code.


### Denunciados
Method to know if a check from a certain entity is registered as reported or not.

```python
from bcraapi import cheques

df = cheques.denunciados(codigo_entidad=11, numero_cheque=20377516)
```
### Args
| Parameter        | Type  | Description                                                                                                                              |
|------------------|-------|------------------------------------------------------------------------------------------------------------------------------------------|
| `codigo_entidad` | `int` | ID of the financial entity. It can be queried via `entidades()`.                                                                         |
| `numero_cheque`  | `int` | Corresponds to the check number to be consulted. |

#### Returns 
DataFrame with the result if a check is registered as reported or not.


## API Estadísticas v3.0
### Monetarias
Method to obtain the list of all variables published by the BCRA.

```python
from bcraapi import estadisticas

df = estadisticas.monetarias()
```

Method to obtain the values for the variable and date range indicated.

```python
from bcraapi import estadisticas

df = estadisticas.monetarias(id_variable=1, desde="2024-02-01", hasta="2024-02-05")
```

### Args
| Parameter     | Type  | Description                                                                         |
|---------------|-------|-------------------------------------------------------------------------------------|
| `id_variable` | `int` | ID of the desired variable.                                                         |
| `desde`       | `str` | The start date of the range to be queried, **it must be in the format YYYY-MM-DD**. |
| `hasta`       | `str` | The end date of the range to be queried, it **must be in the format YYYY-MM-DD**.   |
| `offset`      | `int` | Records to discard for paging. Default: 0.                                          |
| `limit`       | `int` | Records to be returned by the service. The maximum value is 3000. Default: 1000.    |

#### Returns 
DataFrame with the values for the selected variable and date range.

## API Estadísticas Cambiarias v1.0
### Maestro de monedas
Method to obtain the list of all ISO currencies in force, with their respective denominations.
denomination.

```python
from bcraapi import estadisticascambiarias

df = estadisticascambiarias.maestros_divisas()
```
#### Returns 
DataFrame with the list of currencies of the BCRA.

### Cotizaciones por fecha
Method to obtain the list of all current foreign exchange rates published by the BCRA for a given date (yyyy-MM-dd).
BCRA for a given date. If no date is entered, the last existing quote will be returned.
the last existing quotation will be returned.

```python
from bcraapi import estadisticascambiarias

df = estadisticascambiarias.cotizaciones(fecha="2024-06-12")
```

### Args
| Parameter | Type  | Description                                                               |
|-----------|-------|---------------------------------------------------------------------------|
| `fecha`   | `str` | Date of the data to be consulted, it must have the format **YYYY-MM-DD**. |

#### Returns 
DataFrame with the values for the selected date.

### Evolución de moneda
Method to obtain the price evolution of a currency (ISO) in a particular date range.
If the date from and date to parameters are not entered, the last existing quote will be returned.
the last existing quote will be returned.

```python
from bcraapi import estadisticascambiarias

df = estadisticascambiarias.cotizaciones_moneda(moneda="USD")
```

### Args
| Parameter     | Type  | Description                                                                                    |
|---------------|-------|------------------------------------------------------------------------------------------------|
| `moneda`      | `str` | ISO currency. **This parameter is required**                                                   |
| `fecha_desde` | `str` | The start date of the range to be queried, **it must be in the format YYYY-MM-DD**.            |
| `fecha_hasta` | `str` | The end date of the range to be queried, **it must be in the format YYYY-MM-DD**.              |
| `limit`       | `int` | Maximum amount to be returned per application. **Must be greater than 10 and less than 1000**. |
| `ofset`       | `int` | Exclude from the answer the first N elements of the contributions to be refunded..              |

#### Returns 
Datarame with the evolution of the exchange rate of a currency.


## API Central de Deudores v1.0
### Deudas 
Method to obtain the credit situation, amount of debt, days in arrears and observations corresponding to the last period reported by the entities to the BCRA.

```python
from bcraapi import centraldeudores

df = centraldeudores.deudas(30500010912)
```

### Args
| Parameter        | Type  | Description                                                      |
|------------------|-------|------------------------------------------------------------------|
| `identificacion` | `str` | Corresponds to CUIT/CUIL/CDI, **it must be 11 characters long**. |

#### Returns 
DataFrame with the credit situation, amount of debt, days in arrears and observations corresponding to the last period reported by the entities to the BCRA.


### Deudas Históricas
Method to obtain the credit situation for the last 24 months.

```python
from bcraapi import centraldeudores

df = centraldeudores.deudas_historicas(30500010912)
```

### Args
| Parameter        | Type  | Description                                                      |
|------------------|-------|------------------------------------------------------------------|
| `identificacion` | `str` | Corresponds to CUIT/CUIL/CDI, **it must be 11 characters long**. |

#### Returns 
DataFrame with the credit situation for the last 24 months.

### Cheques Rechazados
Method to obtain the rejected checks with their corresponding reasons.

```python
from bcraapi import centraldeudores

df = centraldeudores.cheques_rechazados(30717283186)
```

### Args
| Parameter        | Type  | Description                                                      |
|------------------|-------|------------------------------------------------------------------|
| `identificacion` | `str` | Corresponds to CUIT/CUIL/CDI, **it must be 11 characters long**. |

#### Returns 
DataFrame with the rejected checks with their corresponding reasons.

## API Documentation:
- [APIs del Banco Central](https://www.bcra.gob.ar/BCRAyVos/catalogo-de-APIs-banco-central.asp)
- [API Estadísticas Cambiarias v1.0](https://www.bcra.gob.ar/Catalogo/apis.asp?fileName=estadisticascambiarias-v1&sectionName=estadisticascambiarias)
- [API Cheques v1.0](https://www.bcra.gob.ar/Catalogo/apis.asp?fileName=cheques-v1&sectionName=Cheques)
- [API Estadísticas v3.0](https://www.bcra.gob.ar/Catalogo/apis.asp?fileName=principales-variables-v3&sectionName=Estad%EDsticas)
- [API Central de Deudores v1.0](https://www.bcra.gob.ar/Catalogo/apis.asp?fileName=central-deudores-v1&sectionName=Central%20de%20Deudores)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Jaldekoa/BCRA-Wrapper",
    "name": "bcraapi",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "Jon Aldekoa",
    "author_email": "jaldekoa@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/dd/03/eba901b3dc1964724219aae07d42d3c9bbf13fb7d68ce84df636bc621091/bcraapi-2.0.0.tar.gz",
    "platform": "Any",
    "description": "# bcraapi: Python API for BCRA (Banco Central de la Rep\u00fablica Argentina)\n![Tests](https://github.com/Jaldekoa/BCRA-Wrapper/actions/workflows/python-package.yml/badge.svg)\n\nbcraapi is a Python wrapper for BCRA APIs provided by Banco Central de la Rep\u00fablica Argentina itself.\nIt makes use of requests and pandas and returns the data in a pandas DataFrame.\n\nThe BCRA API does not require tokens or registration, so do not hesitate to use it.\n\n## Installation\n```commandline\npip install bcraapi\n```\n\n## APIs of the BCRA\n\n- ### Estad\u00edsticas cambiarias v1.0\nYou will be able to access to resources related to exchange rate information published by the BCRA.\n\n- ### Cheques denunciados v1.0\nYou will be able to consult reported, lost, stolen or adulterated checks. The information available here is provided by the financial entities operating in the country and is published without alterations.\n\n- ### Estad\u00edsticas v3.0\nYou will be able to access resources related to the main and monetary variables information published by the BCRA. \n\n- ### Central de Deudores v1.0\nYou will be able to access resources related to the main variables information published by the BCRA. \n\n\n## API Cheques denunciados v1.0\n### Entidades\nMethod to obtain the list of all the banking entities in the country with their respective entity code.\n\n```python\nfrom bcraapi import cheques\n\ndf = cheques.entidades()\n```\n#### Returns \nDataFrame with the list of all the banking entities in the country with their respective entity code.\n\n\n### Denunciados\nMethod to know if a check from a certain entity is registered as reported or not.\n\n```python\nfrom bcraapi import cheques\n\ndf = cheques.denunciados(codigo_entidad=11, numero_cheque=20377516)\n```\n### Args\n| Parameter        | Type  | Description                                                                                                                              |\n|------------------|-------|------------------------------------------------------------------------------------------------------------------------------------------|\n| `codigo_entidad` | `int` | ID of the financial entity. It can be queried via `entidades()`.                                                                         |\n| `numero_cheque`  | `int` | Corresponds to the check number to be consulted. |\n\n#### Returns \nDataFrame with the result if a check is registered as reported or not.\n\n\n## API Estad\u00edsticas v3.0\n### Monetarias\nMethod to obtain the list of all variables published by the BCRA.\n\n```python\nfrom bcraapi import estadisticas\n\ndf = estadisticas.monetarias()\n```\n\nMethod to obtain the values for the variable and date range indicated.\n\n```python\nfrom bcraapi import estadisticas\n\ndf = estadisticas.monetarias(id_variable=1, desde=\"2024-02-01\", hasta=\"2024-02-05\")\n```\n\n### Args\n| Parameter     | Type  | Description                                                                         |\n|---------------|-------|-------------------------------------------------------------------------------------|\n| `id_variable` | `int` | ID of the desired variable.                                                         |\n| `desde`       | `str` | The start date of the range to be queried, **it must be in the format YYYY-MM-DD**. |\n| `hasta`       | `str` | The end date of the range to be queried, it **must be in the format YYYY-MM-DD**.   |\n| `offset`      | `int` | Records to discard for paging. Default: 0.                                          |\n| `limit`       | `int` | Records to be returned by the service. The maximum value is 3000. Default: 1000.    |\n\n#### Returns \nDataFrame with the values for the selected variable and date range.\n\n## API Estad\u00edsticas Cambiarias v1.0\n### Maestro de monedas\nMethod to obtain the list of all ISO currencies in force, with their respective denominations.\ndenomination.\n\n```python\nfrom bcraapi import estadisticascambiarias\n\ndf = estadisticascambiarias.maestros_divisas()\n```\n#### Returns \nDataFrame with the list of currencies of the BCRA.\n\n### Cotizaciones por fecha\nMethod to obtain the list of all current foreign exchange rates published by the BCRA for a given date (yyyy-MM-dd).\nBCRA for a given date. If no date is entered, the last existing quote will be returned.\nthe last existing quotation will be returned.\n\n```python\nfrom bcraapi import estadisticascambiarias\n\ndf = estadisticascambiarias.cotizaciones(fecha=\"2024-06-12\")\n```\n\n### Args\n| Parameter | Type  | Description                                                               |\n|-----------|-------|---------------------------------------------------------------------------|\n| `fecha`   | `str` | Date of the data to be consulted, it must have the format **YYYY-MM-DD**. |\n\n#### Returns \nDataFrame with the values for the selected date.\n\n### Evoluci\u00f3n de moneda\nMethod to obtain the price evolution of a currency (ISO) in a particular date range.\nIf the date from and date to parameters are not entered, the last existing quote will be returned.\nthe last existing quote will be returned.\n\n```python\nfrom bcraapi import estadisticascambiarias\n\ndf = estadisticascambiarias.cotizaciones_moneda(moneda=\"USD\")\n```\n\n### Args\n| Parameter     | Type  | Description                                                                                    |\n|---------------|-------|------------------------------------------------------------------------------------------------|\n| `moneda`      | `str` | ISO currency. **This parameter is required**                                                   |\n| `fecha_desde` | `str` | The start date of the range to be queried, **it must be in the format YYYY-MM-DD**.            |\n| `fecha_hasta` | `str` | The end date of the range to be queried, **it must be in the format YYYY-MM-DD**.              |\n| `limit`       | `int` | Maximum amount to be returned per application. **Must be greater than 10 and less than 1000**. |\n| `ofset`       | `int` | Exclude from the answer the first N elements of the contributions to be refunded..              |\n\n#### Returns \nDatarame with the evolution of the exchange rate of a currency.\n\n\n## API Central de Deudores v1.0\n### Deudas \nMethod to obtain the credit situation, amount of debt, days in arrears and observations corresponding to the last period reported by the entities to the BCRA.\n\n```python\nfrom bcraapi import centraldeudores\n\ndf = centraldeudores.deudas(30500010912)\n```\n\n### Args\n| Parameter        | Type  | Description                                                      |\n|------------------|-------|------------------------------------------------------------------|\n| `identificacion` | `str` | Corresponds to CUIT/CUIL/CDI, **it must be 11 characters long**. |\n\n#### Returns \nDataFrame with the credit situation, amount of debt, days in arrears and observations corresponding to the last period reported by the entities to the BCRA.\n\n\n### Deudas Hist\u00f3ricas\nMethod to obtain the credit situation for the last 24 months.\n\n```python\nfrom bcraapi import centraldeudores\n\ndf = centraldeudores.deudas_historicas(30500010912)\n```\n\n### Args\n| Parameter        | Type  | Description                                                      |\n|------------------|-------|------------------------------------------------------------------|\n| `identificacion` | `str` | Corresponds to CUIT/CUIL/CDI, **it must be 11 characters long**. |\n\n#### Returns \nDataFrame with the credit situation for the last 24 months.\n\n### Cheques Rechazados\nMethod to obtain the rejected checks with their corresponding reasons.\n\n```python\nfrom bcraapi import centraldeudores\n\ndf = centraldeudores.cheques_rechazados(30717283186)\n```\n\n### Args\n| Parameter        | Type  | Description                                                      |\n|------------------|-------|------------------------------------------------------------------|\n| `identificacion` | `str` | Corresponds to CUIT/CUIL/CDI, **it must be 11 characters long**. |\n\n#### Returns \nDataFrame with the rejected checks with their corresponding reasons.\n\n## API Documentation:\n- [APIs del Banco Central](https://www.bcra.gob.ar/BCRAyVos/catalogo-de-APIs-banco-central.asp)\n- [API Estad\u00edsticas Cambiarias v1.0](https://www.bcra.gob.ar/Catalogo/apis.asp?fileName=estadisticascambiarias-v1&sectionName=estadisticascambiarias)\n- [API Cheques v1.0](https://www.bcra.gob.ar/Catalogo/apis.asp?fileName=cheques-v1&sectionName=Cheques)\n- [API Estad\u00edsticas v3.0](https://www.bcra.gob.ar/Catalogo/apis.asp?fileName=principales-variables-v3&sectionName=Estad%EDsticas)\n- [API Central de Deudores v1.0](https://www.bcra.gob.ar/Catalogo/apis.asp?fileName=central-deudores-v1&sectionName=Central%20de%20Deudores)\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Python API for Banco Central de la Rep\u00fablica Argentina (BCRA)",
    "version": "2.0.0",
    "project_urls": {
        "Homepage": "https://github.com/Jaldekoa/BCRA-Wrapper"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "78741e67194db31f9eaea069a9bc34a821405730e82c3d8a8a02f6599f929802",
                "md5": "7b26841a1cc1b418214037728eceb0fe",
                "sha256": "1a454a14713171657d5a51688c9e8e79e2000cec7d31384542fcfa15f0aafa42"
            },
            "downloads": -1,
            "filename": "bcraapi-2.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7b26841a1cc1b418214037728eceb0fe",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 19379,
            "upload_time": "2024-12-19T13:48:39",
            "upload_time_iso_8601": "2024-12-19T13:48:39.419118Z",
            "url": "https://files.pythonhosted.org/packages/78/74/1e67194db31f9eaea069a9bc34a821405730e82c3d8a8a02f6599f929802/bcraapi-2.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dd03eba901b3dc1964724219aae07d42d3c9bbf13fb7d68ce84df636bc621091",
                "md5": "fe56bfbe244f65e2c34c9574ae8cc531",
                "sha256": "c280ef9d159821b0a895dbe411192e12c451045acb7bce6ad23b104465f84cf4"
            },
            "downloads": -1,
            "filename": "bcraapi-2.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "fe56bfbe244f65e2c34c9574ae8cc531",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 18488,
            "upload_time": "2024-12-19T13:48:41",
            "upload_time_iso_8601": "2024-12-19T13:48:41.937302Z",
            "url": "https://files.pythonhosted.org/packages/dd/03/eba901b3dc1964724219aae07d42d3c9bbf13fb7d68ce84df636bc621091/bcraapi-2.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-19 13:48:41",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Jaldekoa",
    "github_project": "BCRA-Wrapper",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "pandas",
            "specs": [
                [
                    ">=",
                    "2.0.0"
                ]
            ]
        },
        {
            "name": "requests",
            "specs": [
                [
                    "~=",
                    "2.31.0"
                ]
            ]
        },
        {
            "name": "pytest",
            "specs": [
                [
                    "~=",
                    "8.1.1"
                ]
            ]
        },
        {
            "name": "setuptools",
            "specs": [
                [
                    "~=",
                    "69.5.1"
                ]
            ]
        }
    ],
    "lcname": "bcraapi"
}
        
Elapsed time: 0.73106s