Account holder portfolio position
Returns the portfolio position of an Allaria+ account holder, that is, the assets held in their portfolio at a given date.
GET
/v1/bymas/allariamas/positionsRequest
Headers
| Field | Type | Required | Description |
|---|---|---|---|
Authorization | string | Yes | Access token in Bearer ACCESS_TOKEN format |
Not applicable: Path Parameters, Body.
Query Parameters
| Field | Type | Required | Description |
|---|---|---|---|
account-id | integer | Yes | Account holder account number |
asset | string | No | Filter by asset name (e.g. Dólar, BONO REP. ARGENTINA USD STEP UP 2030) |
date | string (date) | No | Portfolio position date in YYYY-MM-DD format. Defaults to the current day's position |
grouped-by | string | No | Result grouping. Allowed values: NONE, INSTRUMENT, CURRENCY. Default: NONE. |
company | string | No | Filter by company |
group-by-sub-category-description | boolean | No | Group by subcategory description. Default: false. |
group-by-sub-category-and-description | boolean | No | Group by subcategory and description. Default: false. |
page | integer | No | Page number (0-based). Default: 0. |
count | integer | No | number of results per page. Minimum: 1, maximum: 100. Default: 50. |
Response
2XX Success
Status: 200 OK
The response is a JSON object whose structure varies depending on the grouping parameters used:
- No grouping (
grouped-by=NONE, the default): a flat list of positions. - Grouped (
grouped-by=CURRENCYorgrouped-by=INSTRUMENT): positions are nested under groups (positions_by_group). Whengroup-by-sub-category-description=trueorgroup-by-sub-category-and-description=true, the positions are nested under additional subgroup levels.
note
All numeric values are serialized as strings (e.g. "1000.00"), and decimals are written in plain notation (never scientific).
Top-level fields
For the non-grouped response:
| Field | Type | Description |
|---|---|---|
positions | array | List of positions. See Position |
date | string (date) | Position date in YYYY-MM-DD format |
grouped_by | string | Grouping applied. Always NONE for this variant |
page | integer | Current page number (0-based) |
total_pages | integer | Total number of pages |
total_elements | integer | Total number of positions matching the filters |
For the grouped responses:
| Field | Type | Description |
|---|---|---|
account_id | integer | Account holder account number (omitted in the CURRENCY/INSTRUMENT-only variant) |
total_elements | integer | Total number of positions matching the filters |
total_settlement_quantity | string (number) | Total settlement amount in pesos across all groups |
total_agreement_quantity | string (number) | Total agreement amount in pesos across all groups |
total_valuations | array | Aggregated valuations by currency. See GeneralValuation |
positions_by_group | array | Groups of positions. Each group contains either positions or nested subgroups |
date | string (date) | Position date in YYYY-MM-DD format |
grouped_by | string | Grouping applied (CURRENCY or INSTRUMENT) |
page | integer | Current page number (0-based) |
total_pages | integer | Total number of pages |
Group object fields
Each entry of positions_by_group (and each nested subgroup) shares these fields:
| Field | Type | Description |
|---|---|---|
category | string | Group label (currency, subcategory, or instrument description, depending on the level) |
agreement_percentage | string (number) | Share of the group's agreement amount over the total |
settlement_percentage | string (number) | Share of the group's settlement amount over the total |
agreement_quantity | string (number) | Group agreement amount in pesos |
settlement_quantity | string (number) | Group settlement amount in pesos |
valuations | array | Group valuations by currency. See GeneralValuation |
positions | array | Positions in this group (leaf level only). See Position |
subgroups | array | Nested groups (intermediate levels only) |
Position object fields
| Field | Type | Description |
|---|---|---|
account_id | integer | Account number that holds the position |
asset | object | Asset information. See AssetInfo |
agreement_quantity | string (number) | Quantity by agreement date |
settlement_quantity | string (number) | Quantity by settlement date |
available_quantity | string (number) | Quantity available to operate |
locked_quantity | string (number) | Locked (blocked) quantity |
agreement_unavailable_quantity | string (number) | Unavailable quantity by agreement date |
settlement_unavailable_quantity | string (number) | Unavailable quantity by settlement date |
agreement_available_quantity | string (number) | Available quantity by agreement date |
settlement_available_quantity | string (number) | Available quantity by settlement date |
valuations | array | Valuations per currency. See PositionValuation |
last_updated_at | string (datetime) | Last update timestamp (yyyy-MM-dd'T'HH:mm:ss.SSS) |
agreement_percentage | string (number) | Share of this position's agreement amount over the total |
settlement_percentage | string (number) | Share of this position's settlement amount over the total |
metadata | object | Additional position metadata |
AssetInfo object fields
| Field | Type | Description |
|---|---|---|
name | string | Asset name |
abbreviation | string | Asset abbreviation (e.g. AL30) |
category | string | Asset category |
sub_category | string | Asset subcategory |
currency | string | Preferred valuation currency |
PositionValuation object fields
| Field | Type | Description |
|---|---|---|
name | string | Valuation currency name (e.g. Dólar) |
code | string | Valuation currency code (e.g. USD) |
quotationProcessedAt | string (datetime) | When the quotation used for the valuation was processed |
agreement_quantity | string (number) | Valued amount by agreement date |
settlement_quantity | string (number) | Valued amount by settlement date |
average_purchase_price | string (number) | Average purchase price. May be null when not available |
return_amount | string (number) | Unrealized return amount. May be null when not available |
return_percentage | string (number) | Unrealized return percentage. May be null when not available |
exchange_rate | string (number) | Exchange rate applied for the valuation |
GeneralValuation object fields
| Field | Type | Description |
|---|---|---|
name | string | Currency name (e.g. Dólar) |
agreement_quantity | string (number) | Aggregated agreement amount for the currency |
settlement_quantity | string (number) | Aggregated settlement amount for the currency |
Error Codes
| Status | Description |
|---|---|
400 | Bad Request — invalid or missing parameters |
403 | Forbidden — the token does not have permission to access this resource |
404 | Not Found — the account holder does not exist |
422 | Unprocessable Entity — the parameters are valid but cannot be processed |
500 | Internal Server Error — internal server error |
Error structure:
{
"timestamp": "2024-01-15T10:30:00Z",
"status": 400,
"error": "Bad Request",
"message": "account-id is required",
"code": "VALIDATION_ERROR",
"path": "/v1/bymas/allariamas/positions"
}
Code Example
- cURL
- JavaScript
- Python
- Node.js
curl -X GET "https://b2b.allaria.dev/v1/bymas/allariamas/positions?account-id=12345" \
-H "Authorization: Bearer ACCESS_TOKEN"
const params = new URLSearchParams({ 'account-id': 12345 });
const response = await fetch(`https://b2b.allaria.dev/v1/bymas/allariamas/positions?${params}`, {
method: 'GET',
headers: { 'Authorization': 'Bearer ACCESS_TOKEN' }
});
const data = await response.json();
console.log(data);
import requests
response = requests.get(
'https://b2b.allaria.dev/v1/bymas/allariamas/positions',
headers={ 'Authorization': 'Bearer ACCESS_TOKEN' },
params={ 'account-id': 12345 }
)
data = response.json()
print(data)
const axios = require('axios');
const response = await axios.get('https://b2b.allaria.dev/v1/bymas/allariamas/positions', {
headers: { Authorization: 'Bearer ACCESS_TOKEN' },
params: { 'account-id': 12345 }
});
console.log(response.data);
- No grouping (NONE)
- Grouped (CURRENCY / INSTRUMENT)
- Grouped + subcategory description
- Grouped + subcategory and description
{
"positions": [
{
"account_id": 12345,
"asset": {
"name": "BONO REP. ARGENTINA USD STEP UP 2030",
"abbreviation": "AL30",
"category": "BONOS",
"sub_category": "BONOS SOBERANOS",
"currency": "USD"
},
"agreement_quantity": "1000.00",
"settlement_quantity": "1000.00",
"available_quantity": "1000.00",
"locked_quantity": "0.00",
"agreement_unavailable_quantity": "0.00",
"settlement_unavailable_quantity": "0.00",
"agreement_available_quantity": "1000.00",
"settlement_available_quantity": "1000.00",
"valuations": [
{
"name": "Dólar",
"code": "USD",
"quotationProcessedAt": "2024-01-15T10:30:00.000",
"agreement_quantity": "850.00",
"settlement_quantity": "850.00",
"average_purchase_price": "0.82",
"return_amount": "30.00",
"return_percentage": "3.66",
"exchange_rate": "1.00"
}
],
"last_updated_at": "2024-01-15T10:30:00.000",
"agreement_percentage": "100.00",
"settlement_percentage": "100.00",
"metadata": {}
}
],
"date": "2024-01-15",
"grouped_by": "NONE",
"page": 0,
"total_pages": 1,
"total_elements": 1
}
{
"total_elements": 1,
"total_settlement_quantity": "850.00",
"total_agreement_quantity": "850.00",
"total_valuations": [
{
"name": "Dólar",
"agreement_quantity": "850.00",
"settlement_quantity": "850.00"
}
],
"positions_by_group": [
{
"category": "BONOS SOBERANOS",
"agreement_percentage": "100.00",
"settlement_percentage": "100.00",
"agreement_quantity": "850.00",
"settlement_quantity": "850.00",
"positions": [
{
"account_id": 12345,
"asset": {
"name": "BONO REP. ARGENTINA USD STEP UP 2030",
"abbreviation": "AL30",
"category": "BONOS",
"sub_category": "BONOS SOBERANOS",
"currency": "USD"
},
"agreement_quantity": "1000.00",
"settlement_quantity": "1000.00",
"available_quantity": "1000.00",
"locked_quantity": "0.00",
"agreement_unavailable_quantity": "0.00",
"settlement_unavailable_quantity": "0.00",
"agreement_available_quantity": "1000.00",
"settlement_available_quantity": "1000.00",
"valuations": [
{
"name": "Dólar",
"code": "USD",
"quotationProcessedAt": "2024-01-15T10:30:00.000",
"agreement_quantity": "850.00",
"settlement_quantity": "850.00",
"average_purchase_price": "0.82",
"return_amount": "30.00",
"return_percentage": "3.66",
"exchange_rate": "1.00"
}
],
"last_updated_at": "2024-01-15T10:30:00.000",
"agreement_percentage": "100.00",
"settlement_percentage": "100.00",
"metadata": {}
}
],
"valuations": [
{
"name": "Dólar",
"agreement_quantity": "850.00",
"settlement_quantity": "850.00"
}
]
}
],
"date": "2024-01-15",
"grouped_by": "CURRENCY",
"page": 0,
"total_pages": 1
}
{
"account_id": 12345,
"total_elements": 1,
"total_settlement_quantity": "850.00",
"total_agreement_quantity": "850.00",
"total_valuations": [
{
"name": "Dólar",
"agreement_quantity": "850.00",
"settlement_quantity": "850.00"
}
],
"positions_by_group": [
{
"category": "BONOS SOBERANOS",
"agreement_percentage": "100.00",
"settlement_percentage": "100.00",
"agreement_quantity": "850.00",
"settlement_quantity": "850.00",
"subgroups": [
{
"category": "BONO REP. ARGENTINA USD STEP UP 2030 - USD",
"agreement_percentage": "100.00",
"settlement_percentage": "100.00",
"agreement_quantity": "850.00",
"settlement_quantity": "850.00",
"positions": [
{
"account_id": 12345,
"asset": {
"name": "BONO REP. ARGENTINA USD STEP UP 2030",
"abbreviation": "AL30",
"category": "BONOS",
"sub_category": "BONOS SOBERANOS",
"currency": "USD"
},
"agreement_quantity": "1000.00",
"settlement_quantity": "1000.00",
"available_quantity": "1000.00",
"locked_quantity": "0.00",
"agreement_unavailable_quantity": "0.00",
"settlement_unavailable_quantity": "0.00",
"agreement_available_quantity": "1000.00",
"settlement_available_quantity": "1000.00",
"valuations": [
{
"name": "Dólar",
"code": "USD",
"quotationProcessedAt": "2024-01-15T10:30:00.000",
"agreement_quantity": "850.00",
"settlement_quantity": "850.00",
"average_purchase_price": "0.82",
"return_amount": "30.00",
"return_percentage": "3.66",
"exchange_rate": "1.00"
}
],
"last_updated_at": "2024-01-15T10:30:00.000",
"agreement_percentage": "100.00",
"settlement_percentage": "100.00",
"metadata": {}
}
],
"valuations": [
{
"name": "Dólar",
"agreement_quantity": "850.00",
"settlement_quantity": "850.00"
}
]
}
],
"valuations": [
{
"name": "Dólar",
"agreement_quantity": "850.00",
"settlement_quantity": "850.00"
}
]
}
],
"date": "2024-01-15",
"grouped_by": "CURRENCY",
"page": 0,
"total_pages": 1
}
{
"account_id": 12345,
"total_elements": 1,
"total_settlement_quantity": "850.00",
"total_agreement_quantity": "850.00",
"total_valuations": [
{
"name": "Dólar",
"agreement_quantity": "850.00",
"settlement_quantity": "850.00"
}
],
"positions_by_group": [
{
"category": "BONOS SOBERANOS",
"agreement_percentage": "100.00",
"settlement_percentage": "100.00",
"agreement_quantity": "850.00",
"settlement_quantity": "850.00",
"subgroups": [
{
"category": "BONOS SOBERANOS",
"agreement_percentage": "100.00",
"settlement_percentage": "100.00",
"agreement_quantity": "850.00",
"settlement_quantity": "850.00",
"subgroups": [
{
"category": "BONO REP. ARGENTINA USD STEP UP 2030 - USD",
"agreement_percentage": "100.00",
"settlement_percentage": "100.00",
"agreement_quantity": "850.00",
"settlement_quantity": "850.00",
"positions": [
{
"account_id": 12345,
"asset": {
"name": "BONO REP. ARGENTINA USD STEP UP 2030",
"abbreviation": "AL30",
"category": "BONOS",
"sub_category": "BONOS SOBERANOS",
"currency": "USD"
},
"agreement_quantity": "1000.00",
"settlement_quantity": "1000.00",
"available_quantity": "1000.00",
"locked_quantity": "0.00",
"agreement_unavailable_quantity": "0.00",
"settlement_unavailable_quantity": "0.00",
"agreement_available_quantity": "1000.00",
"settlement_available_quantity": "1000.00",
"valuations": [
{
"name": "Dólar",
"code": "USD",
"quotationProcessedAt": "2024-01-15T10:30:00.000",
"agreement_quantity": "850.00",
"settlement_quantity": "850.00",
"average_purchase_price": "0.82",
"return_amount": "30.00",
"return_percentage": "3.66",
"exchange_rate": "1.00"
}
],
"last_updated_at": "2024-01-15T10:30:00.000",
"agreement_percentage": "100.00",
"settlement_percentage": "100.00",
"metadata": {}
}
],
"valuations": [
{
"name": "Dólar",
"agreement_quantity": "850.00",
"settlement_quantity": "850.00"
}
]
}
],
"valuations": [
{
"name": "Dólar",
"agreement_quantity": "850.00",
"settlement_quantity": "850.00"
}
]
}
],
"valuations": [
{
"name": "Dólar",
"agreement_quantity": "850.00",
"settlement_quantity": "850.00"
}
]
}
],
"date": "2024-01-15",
"grouped_by": "INSTRUMENT",
"page": 0,
"total_pages": 1
}