Assets
Data model
Bond
JSON:API resource type bond-asset.
ccyCodestringRequired. ISO 4217 code for the bond's currency. Examples: "USD", "EUR", "DKK".
countryCodestringRequired. ISO 3166-1 alpha-2 code representing the bond issuer's domicile. Examples: "US", "DE", "DK".
couponFrequencystringRequired. Specifies how often the coupon payment occurs. Possible values: "quarterly", "semiannually", "annually". Some assets will have a value of "other", but new assets can not be created with this value.
datedDatestringOptional. ISO 8601 representation of the start date for accrued interest calculation.
dayCountConventionstringRequired. Specifies the method used to calculate interest accruals. Possible values: "actual/actual", "30/360", "actual/360". Some assets will have a value of "other", but new assets can not be created with this value.
firstCouponDatestringOptional. ISO 8601 representation of the first coupon date.
maturityDatestringOptional. ISO 8601 representation of the bond's maturity date.
namestringRequired. Display name of the bond.
securityIdentifierstringRequired. Security identifier of the asset.
Fee
JSON:API resource type fee-asset.
namestringRequired. Name of the asset.
categorystringRequired. Type of fee. Possible values: "custody", "management", "other".
FX forward, cash settlement
JSON:API resource type fx-forward-cash-settlement-asset.
agreementDatestringRequired. ISO 8601 representation of the date when the FX forward was agreed upon.
fixingDatestringRequired. ISO 8601 representation of the date on which the difference between the spot rate and the agreed forward rate is calculated.
notionalAmountnumberRequired. The agreed-upon amount for the FX forward, denominated in the contract's primary currency.
primaryCcyCodestringRequired. ISO 4217 code for the currency in which the notional amount is denominated. Examples: "USD", "EUR", "DKK".
secondaryCcyCodestringRequired. ISO 4217 code for the currency in which the settlement amount is denominated. Examples: "USD", "EUR", "DKK".
securityIdentifierstringRequired. Security identifier of the asset.
settlementAmountnumberRequired. The agreed settlement amount, denominated in the contract's secondary currency.
settlementDatestringRequired. ISO 8601 representation of the date the FX forward is settled.
Relationships
accountaccountThe account the cash settlement will affect.
FX forward, physical delivery
JSON:API resource type fx-forward-physical-delivery-asset.
agreementDatestringRequired. ISO 8601 representation of the date when the FX forward was agreed upon.
fixingDatestringRequired. ISO 8601 representation of the date on which the difference between the spot rate and the agreed forward rate is calculated.
notionalAmountnumberRequired. The notional amount, denominated in the currency of the primary account.
securityIdentifierstringRequired. Security identifier of the asset.
settlementAmountnumberRequired. The agreed settlement amount, denominated in the currency of the secondary account.
settlementDatestringRequired. ISO 8601 representation of the date the FX forward is settled.
Relationships
primaryAccountaccountThe account associated with the notional amount.
secondaryAccountaccountThe account associated with the settlement amount.
Index-linked bond
JSON:API resource type index-linked-bond-asset.
ccyCodestringRequired. ISO 4217 code for the bond's currency. Examples: "USD", "EUR", "DKK".
countryCodestringRequired. ISO 3166-1 alpha-2 code representing the bond issuer's domicile. Examples: "US", "DE", "DK".
couponFrequencystringRequired. Specifies how often the coupon payment occurs. Possible values: "quarterly", "semiannually", "annually". Some assets will have a value of "other", but new assets can not be created with this value.
datedDatestringOptional. ISO 8601 representation of the start date for accrued interest calculation.
dayCountConventionstringRequired. Specifies the method used to calculate interest accruals. Possible values: "actual/actual", "30/360", "actual/360". Some assets will have a value of "other", but new assets can not be created with this value.
firstCouponDatestringOptional. ISO 8601 representation of the first coupon date.
maturityDatestringOptional. ISO 8601 representation of the bond's maturity date.
namestringRequired. Display name of the bond.
securityIdentifierstringRequired. Security identifier of the asset.
Loan
JSON:API resource type loan-asset.
agreementDatestringRequired. ISO 8601 representation of the date when the loan was agreed upon.
dayCountConventionstringRequired. The method used to calculate interest. Possible values: "actual/actual", "30/360", "actual/360". Some assets will have a value of "other", but new assets can not be created with this value.
interestRateInPercentnumberRequired when creating a loan; not part of the payload when retrieving one. The fixed interest rate for the loan, expressed as a percentage (e.g., 1.5 for 1.5%). This should usually be a positive number, as the sign of the principal amount affects the sign of the accruing interest, but in unusual periods with negative interest rates it can be negative.
maturityDatestringRequired. ISO 8601 representation of the date when the loan matures.
principalAmountnumberRequired. The agreed-upon amount for the loan, denominated in the account's currency. A positive value represents receivables (an asset), while a negative value represents payables (a liability).
securityIdentifierstringRequired. Security identifier of the asset.
Relationships
accountaccountThe account the loan will affect.
Mutual fund
JSON:API resource type mutual-fund-asset.
ccyCodestringRequired. ISO 4217 code for the mutual fund's currency. Examples: "USD", "EUR", "DKK".
countryCodestringRequired. ISO 3166-1 alpha-2 code representing the mutual fund issuer's domicile. Examples: "US", "DE", "DK".
namestringRequired. Display name of the mutual fund.
securityIdentifierstringRequired. Security identifier of the asset.
Refund
JSON:API resource type refund-asset.
namestringRequired. Name of the asset.
Stock
JSON:API resource type stock-asset.
ccyCodestringRequired. ISO 4217 code for the stock's currency. Examples: "USD", "EUR", "DKK".
countryCodestringRequired. ISO 3166-1 alpha-2 code representing the company's domicile. Examples: "US", "DE", "DK".
namestringRequired. Display name of the stock.
securityIdentifierstringRequired. Security identifier of the asset.
Zero coupon bond
JSON:API resource type zero-coupon-bond-asset.
ccyCodestringRequired. ISO 4217 code for the bond's currency. Examples: "USD", "EUR", "DKK".
countryCodestringRequired. ISO 3166-1 alpha-2 code representing the bond issuer's domicile. Examples: "US", "DE", "DK".
maturityDatestringOptional. ISO 8601 representation of the bond's maturity date.
namestringRequired. Display name of the bond.
securityIdentifierstringRequired. Security identifier of the asset.
Other
JSON:API resource type other-asset. This type represents a range of other, more uncommon types of assets in the system. Assets of this type can only be retrieved, not created.
securityIdentifierstringRequired. Security identifier of the asset.
Retrieve an asset
Parameters
idstringPath, required. Asset identifier.
curl https://api.aleta.ai/api/v2/assets/5e6a90cf921d8b1874c32ed5 \
-H "Authorization: Bearer {access_token}"
{
"data": {
"id": "5e6a90cf921d8b1874c32ed5",
"type": "bond-asset",
"attributes": {
"ccyCode": "DKK",
"countryCode": "DK",
"couponFrequency": "quarterly",
"dayCountConvention": "actual/actual",
"firstCouponDate": "2010-07-01",
"datedDate": "2010-04-23",
"maturityDate": "2041-07-01",
"name": "4% Nordea Kre 41",
"securityIdentifier": "DK0002024876"
}
}
}
Create an asset
Create a new asset.
New Fee, Refund and Other type assets can not be created; a request with any other resource type answers 400.
Date attributes must be yyyy-MM-dd; any other format answers 400. For loans and FX forwards, every account in relationships must exist (an unknown account answers 404), the asset's name is its securityIdentifier, a loan takes the currency of its account, and a physical delivery FX forward takes the currencies of its two accounts.
For the basic-data types, an asset whose securityIdentifier and ccyCode match a publicly traded security Aleta knows is created as a shared catalog asset; any other is private to your client.
Asset already exists
When attempting to create a bond, index-linked bond, mutual fund, stock or zero coupon bond with a combination of securityIdentifier and ccyCode that already exists in the system, the API responds with a 303 See Other redirection that provides a Location header, pointing to the GET /api/v2/assets/{id} endpoint where the asset can be found.
curl -X POST https://api.aleta.ai/api/v2/assets \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/vnd.json+api" \
-d '{
"data": {
"type": "bond-asset",
"attributes": {
"ccyCode": "DKK",
"countryCode": "DK",
"couponFrequency": "quarterly",
"dayCountConvention": "actual/actual",
"firstCouponDate": "2010-07-01",
"datedDate": "2010-04-23",
"maturityDate": "2041-07-01",
"name": "4% Nordea Kre 41",
"securityIdentifier": "DK0002024876"
}
}
}'
{
"data": {
"id": "5e6a90cf921d8b1874c32ed5",
"type": "bond-asset",
"attributes": {
"ccyCode": "DKK",
"countryCode": "DK",
"couponFrequency": "quarterly",
"dayCountConvention": "actual/actual",
"firstCouponDate": "2010-07-01",
"datedDate": "2010-04-23",
"maturityDate": "2041-07-01",
"name": "4% Nordea Kre 41",
"securityIdentifier": "DK0002024876"
},
"relationships": null
}
}
Delete an asset
Delete the asset given by id. An asset that is still referenced by transactions can not be deleted; the request answers 400.
Parameters
idstringPath, required. Asset identifier.
curl -X DELETE https://api.aleta.ai/api/v2/assets/6704d535298ab60100cbc56c \
-H "Authorization: Bearer {access_token}"
HTTP/1.1 204 No Content