Get Historical Rates
Endpoints
Get Historical Rates
Query exchange rates by date with optional bank filtering
GET
Get Historical Rates
Documentation Index
Fetch the complete documentation index at: https://mintlify.com/MiguelNavas19/miapibcv/llms.txt
Use this file to discover all available pages before exploring further.
Endpoint
Path Parameters
The date to query rates for. Accepts various date formats that can be parsed by Carbon.
- Format:
YYYY-MM-DD(recommended) or any Carbon-parseable format - Validation: Must be a valid date that is not in the future
- Example:
2026-03-04,2026-03-01,2026-02-28
Optional bank source identifier to filter results. If omitted, returns data for all available banks.Valid values:
bcv- Banco Central de Venezuelabanplus- Banplus Banco Universalbnc- Banco Nacional de Créditobdv- Banco de Venezuela
This parameter is case-sensitive and must match exactly.
Response
Status message indicating the result of the query. Returns
"Consulta exitosa" on success.Dynamic key based on bank source(s) in the response. When no
source filter is applied, all available banks are included.Caching
This endpoint caches results for 1 hour (3600 seconds) based on the queried date. The cache key format is:
tasas_bancos_{date}Example Requests
Get All Banks for a Specific Date
Get Specific Bank for a Date
Example Responses
All Banks Response
Error Responses
Error Cases
The date validation fails if:- The date string cannot be parsed by Carbon
- The date is in the future (greater than today)
- No banks have scraped data for the specified date
- The specified source doesn’t have data for that date (when filtering by bank)
Response Status Codes
| Status Code | Description |
|---|---|
| 200 | Success - Returns exchange rates for the requested date/source |
| 400 | Bad Request - Invalid date format or future date |
| 404 | Not Found - No data available for the specified parameters |
Implementation Details
The endpoint is implemented inapp/Http/Controllers/Api/ScraperController.php:43-84 and follows this logic:
- Date Validation (lines 48-51): Validates the date parameter using Carbon
- Cache Lookup (lines 56-58): Checks for cached data with key
tasas_bancos_{date} - Source Filtering (lines 61-63): Optionally filters by bank source if provided
- Data Transformation (lines 71-78): Maps database records to response format
- Response Building (lines 80-83): Returns JSON with message and bank data
Date Validation Logic
ThevalidateDate() method (lines 87-103) performs the following checks:
Usage Examples
Query Multiple Dates
Compare Rates Across Banks
Next Steps
Response Structure
Detailed documentation of response formats
Error Handling
Complete guide to API errors