Holdings
Data model
Holding
Holding value on a specific date. JSON:API resource type holding.
ccyCodestringISO 4217 code for the currency in which the holding is reported.
datestringISO 8601 representation of the date where the data holds.
marketValuenumberMarket value of the holding.
Relationships
reportingEntityreporting-entityRequired.
depositorydepositoryOptional.
portfolioportfolioOptional.
assetassetOptional.
assetClassasset-classOptional.
assetClassDetailedasset-class-detailedOptional.
Asset holding
Holding value on a specific date for a specific asset. JSON:API resource type asset-holding.
ccyCodestringISO 4217 code for the currency in which the holding is reported.
datestringISO 8601 representation of the date where the data holds.
marketValuenumberMarket value of the holding.
unitsInHoldingnumberThe number of units of the asset owned.
Relationships
reportingEntityreporting-entityRequired.
depositorydepositoryOptional.
portfolioportfolioRequired.
assetassetRequired.
assetClassasset-classOptional.
assetClassDetailedasset-class-detailedOptional.
Aggregated holdings
Get holding values for a specific reporting entity in a given period. The default behavior of the endpoint is to aggregate holdings of the entire reporting entity. More granular data can be retrieved by using the expand parameter.
Parameters
expandstringQuery. Allows for expansion of the data from the total reporting entity level to lower levels. Possible values: "portfolios", "depositories", "assets", "assetClasses", "assetClassesDetailed". Multiple values can be passed as a comma separated list, e.g. "portfolios,assets". Values are case-insensitive; an unknown value or an empty entry (such as a trailing comma) is
400Invalid expand parameter: {expand}.When choosing "depositories" all holdings without a depository can be identified as those not including depository in the "relationships" object.fromDatestringQuery, required. First date in the period,
yyyy-MM-dd.idstringPath, required. Identifier for the reporting entity, a 24-character hex ID.
includestringQuery, optional. Allows for inclusion of related data. Possible value: "asset", which requires
expandto contain "assets" (otherwise400Cannot include asset data if 'expand' is not set to 'assets'.). Any other value is ignored.toDatestringQuery, required. Last date in the period,
yyyy-MM-dd.
A malformed id is 400, a missing or empty date is 400, a date not in yyyy-MM-dd format is 422, and fromDate after toDate is 400. An unknown reporting entity, or one you cannot see, is 404.
Passing expand=portfolios to the endpoint results in per-portfolio holdings data.
curl -G https://api.aleta.ai/api/v2/holdings/reporting-entities/649ad926fc1a10be9e2ea241 \
-H "Authorization: Bearer {access_token}" \
-d fromDate=2024-06-03 \
-d toDate=2024-06-04
{
"data": [
{
"type": "holding",
"id": "ZDAzNDhiNjVmYWUzMTdhZGVmMWZmOGNk",
"attributes": {
"date": "2024-06-03",
"ccyCode": "DKK",
"marketValue": 144091629
},
"relationships": {
"reportingEntity": {
"data": {
"type": "reporting-entity",
"id": "649ad926fc1a10be9e2ea241"
}
}
}
},
{
"type": "holding",
"id": "OWVjOWRmMmM1YTg2MWY5ZGQ2OWNlYTk3",
"attributes": {
"date": "2024-06-04",
"ccyCode": "DKK",
"marketValue": 144860105
},
"relationships": {
"reportingEntity": {
"data": {
"type": "reporting-entity",
"id": "649ad926fc1a10be9e2ea241"
}
}
}
}
]
}
Asset holdings
Get asset holdings for a reporting entity with a specific ID. As opposed to regular holdings fetched with GET /api/v2/holdings/reporting-entities/{id}, where data may be summarized by means of the expand parameter, asset holdings always represent the most detailed reporting level.
Parameters
fromDatestringQuery, required. First date in the period,
yyyy-MM-dd.idstringPath, required. Identifier for the reporting entity, a 24-character hex ID.
includestringQuery, optional. Allows for inclusion of related data. Possible value: "asset". Any other value is ignored.
toDatestringQuery, required. Last date in the period,
yyyy-MM-dd.
This endpoint does not read expand. Date errors and the 404 are the same as on aggregated holdings.
curl -G https://api.aleta.ai/api/v2/asset-holdings/reporting-entities/649ad926fc1a10be9e2ea241 \
-H "Authorization: Bearer {access_token}" \
-d fromDate=2024-06-03 \
-d toDate=2024-06-04
{
"data": [
{
"type": "asset-holding",
"id": "LUod8Si5QHtsMEHJCX6g7w",
"attributes": {
"date": "2024-10-01",
"marketValue": 702926.90187541,
"ccyCode": "DKK",
"unitsInHolding": 23542
},
"relationships": {
"portfolio": {
"data": {
"id": "666ae70b272d21815633c902",
"type": "portfolio"
}
},
"asset": {
"data": {
"id": "0e496ca224b76c4d9bdbfc7b",
"type": "asset"
}
},
"depository": {
"data": {
"id": "0e496ca224b76c4d9bdbfc7c",
"type": "depository"
}
},
"reportingEntity": {
"data": {
"id": "649ad926fc1a10be9e2ea241",
"type": "reporting-entity"
}
},
"assetClass": {
"data": {
"id": "68c1689688080d5f4429f6d1",
"type": "asset-class"
}
},
"assetClassDetailed": {
"data": {
"id": "68c1689aa3da1528dc9c1a8f",
"type": "asset-class-detailed"
}
}
}
},
{
"type": "asset-holding",
"id": "WcZ_9l3YdHHT5plvqczy6Q",
"attributes": {
"date": "2024-10-01",
"marketValue": 700569.24008607,
"ccyCode": "DKK",
"unitsInHolding": 6782
},
"relationships": {
"portfolio": {
"data": {
"id": "666ae70b272d21815633c903",
"type": "portfolio"
}
},
"asset": {
"data": {
"id": "0e496ca224b76c4d9bdbfc7b",
"type": "asset"
}
},
"depository": {
"data": {
"id": "0e496ca224b76c4d9bdbfc7c",
"type": "depository"
}
},
"reportingEntity": {
"data": {
"id": "649ad926fc1a10be9e2ea241",
"type": "reporting-entity"
}
},
"assetClass": {
"data": {
"id": "68c1689688080d5f4429f6d1",
"type": "asset-class"
}
},
"assetClassDetailed": {
"data": {
"id": "68c1689aa3da1528dc9c1a8f",
"type": "asset-class-detailed"
}
}
}
}
]
}