Providing you have suitable access control permissions, you can register one or more sub-holding keys (SHKs) with a transaction portfolio in order to divide holdings into strategies.
You can register a set of SHKs when you create a portfolio, and subsequently modify the set at any time.
Registering SHKs when you create a portfolio
Call the LUSID CreatePortfolio API for your LUSID domain, passing in your API access token, nominating a
scopein the URL, and specifying in the request body:A
displayName.A
codeunique within thescope.A
baseCurrencyto which foreign currency transactions can be normalised upon provision of a trade to portfolio rate. This must be an ISO 4217 currency code, for exampleGBPorJPY.A comma-separated list of SHKs in the
subHoldingKeyscollection. Each must be the 3-stage key of an existing property type in theTransactiondomain.
For example:
curl -X POST "https://<your-domain>.lusid.com/api/api/transactionportfolios/Ibor"
-H "Authorization: Bearer <your-API-access-token>"
-H "Content-Type: application/json-patch+json"
-d '{
"displayName": "UK equity transaction portfolio",
"code": "UK-Equity",
"created": "2023-01-01T00:00:00Z",
"baseCurrency": "GBP",
"subHoldingKeys": ["Transaction/Strategy/Signal", "Transaction/Cash/Category"],
}'Modifying an existing portfolio to add or remove SHKs
Call the LUSID PatchPortfolioDetails API for your LUSID domain, passing in your API access token, and specifying the
scopeandcodeof the portfolio to modify in the URL.Specify an API request that adheres to the JSON PATCH specification, specifically:
An
opofadd.A
pathof/subHoldingKeys.A comma-separated list of SHKs in the
valuecollection. Each must be the 3-stage key of an existing property type in theTransactiondomain. Note that existing SHKs are replaced, so include them in the list to retain.
For example:
curl -X POST "https://<your-domain>.lusid.com/api/api/transactionportfolios/Ibor/UK-Equity/details"
-H "Authorization: Bearer <your-API-access-token>"
-H "Content-Type: application/json-patch+json"
-d '[
{
"value": ["Transaction/Client/AccountType", "Transaction/Strategy/Signal", "Transaction/Portfolio/Manager"],
"path": "/subHoldingKeys",
"op": "add"
}
]'