Get BCRA data given a variable id
Time series for a variable, optionally filtered by date range. Pass latest=true to return only the most recent value instead of the series.
GET
/v1/market-data/bcra/variable/{id}Request
Headers
| Field | Type | Required | Description |
|---|---|---|---|
Authorization | string | Yes | Access token in Bearer ACCESS_TOKEN format |
Path Parameters
| Field | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | BCRA variable ID. Call GET /bcra/variables to discover all available IDs |
Query Parameters
| Field | Type | Required | Description |
|---|---|---|---|
from | string | No | Start date in yyyy-MM-dd format (optional) |
latest | boolean | No | Return only the most recent value instead of the series. Default: false. |
to | string | No | End date in yyyy-MM-dd format (optional) |
Not applicable: Body.
Response
2XX Success
Status: 200 — Series (or, with latest=true, the most recent value)
Returns an object with these fields:
| Field | Type | Description |
|---|---|---|
status | integer | Upstream status code. |
metadata | object | Paging metadata. |
results | array of object | One entry per requested variable. |
metadata fields
| Field | Type | Description |
|---|---|---|
resultset | object | Result set paging counters. |
metadata.resultset fields
| Field | Type | Description |
|---|---|---|
count | integer | Total number of results. |
offset | integer | Offset of the first returned result. |
limit | integer | Maximum number of results returned. |
results fields
| Field | Type | Description |
|---|---|---|
idVariable | integer | BCRA variable ID. |
detalle | array of object | Observations for the variable. |
results.detalle fields
| Field | Type | Description |
|---|---|---|
fecha | string (date) | Observation date. |
valor | number | Observed value. |
Error Codes
| Status | Description |
|---|---|
401 | Missing or invalid authentication |
403 | Caller lacks the required role |
404 | Variable not found |
500 | Unexpected server error |
Code Example
- cURL
- JavaScript
- Python
- Node.js
curl -X GET "https://b2b.allaria.cloud/v1/market-data/bcra/variable/4?from=2024-01-01&latest=false&to=2024-12-31" \
-H "Authorization: Bearer ACCESS_TOKEN"
const response = await fetch('https://b2b.allaria.cloud/v1/market-data/bcra/variable/4?from=2024-01-01&latest=false&to=2024-12-31', {
method: 'GET',
headers: { 'Authorization': 'Bearer ACCESS_TOKEN' },
});
const data = await response.json();
console.log(data);
import requests
response = requests.get(
'https://b2b.allaria.cloud/v1/market-data/bcra/variable/4?from=2024-01-01&latest=false&to=2024-12-31',
headers={ 'Authorization': 'Bearer ACCESS_TOKEN' },
)
print(response.json())
const axios = require('axios');
const response = await axios.get('https://b2b.allaria.cloud/v1/market-data/bcra/variable/4?from=2024-01-01&latest=false&to=2024-12-31', {
headers: { 'Authorization': 'Bearer ACCESS_TOKEN' },
});
console.log(response.data);
2XX Success
{
"status": 200,
"metadata": {
"resultset": {
"count": 365,
"offset": 0,
"limit": 1000
}
},
"results": [
{
"idVariable": 4,
"detalle": [
{
"fecha": "2026-08-29",
"valor": 1350.5
}
]
}
]
}