Time series
Data model
Interest rate
JSON:API resource type interest-rate.
datestringRequired. ISO 8601 representation of the date from which the interest rate applies.
providerstringRead-only. Always "client": the list returns only the interest rates your client has created.
valuenumberRequired. The annual interest rate (pro anno) expressed as a decimal value.
Price
JSON:API resource type price.
datestringRequired. ISO 8601 representation of the date from which the price applies.
providerstringRead-only value that indicates whether the price has been created by the client or Aleta. Possible values: "client", "aleta". Aleta prices are only returned for direct investments and private equity assets.
valuenumberRequired. The numeric price value in the related asset's currency.
Index factor
JSON:API resource type index-factor.
datestringRequired. ISO 8601 representation of the date from which the index factor applies.
providerstringRead-only. Always "client": the list returns only the index factors your client has created.
valuenumberRequired. The index factor value.
Interest rates
List rates
Fetch interest rates for an asset with a given id. Returns the interest rates your client has created, one per date, newest first.
Parameters
idstringPath, required. Asset identifier.
curl https://api.aleta.ai/api/v2/assets/5e6a90cf921d8b1874c32ed5/interest-rates \
-H "Authorization: Bearer {access_token}"
{
"data": [
{
"id": "f2d93a1df9ffeb8aa6c140be",
"type": "interest-rate",
"attributes": {
"date": "1900-01-01",
"value": 0.05,
"provider": "client"
}
}
]
}
Create a rate
The body takes date (yyyy-MM-dd) and value (number), both required, with resource type interest-rate.
Interest rates can only be added to bonds, index-linked bonds that pay interest, and loans. Other assets, including zero coupon bonds, answer 400. Posting a rate for a date that already has one of your rates replaces its value and keeps its id.
Parameters
idstringPath, required. Asset identifier.
curl -X POST https://api.aleta.ai/api/v2/assets/5e6a90cf921d8b1874c32ed5/interest-rates \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/vnd.json+api" \
-d '{
"data": {
"type": "interest-rate",
"attributes": { "date": "1900-01-01", "value": 0.05 }
}
}'
{
"data": {
"id": "f2d93a1df9ffeb8aa6c140be",
"type": "interest-rate",
"attributes": {
"date": "1900-01-01",
"value": 0.05,
"provider": "client"
},
"relationships": null
}
}
Delete a rate
Delete the interest rate given by id.
Parameters
idstringPath, required. Interest rate identifier.
curl -X DELETE https://api.aleta.ai/api/v2/interest-rates/66991875143aa32c6619d648 \
-H "Authorization: Bearer {access_token}"
HTTP/1.1 204 No Content
Prices
List prices
Fetch prices for an asset with a given id. Returns one price per date, newest first.
Parameters
idstringPath, required. Asset identifier.
curl https://api.aleta.ai/api/v2/assets/5f0475d37fe83b140c415d8f/prices \
-H "Authorization: Bearer {access_token}"
{
"data": [
{
"id": "6684eb68e9a978c0a6cd0303",
"type": "price",
"attributes": {
"date": "2024-07-02",
"value": 220.27,
"provider": "client"
}
},
{
"id": "668399e8e9a978c0a636a94c",
"type": "price",
"attributes": {
"date": "2024-07-01",
"value": 216.75,
"provider": "client"
}
}
]
}
Create a price
The body takes date (yyyy-MM-dd) and value (number), both required, with resource type price.
If your client already has a price for the asset on that date, the request answers 403. Use PATCH /api/v2/prices/{id} to change it.
Parameters
idstringPath, required. Asset identifier.
curl -X POST https://api.aleta.ai/api/v2/assets/6699152b115c90d14ceae709/prices \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/vnd.json+api" \
-d '{
"data": {
"type": "price",
"attributes": { "date": "2024-07-03", "value": 221.55 }
}
}'
{
"data": {
"id": "66991875143aa32c6619d648",
"type": "price",
"attributes": {
"date": "2024-07-03",
"value": 221.55,
"provider": "client"
},
"relationships": null
}
}
Update a price
Update the price given by id. Only value can be changed: a date that differs from the stored date answers 400, and a body without value changes nothing and answers 204.
Parameters
idstringPath, required. Price identifier.
curl -X PATCH https://api.aleta.ai/api/v2/prices/66991875143aa32c6619d648 \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/vnd.json+api" \
-d '{
"data": {
"type": "price",
"attributes": { "value": 221.75 }
}
}'
HTTP/1.1 204 No Content
Delete a price
Delete the price given by id.
Parameters
idstringPath, required. Price identifier.
curl -X DELETE https://api.aleta.ai/api/v2/prices/66991875143aa32c6619d648 \
-H "Authorization: Bearer {access_token}"
HTTP/1.1 204 No Content
Index factors
List factors
Fetch index factors for an asset with a given id. Returns the index factors your client has created, one per date, newest first.
Parameters
idstringPath, required. Asset identifier.
curl https://api.aleta.ai/api/v2/assets/5f0475d37fe83b140c415d8f/index-factors \
-H "Authorization: Bearer {access_token}"
{
"data": [
{
"id": "6684eb68e9a978c0a6cd0303",
"type": "index-factor",
"attributes": {
"date": "2024-07-02",
"value": 118.9,
"provider": "client"
}
},
{
"id": "668399e8e9a978c0a636a94c",
"type": "index-factor",
"attributes": {
"date": "2024-07-01",
"value": 118.75,
"provider": "client"
}
}
]
}
Create a factor
Create an index factor for an asset with a given id. The body takes date (yyyy-MM-dd) and value (number), both required, with resource type index-factor.
Index factors can only be added to index-linked bonds; other assets are refused with 400, or 404 for loans and FX forwards. If your client already has an index factor for the asset on that date, the request answers 403.
Parameters
idstringPath, required. Asset identifier.
curl -X POST https://api.aleta.ai/api/v2/assets/6699152b115c90d14ceae709/index-factors \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/vnd.json+api" \
-d '{
"data": {
"type": "index-factor",
"attributes": { "date": "2024-07-03", "value": 118.55 }
}
}'
{
"data": {
"id": "66991875143aa32c6619d648",
"type": "index-factor",
"attributes": {
"date": "2024-07-03",
"value": 118.55,
"provider": "client"
},
"relationships": null
}
}
Delete a factor
Delete the index factor given by id.
Parameters
idstringPath, required. Index factor identifier.
curl -X DELETE https://api.aleta.ai/api/v2/index-factors/66991875143aa32c6619d648 \
-H "Authorization: Bearer {access_token}"
HTTP/1.1 204 No Content