https://github.com/rafnixg/bcv-api
BCV Exchange rate: This API is used to get the exchange rate of the BCV (Central Bank of Venezuela)
https://github.com/rafnixg/bcv-api
bcv exchange-api exchange-rate exchange-rates python venezuela
Last synced: 5 months ago
JSON representation
BCV Exchange rate: This API is used to get the exchange rate of the BCV (Central Bank of Venezuela)
- Host: GitHub
- URL: https://github.com/rafnixg/bcv-api
- Owner: rafnixg
- License: gpl-3.0
- Created: 2024-04-09T02:26:47.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-12-13T21:02:45.000Z (6 months ago)
- Last Synced: 2025-12-15T16:30:23.145Z (6 months ago)
- Topics: bcv, exchange-api, exchange-rate, exchange-rates, python, venezuela
- Language: Python
- Homepage: https://rafnixg.github.io/bcv-api/
- Size: 1 MB
- Stars: 16
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# BCV Exchange Rate API
[](https://www.python.org/downloads/)
[](https://fastapi.tiangolo.com)
[](https://www.gnu.org/licenses/gpl-3.0)
[](https://github.com/rafnixg/bcv-api)
[](https://github.com/rafnixg/bcv-api/issues)
[](https://github.com/rafnixg/bcv-api/actions/workflows/docker-image.yml)
[](https://github.com/rafnixg/bcv-api/actions/workflows/docs.yml)
[](https://deepwiki.com/rafnixg/bcv-api)
## Documentation
[https://rafnixg.github.io/bcv-api/](https://rafnixg.github.io/bcv-api/)
## Description
This API is used to get the exchange rate of the BCV (Central Bank of Venezuela).
This API is a simple REST API that returns the exchange rate of the BCV in JSON format.
## Quick Usage
### Get Latest Rate
```bash
curl https://bcv-api.rafnixg.dev/rates/
```
### Get Rate for Specific Date
```bash
curl https://bcv-api.rafnixg.dev/rates/2025-08-20
```
### Get Rate History (Last 30 Days)
```bash
curl https://bcv-api.rafnixg.dev/rates/history
```
### Get Rate History for Date Range
```bash
curl "https://bcv-api.rafnixg.dev/rates/history?start_date=2025-02-15&end_date=2025-03-15"
```
For complete API documentation visit: [https://bcv-api.rafnixg.dev/docs](https://bcv-api.rafnixg.dev/docs)
## Installation
1. Clone the repository and create a `.env` file in the root of the project, use `.env.example` as a template
Remember to replace the values of the variables with your own values.
```bash
git clone https://github.com/rafnixg/bcv-api.git
cd bcv-api
cp .env.example .env
```
2. Create a virtual environment
```bash
python -m venv venv
```
3. Activate the virtual environment
```bash
# Windows
venv\Scripts\activate
# Linux
source venv/bin/activate
```
4. Install the dependencies
```bash
pip install -r requirements.txt
```
5. Run the API
```bash
uvicorn bcv_api.main:app --reload
```
6. Open your browser and go to http://localhost:8000
## Using Docker
1. Clone the repository and create a `.env` file in the root of the project, use `.env.example` as a template
Remember to replace the values of the variables with your own values.
```bash
git clone
cd bcv-api
cp .env.example .env
```
2. Build the image with the Dockerfile, select the Dockerfile.newrelic file if you want to monitor the application with NewRelic
```bash
# Without newrelic monitoring
docker build -t bcv-api .
# With newrelic monitoring
docker build -t bcv-api -f Dockerfile.newrelic .
```
3. Run the container
```bash
docker run -d --name bcv-api -p 8000:8000 --env-file .env bcv-api:latest
```
4. Open your browser and go to http://localhost:8000
## Built With
- [Python](https://www.python.org/)
- [FastAPI](https://fastapi.tiangolo.com/)
- [Pydantic](https://pydantic-docs.helpmanual.io/)
- [Requests](https://docs.python-requests.org/en/master/)
- [BeautifulSoup4](https://www.crummy.com/software/BeautifulSoup/bs4/doc/)
## Author
- **Rafnix Guzmán** - [rafnixg](https://links.rafnixg.dev?ref=bcv-api)
## License
This project is licensed under the GNU General Public License v3.0 - see the [LICENSE](LICENSE) file for details.