Providing you have suitable access control permissions, 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
SetTransactionType
API 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 theSetTransactionTypeSource
API replaces all transaction types in a source (see below).
For examples of creating custom transaction types, see the following tutorials:
- Ensuring the same transaction code has different economic impacts
- Reducing the cash balance by the cost of broker commission
- Breaking out broker commission as a separate cost holding
The following creation methods are available:
- Method 1: Using the LUSID REST API
- Method 2: Using the LUSID web app
Using the LUSID REST API
- Obtain an API access token.
- 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
source
grouping the transaction type with others from the same data provider, for exampleGoldman
orBloomberg
. You can choose to group with the built-in transaction types provided with LUSID in thedefault
source if you wish. - A
type
specifying 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 itstype
field. If the transaction type has more than one, choose the most appropriatetype
field value. - Optionally, a
scope
domiciling the transaction type in a protected scope. If you omit this parameter, the transaction type is domiciled in thedefault
scope with the built-in transaction types.
- A
- In the body of the API request, specify:
- At least one alias in the
aliases
collection. - At least one movement in the
movements
collection. - Optionally in the
properties
collection, any number of custom properties to extend the data model of the transaction type. These must be from theTransactionConfiguration
domain. - Optionally in the
properties
collection, any of the available system properties to change specific behavior for all transactions belonging to the transaction type.
- At least one alias in the
Using the LUSID web app
- Sign in to 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: