---
title: "How do I create a transaction fee type?"
slug: "how-do-i-create-a-transaction-fee-type"
updated: 2026-07-07T12:49:55Z
published: 2026-07-07T12:49:55Z
canonical: "support.lusid.com/how-do-i-create-a-transaction-fee-type"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://support.lusid.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How do I create a transaction fee type?

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.

Note the transactions to which the fee applies, and whether fee amounts are capitalised or not, is determined by calculations on the [transaction type](/v1/docs/what-is-a-transaction-type-calculation#fee-calculation).

## Methods

LUSID web appLUSID APILuminesce

Call the [CreateTransactionFeeType](https://www.lusid.com/docs/api/lusid/endpoints/transaction-fee-types/CreateTransactionFeeType) API:

```json
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:

![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image-SI814527.png)

*Coming soon*

## Data fields and properties

This section supplements the [API documentation](https://www.lusid.com/docs/api/lusid/endpoints/transaction-fee-types/CreateTransactionFeeType) 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 in which to store the result of the calculation. You can examine this on an [output transaction](/v1/docs/input-and-output-transactions).

Set `isActive` to `False` to deactivate the fee calculation. By default, it is always 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](/v1/docs/derivation-formulas-part-1-operations-and-allowed-values#if-then-else) if desired.

| **Example** | **Fee amount is…** |
| --- | --- |
| `calculation.formula = "10"` | Always 10 |
| `calculation.formula = "(10 / 5) + 0.5"` | Always 2.5 |
| `calculation.formula = "Properties[Transaction/default/GrossConsideration] * (2 / 100)"` | 2% of the gross consideration |
| `calculation.formula = "If(Instrument.InstrumentDefinition.InstrumentType eq 'Equity') then Transaction.totalConsideration.amount / 10 else Properties[Transaction/default/GrossConsideration] / 10"` | 10% of the total consideration if the transaction is in an equity, otherwise 10% of the gross consideration |

You must specify a `condition`:

- Specify `True` to always calculate the fee amount for applicable transactions.
- Use LUSID [filter syntax](/v1/docs/filtering-information-retrieved-from-lusid) to only calculate the fee amount in certain circumstances. You can include any field or property from a portfolio or transaction in the condition. You can optionally chain expressions using the `and` and `or` operators if desired.

| **Example** | **Fee amount is…** |
| --- | --- |
| `condition="True"` | Always calculated for every applicable transaction |
| `condition = "Transaction.totalConsideration.amount gt 2000"` | Only calculated for transactions with a total consideration of more than 2000 |
| `condition = "Transaction.units gte 100 and Transaction.Properties[Transaction/Broker/Commission] exists"` | Only calculated for transactions of 100 units or more that record broker commission |
| `condition = "Portfolio.baseCurrency eq 'GBP'"` | Only calculated for transactions in GBP portfolios |
| `condition = "Portfolio.Properties[Portfolio/Manager/Name] in 'John Doe', 'Jane Doe'"` | Only calculated for transactions in portfolios managed by John Doe or Jane Doe |
| `condition = "Transaction.units gt 100 and Portfolio.created gte 2024-01-01"` | 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](/v1/docs/properties) from the `TransactionFeeType` domain.

## Subsequent updates

You can update some aspects of a transaction fee type by calling the [UpdateTransactionFeeType](https://www.lusid.com/docs/api/lusid/endpoints/transaction-fee-types/UpdateTransactionFeeType) API. Note you cannot change the `scope`, `code`, `displayName` or `txnPropertyKey` fields.

For information about updating or deleting properties, see [this article](/v1/docs/updating-or-deleting-properties).
