Performance
Daily and accumulated performance metrics in the context of a given period.
Data model
JSON:API resource type: performance.
accumulatedReturnnumberTotal profit/loss since the beginning of the period.
accumulatedTwrnumberTime-weighted return (TWR) since the beginning of the period.
ccyCodestringISO 4217 code for the currency (CCY) in which the data is reported.
dailyNetCashFLownumberNet cash flow on the day. Note the capital
Lin the attribute name.dailyReturnnumberProfit/loss on the day.
dailyTwrnumberTime-weighted return (TWR) of the day.
datestringISO 8601 representation of the day on which the data holds.
Relationships
reportingEntityreporting-entityRequired.
depositorydepositoryOptional.
portfolioportfolioOptional.
assetassetOptional.
assetClassasset-classOptional.
assetClassDetailedasset-class-detailedOptional.
Performance series
Get performance metrics in the scope of a reporting entity in a given period. The default behavior of the endpoint is to aggregate performance for the entire reporting entity, while more granular data can be retrieved by specifying an expand parameter.
Path parameters
idstringRequired. Identifier for the reporting entity.
Query parameters
expandstringAllows 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. The v3 names (instruments,instrumentClasses,instrumentClassesDetailed) are rejected on/api/v2/performancewith a400;/api/v2/summarized-performanceaccepts them and treats them as their asset equivalents.fromDatestringRequired. First day in the period,
yyyy-MM-dd.includestringOptional. Allows for inclusion of related data. Possible value:
asset, which requiresexpandto containassets(otherwise400Cannot include asset data if 'expand' is not set to 'assets'.). Any other value is ignored.toDatestringRequired. Last day in the period,
yyyy-MM-dd.
An unknown expand value is 400 Invalid expand parameter: {expand}. Supported values: portfolios, depositories, assets, assetClasses, assetClassesDetailed. An unknown reporting entity, or one you cannot see, is 404. A missing or empty date is 400, a date not in yyyy-MM-dd format is 422, and fromDate after toDate is 400.
curl -G https://api.aleta.ai/api/v2/performance/reporting-entities/649ad926fc1a10be9e2ea241 \
-H "Authorization: Bearer {access_token}" \
-d fromDate=2024-06-03 \
-d toDate=2024-06-04
{
"data": [
{
"type": "performance",
"id": "c07hD3wE_S7mfh8Bzz6kYA",
"attributes": {
"date": "2024-06-03",
"ccyCode": "DKK",
"dailyNetCashFLow": 0,
"dailyReturn": 768476,
"dailyTwr": 0.0053,
"accumulatedReturn": 768476,
"accumulatedTwr": 0.0053
},
"relationships": {
"reportingEntity": {
"data": { "type": "reporting-entity", "id": "649ad926fc1a10be9e2ea241" }
}
}
},
{
"type": "performance",
"id": "IrPiqdmtYnx_XSxUpenj9Q",
"attributes": {
"date": "2024-06-04",
"ccyCode": "DKK",
"dailyNetCashFLow": 0,
"dailyReturn": 843334,
"dailyTwr": 0.0045,
"accumulatedReturn": 843334,
"accumulatedTwr": 0.0045
},
"relationships": {
"reportingEntity": {
"data": { "type": "reporting-entity", "id": "649ad926fc1a10be9e2ea241" }
}
}
}
]
}
Summarized performance
One summarized-performance resource per currency and expanded grouping: the latest day of that grouping in the window, with window, month-to-date and day-to-date figures. Month-to-date covers the month of toDate; day-to-date figures are 0 when the grouping has no row on toDate.
Takes the same query parameters as the performance series. include=asset requires expand to contain assets itself (instruments does not count).
Attributes (in emitted order)
accumulatedNetCashFlownumberSum of net cash flow over the window.
accumulatedReturnnumberSum of return over the window.
accumulatedTwrnumberChained TWR over the window.
ccyCodestringCurrency of the figures.
dayToDateNetCashFlownumberNet cash flow on
toDate.dayToDateReturnnumberReturn on
toDate.dayToDateTwrnumberTWR on
toDate.datedateThe grouping's latest date in the window.
monthToDateNetCashFlownumberNet cash flow in the month of
toDate.monthToDateReturnnumberReturn in the month of
toDate.monthToDateTwrnumberChained TWR in the month of
toDate.
Errors (in the order they are checked)
400Invalid expand parameter: {expand}. Supported values: portfolios, depositories, assets, assetClasses, assetClassesDetailed.400Missing or empty query parameter: fromDate or toDate422Dates must use the following format: yyyy-MM-dd.400FromDate must be before toDate.500An error occurred while processing your request.—{id}is not a 24-character hex ObjectId.404'reporting-entity' resource with ID '{id}' not found.400Cannot include asset data if 'expand' is not set to 'assets'.
curl -G https://api.aleta.ai/api/v2/summarized-performance/reporting-entities/{id} \
-H "Authorization: Bearer {access_token}" \
-d fromDate=2024-01-01 \
-d toDate=2024-01-02 \
-d expand=portfolios
{
"data": [
{
"type": "summarized-performance",
"id": "ceHxkb61yDEOD3ibMr1GYA",
"attributes": {
"accumulatedNetCashFlow": 14,
"accumulatedReturn": 14,
"accumulatedTwr": 0,
"ccyCode": "EUR",
"dayToDateNetCashFlow": 11,
"dayToDateReturn": 11,
"dayToDateTwr": 0,
"date": "2024-01-02",
"monthToDateNetCashFlow": 14,
"monthToDateReturn": 14,
"monthToDateTwr": 0
},
"relationships": {
"reportingEntity": {
"data": { "id": "6710efbc34673a0a646a45de", "type": "reporting-entity" }
},
"portfolio": {
"data": { "id": "6710efbc34673a0a646a45e1", "type": "portfolio" }
}
}
}
]
}