You can create a transaction fee type for a particular fee (for example, a broker fee) that determines how LUSID should calculate fee amounts, and nominates a property in which to store the result for applicable transactions.
Note the transactions to which the fee applies, and whether fee amounts are capitalised or not, is determined by calculations on the transaction type.
Methods
Call the CreateTransactionFeeType API:
curl -X POST 'https://<your-domain>.lusid.com/api/api/transactions/MyFeeTypes/MyBrokerFee'
-H 'Content-Type: application/json-patch+json'
-H 'Authorization: Bearer <your-API-access-token>'
-d '{
"displayName": "Broker fee",
"description": "Broker commission fee for transactions",
"calculation": {
"formula": "Transaction.totalConsideration.amount * 0.002"
},
"condition": "Properties[Transaction/default/ExecutionBroker] eq 'BrokerA' and Transaction.transactionCurrency eq 'USD'",
"txnPropertyKey": "Transaction/MyFees/BrokerResult",
"properties": {},
"isActive": true
}'Navigate to Data Management > Transaction Fees and click the Create transaction fee button:

Coming soon
Data fields and properties
This section supplements the API documentation and on-screen help text in the LUSID web app.
Fields
A transaction fee type is identified by a scope and a code that must be unique within that scope.
You must specify a txnPropertyKey that is the three-stage key of a property type in the Transaction domain to store the result of the calculation. You can examine this on an output transaction.
Set isActive to False to deactivate the fee calculation. By default, it is active.
You must specify a calculation.formula that determines how LUSID should calculate the fee. Note the field is a string but the expression must evaluate to a number. You can hard-code an amount or use the + - / * ^ mathematical operators on literals or on transaction fields and properties that return numbers. You can optionally use LUSID derived property conditional statements if desired.
Example | Fee amount is… |
|---|---|
| Always 10 |
| Always 2.5 |
| 2% of the gross consideration |
| 10% of the total consideration if the transaction is in an equity, otherwise 10% of the gross consideration |
You must specify a condition:
Specify
Trueto always calculate the fee amount for applicable transactions.Use LUSID filter syntax to only calculate the fee amount in certain circumstances. You can include any field or property from a portfolio or transaction in the condition, including the transaction’s underlying instrument type. You can optionally chain expressions using the
andandoroperators if desired.
Example | Fee amount is… |
|---|---|
| Always calculated for every applicable transaction |
| Only calculated for transactions in equities |
| Only calculated for transactions with a total consideration of more than 2000 |
| Only calculated for transactions of 100 units or more that record broker commission |
| Only calculated for transactions in GBP portfolios |
| Only calculated for transactions in portfolios managed by John Doe or Jane Doe |
| Only calculated for transactions of more than 100 units in 2024+ portfolios |
Properties
You can optionally extend the data model of a transaction fee type by adding properties from the TransactionFeeType domain.
Subsequent updates
You can update some aspects of a transaction fee type by calling the UpdateTransactionFeeType API. Note you cannot change the scope, code, displayName or txnPropertyKey fields.
For information about updating or deleting properties, see this article.