You can set or adjust holdings directly in a portfolio using the LUSID API or Luminesce. You cannot currently use the LUSID web app.
Methods
Call the:
BatchSetHoldings API to make the whole portfolio match the request. Holdings you leave out, including cash, go to zero.
BatchAdjustHoldings API to change only the holdings in the request.
Choose a successMode:
Atomic: If any holding fails validation, LUSID writes nothing. Use this forBatchSetHoldings, since inPartialmode a holding that fails validation is left out of the set, so LUSID reduces it to zero.Partial(the default): LUSID writes the valid holdings and reports the rest as failed.
Note: LUSID also has non-batch
SetHoldingsandAdjustHoldingsAPIs, which take a single effective date for the whole request. We recommend the batch APIs.
Both batch APIs accept multiple holdings, each with its own effectiveAt and keyed by an ID of your choice, which LUSID uses to report failures. For example, to set a portfolio to a total of two holdings (5,000 BP shares in a growth strategy and £25,000 of cash) on 31 October 2026:
curl -X POST 'https://<your-domain>.lusid.com/api/api/transactionportfolios/MyScope/MyCode/holdings/$batchSet?successMode=Atomic'
-H 'Content-Type: application/json-patch+json'
-H 'Authorization: Bearer <your-API-access-token>'
-d '{
"bp": {
"effectiveAt": "2026-10-31T00:00:00Z",
"instrumentIdentifiers": {"Instrument/default/Figi": "BBG000C05BD1"},
"subHoldingKeys": {
"Transaction/MySHKs/Strategy": {
"key": "Transaction/MySHKs/Strategy",
"value": {"labelValue": "Growth"}
}
},
"properties": {
"Holding/MyProperties/Analyst": {
"key": "Holding/MyProperties/Analyst",
"value": {"labelValue": "J Smith"}
}
},
"taxLots": [
{
"units": 5000,
"cost": {"amount": 50000, "currency": "GBP"},
"portfolioCost": 50000,
"price": 10,
"purchaseDate": "2025-03-14T00:00:00Z",
"settlementDate": "2025-03-18T00:00:00Z"
}
]
},
"gbp-cash": {
"effectiveAt": "2026-10-31T00:00:00Z",
"instrumentIdentifiers": {"Instrument/default/LusidInstrumentId": "CCY_GBP"},
"taxLots": [{"units": 25000, "cost": {"amount": 25000, "currency": "GBP"}}]
}
}'Note the following:
The
Transaction/MySHKs/Strategysub-holding key puts the BP shares in aGrowthsub-holding. The key must be registered with the portfolio.The
Holding/MyProperties/Analystproperty records the analyst responsible on the BP holding.The
purchaseDateandsettlementDaterecord that the manager originally bought the lot in March 2025.The cash holding is identified by the LUID of the currency,
CCY_GBP.
Write a Luminesce SQL query using the Lusid.Portfolio.Holding.Writer provider and execute it from a tool such as the LUSID web app. The WriteAction column determines the operation:
| Effect |
|---|---|
| Adjust holdings |
| Set holdings |
| Cancel every set and adjust at |
| Cancel the adjustment to one holding (adjusts only; see below) |
Each row is one tax lot, and rows with the same instrument and sub-holding keys form one holding. LUSID groups rows by portfolio and EffectiveAt, and writes each group all-or-nothing. For example:
@holdings = values
('LUID_00003HDS', 5000, 50000, 10),
('CCY_GBP', 25000, 25000, 1);
@table_of_data = select 'MyScope' as PortfolioScope, 'MyCode' as PortfolioCode, #2026-11-07# as EffectiveAt,
column1 as LusidInstrumentId, column2 as Units, column3 as CostAmount, column4 as CostPrice,
'GBP' as CostCurrency, 'Set' as WriteAction
from @holdings;
select * from Lusid.Portfolio.Holding.Writer where ToWrite = @table_of_data;Request fields
This section supplements the API documentation.
You must specify at least one tax lot. Together, the tax lots make up the holding. To set a holding lot by lot, send multiple. LUSID matches them to the holding's existing lots on purchaseDate and price.
To remove a holding, send one tax lot with units of 0.
Mandatory fields | Explanation |
|---|---|
| The date or cut label on which the portfolio should match this holding. The output transactions that LUSID generates have a trade date and settlement date equal to |
| At least one unique instrument identifier, as a three-stage key and a value, for example If LUSID can't resolve an instrument, it still accepts the holding and returns an |
| The number of units in the lot. For cash, this is the amount. |
Selected optional fields | Explanation |
| The currency of the holding. LUSID keeps one holding per instrument per currency. If you omit this, LUSID uses |
| One or more sub-holding keys (SHKs) registered with the portfolio. These must be properties from the If you omit this, LUSID targets the holding with no sub-holding key values. A set reduces any sub-holding you don't send to zero. |
| The |
| Properties from the |
| The total cost of the lot, in the holding currency. If you omit |
| The total cost of the lot in the portfolio's base currency. Specify this if the holding currency is different from the base currency. If you omit this, LUSID derives it from |
| The price per unit at which the lot was bought. Together with |
| When the lot was originally bought and settled. These dates are often well before They don't change when the adjustment takes effect or settles. LUSID keeps them on the tax lot. Where they differ from |
| For instruments that need them: notional cost and variation margin for margined instruments such as futures; amortised cost and current face for bonds and asset-backed securities; and carried-forward chargeable-gains balances for UK life funds. |
Correcting one position in a set
You don't need to resend a whole positions file to make a single correction (for example) to the number of units in a lot. Instead:
Adjust holdings for just that instrument, with the correct units and cost.
Use exactly the same
effectiveAtas the original set.
LUSID replaces that one holding in the 31 October target and keeps the rest of the set. The date still behaves as a full set, so holdings you didn't send are still zero.
Note the following:
Order matters. LUSID applies writes at the same
effectiveAtin the order you make them. If you set holdings at that date again, for example because the manager resends the file, the new set replaces your correction and you need to adjust again.You can't edit the
AdjustmentIncreaseorAdjustmentDecreaseoutput transactions that LUSID generates. Change the target instead.If you'd rather book a transaction, book it for the difference, not the replacement amount. Give it a trade time later than the set's
effectiveAt, because a transaction at exactly the same time is absorbed by the set. Find out more about ordering on the same date.
Viewing sets and adjusts
To see:
Resulting holdings, generate a holdings report as normal.
Generated output transactions, call the BuildTransactions API, or view output transactions in the web app. You can filter on the
sourceTypefield forHoldingAdjustmentto see all. Note they are read-only.The targets you sent, call ListHoldingsAdjustments to find dates where a set or adjust operation occurred, and GetHoldingsAdjustment for one of these dates to retrieve details. An
UnmatchedHoldingMethodofPositionToZeromeans a set, andKeepTheSamemeans an adjust. For Luminesce, query the Lusid.Portfolio.HoldingAdjustment provider.
Cancelling a set or adjust
Call the:
CancelAdjustHoldings API to remove every set and adjust at an
effectiveAt. The portfolio reverts to what its transactions produce.CancelSingleAdjustHolding API to remove the adjustment to one holding. It works only where the date has adjusts alone; if the date has a set, LUSID ignores the request. To change one holding in a set, adjust it instead.