A FastAPI-based API that provides access to Bank of the Republic of Colombia (BanRep) data, inflation rates and TRM (Representative Market Rate) exchange rate data.
- Historical inflation rates data
- TRM (Representative Market Rate) exchange rate data
- Filter data by date ranges
- Get specific records by date
- Real-time TRM data updates from Banco de la República
- SQLite database with Turso integration
- Containerized deployment on Cloudflare
- Python 3.13+
- Node 22.16.0+
- Turso CLI (for database management)
- Docker (for local development)
- Cloudflare account (for deployment)
To run the project locally, check out the API README.
- Install dependencies
npm install- Run the development server
npm run devServer will be available at http://localhost:8787.
- Install Wrangler CLI (if not already installed)
npm install -g wrangler- Login to Cloudflare
wrangler loginTo deploy to Cloudflare the Cloudflare workers paid plan is required
# Deploy the container
npm run deployOnce the server is running, you can access:
- API documentation:
/docs - Alternative documentation:
/redoc
GET v1/inflation: Get paginated inflation dataGET v1/inflation/date-range: Get inflation data by date rangeGET v1/inflation/{year}/{month}: Get specific inflation record
GET v1/trm: Get paginated TRM data with optional sortingGET v1/trm/by-date-range: Get TRM data within a specified date rangeGET v1/trm/by-date: Get TRM data for a specific date
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests (if available)
- Submit a pull request
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.