---
title: "How do I create a transaction type?"
slug: "how-do-i-create-a-transaction-type"
updated: 2025-02-03T16:39:53Z
published: 2025-02-03T16:39:53Z
canonical: "support.lusid.com/how-do-i-create-a-transaction-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 type?

You can create a [transaction type](/v1/docs/what-is-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](/v1/docs/what-built-in-transaction-types-and-sides-are-provided-with-lusid). These are useful to get started, but not intended for a production system. [See how to remove them](/v1/docs/how-do-i-remove-the-built-in-transaction-types-and-sides).
- 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 PUSH `Upsert*` 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 the `SetTransactionTypeSource` 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](/v1/docs/ensuring-the-same-transaction-code-has-different-economic-impacts)
- [Reducing the cash balance by the cost of broker commission](/v1/docs/reducing-the-cash-balance-by-the-cost-of-broker-commission)
- [Breaking out broker commission as a separate cost holding](/v1/docs/breaking-out-broker-commission-as-a-separate-cash-holding)

## Using the LUSID REST API

1. Call the [SetTransactionType](https://www.lusid.com/docs/api/#operation/SetTransactionType) API to create a transaction type for a particular source (see below)—or the [SetTransactionTypeSource](https://www.lusid.com/docs/api/#operation/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:

[More information on scopes and sources](/v1/docs/grouping-related-transaction-types-using-scopes-and-sources).
  - A `source` grouping the transaction type with others from the same data provider, for example `Goldman` or `Bloomberg`. You can choose to group with the [built-in transaction types](/v1/docs/what-built-in-transaction-types-and-sides-are-provided-with-lusid) provided with LUSID in the `default` source if you wish.
  - A `type` specifying a unique name for the transaction type in the source, for example `BuyWithCommission`. If the transaction type has only one alias (see below), this is the value of its `type` field. If the transaction type has more than one, choose the most appropriate `type` field value.
  - Optionally, a `scope` domiciling the transaction type in a protected scope. If you omit this parameter, the transaction type is domiciled in the `default` scope with the built-in transaction types.
2. In the body of the API request, specify:
  - At least one [alias](/v1/docs/what-is-a-transaction-type-alias) in the `aliases` collection.
  - At least one [movement](/v1/docs/what-is-a-movement) in the `movements` collection.
  - Optionally in the `properties` collection, any number of [custom properties](/v1/docs/properties) to extend the data model of the transaction type. These must be from the `TransactionConfiguration` domain.
  - Optionally in the `properties` collection, any of the available [system properties](/v1/docs/adding-system-properties-to-transactions-and-to-transaction-types#adding-transaction-system-properties) to change specific behavior for all transactions belonging to the transaction type.

## Using the LUSID web app

1. [Sign in to the LUSID web app](https://www.lusid.com/app/home).
2. Navigate to the **System Settings > Transaction Types** dashboard and make sure the **Transaction types** tab is open (highlighted in red).
3. Click the **Add transaction type** button (highlighted in green) and follow the instructions.

> **Note:** The **Transaction Types** dashboard displays one row per [alias](/v1/docs/what-is-a-transaction-type-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.

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