Views:

Related resources:

Explanation

Tutorials

Reference

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

  1. Obtain an API access token.
  2. Call the LUSID CreatePortfolio API for your LUSID domain, passing in your API access token, nominating a scope in the URL, and specifying in the request body:
    • A displayName.
    • A code unique within the scope.
    • A baseCurrency to which foreign currency transactions can be normalised upon provision of a trade to portfolio rate. This must be an ISO 4217 currency code, for example GBP or JPY.
    • A comma-separated list of SHKs in the subHoldingKeys collection. Each must be the 3-stage key of an existing property type in the Transaction domain.

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

  1. Obtain an API access token.
  2. Call the LUSID PatchPortfolioDetails API for your LUSID domain, passing in your API access token, and specifying the scope and code of the portfolio to modify in the URL.
  3. Specify an API request that adheres to the JSON PATCH specification, specifically:
    • An op of add.
    • A path of /subHoldingKeys.
    • A comma-separated list of SHKs in the value collection. Each must be the 3-stage key of an existing property type in the Transaction domain. 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"
  }
]'