You can create a transaction type to determine the precise economic impact of all the transactions belonging to that type on holdings.
Note the following:
LUSID provides a set of built-in transaction types. These are useful to get started, but not intended for a production system. See how to remove them.
Once created and referenced by live transactions in portfolios, you should only modify a transaction type under exceptional circumstances.
If you do modify a transaction type, the PUT
SetTransactionTypeAPI operates differently to the standard PUSHUpsert*model used elsewhere in LUSID. A transaction type is replaced rather than updated, so it's important to specify the entire definition each time. And note theSetTransactionTypeSourceAPI replaces all transaction types in a source (see below).
For examples of creating custom transaction types, see the following tutorials:
Using the LUSID REST API
Call the SetTransactionType API to create a transaction type for a particular source (see below)—or the SetTransactionTypeSource API to create all your transaction types for a source in a single operation—passing in your API token and specifying the following in the URL:
A
sourcegrouping the transaction type with others from the same data provider, for exampleGoldmanorBloomberg. You can choose to group with the built-in transaction types provided with LUSID in thedefaultsource if you wish.A
typespecifying a unique name for the transaction type in the source, for exampleBuyWithCommission. If the transaction type has only one alias (see below), this is the value of itstypefield. If the transaction type has more than one, choose the most appropriatetypefield value.Optionally, a
scopedomiciling the transaction type in a protected scope. If you omit this parameter, the transaction type is domiciled in thedefaultscope with the built-in transaction types.
In the body of the API request, specify:
At least one alias in the
aliasescollection.At least one movement in the
movementscollection.Optionally in the
propertiescollection, any number of custom properties to extend the data model of the transaction type. These must be from theTransactionConfigurationdomain.Optionally in the
propertiescollection, any of the available system properties to change specific behavior for all transactions belonging to the transaction type.
Using the LUSID web app
Navigate to the System Settings > Transaction Types dashboard and make sure the Transaction types tab is open (highlighted in red).
Click the Add transaction type button (highlighted in green) and follow the instructions.
Note: The Transaction Types dashboard displays one row per alias per transaction type, rather than one row per transaction type. This means that if you delete a row representing an alias you may inadvertently delete a whole transaction type. To delete an alias, choose to edit a row instead, and remove it using the Edit transaction type screen.
