---
title: "Input and output transactions"
slug: "input-and-output-transactions"
tags: ["input transaction", "output transaction"]
updated: 2025-10-31T12:02:19Z
published: 2025-10-31T12:02:19Z
canonical: "support.lusid.com/input-and-output-transactions"
---

> ## 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.

# Input and output transactions

For every transaction loaded into LUSID or created by the system, LUSID automatically generates and stores a corresponding *output transaction*:

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

In summary:

- An *input transaction* (often just called transaction) is one [loaded into LUSID](/v1/docs/how-do-i-create-or-update-a-transaction) using a proxy such as the REST API, SDK or web app.
- A *system-created transaction* is created by LUSID in response to an [instrument event](/v1/docs/what-is-an-event-in-lusid) or [holdings adjustment](/v1/docs/how-do-i-manually-adjust-or-set-holdings).
- An *output transactio*n retains all the user or system data and adds extra information such as a tax calculation or realised gain/loss.

LUSID is a transaction-based system. It does not maintain a static record of your holdings in a portfolio but rather [generates them on demand](/v1/docs/understanding-how-lusid-uses-transaction-types-to-generate-holdings) from the **stored history of output transactions**, replayed in order.

For example, consider the following economic activity impacting a particular portfolio over consecutive days:

| Effective date | **Activity** | Implementation |
| --- | --- | --- |
| 20 May 2023 | Holdings adjustment of 100 Microsoft shares | Created by LUSID in response to an [AdjustHoldings](https://www.lusid.com/docs/api#operation/AdjustHoldings) API call |
| 21 May 2023 | Purchase of 50 Microsoft shares | Loaded by the user |
| 22 May 2023 | Sale of 80 Microsoft shares | Loaded by the user |
| 23 May 2023 | Microsoft cash dividend: $0.20 per share | Created by LUSID in response to a [cash dividend instrument event](/v1/docs/handling-a-cash-dividend-corporate-action-event) |

LUSID generates the following output transactions to represent this economic activity:

| Sequence | **Effective at datetime** | **Transaction type** | **Output transaction origin** |
| --- | --- | --- | --- |
| 1 | 20 May 2023 00:00:00 | `AdjustmentIncrease` | System |
| 2 | 21 May 2023 00:00:00 | `Buy` | Input |
| 3 | 22 May 2023 00:00:00 | `Sell` | Input |
| 4 | 23 May 2023 00:00:00 | `DividendIncome` | System |

When you generate a holdings report on 24 May 2023, LUSID replays these transactions in *effective at* datetime order to calculate that we have 70 Microsoft shares and an increase in cash.

> **Note**: If these transactions had identical *effective at* datetimes then LUSID generates output transactions in a particular order, which is configurable in certain circumstances. [More information](/v1/docs/input-and-output-transactions#changing-the-order-in-which-certain-output-transactions-are-generated).

For a particular transaction portfolio, you can see the history of:

- Input transactions by calling the [GetTransactions](https://www.lusid.com/docs/api#operation/GetTransactions) API. In the LUSID web app, this API drives **Portfolio Management > Transactions** in **Input** mode: ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image(810).png)
- Output transactions by calling the [BuildTransactions](https://www.lusid.com/docs/api#operation/BuildTransactions) API with a particular window. In the LUSID web app, this API drives **Portfolio Management > Transactions** in **Output** mode (note this is the only way to see system-created transactions, in output transaction form): ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image(809).png)
- A particular transaction by calling the [GetTransactionHistory](https://www.lusid.com/docs/api#operation/GetTransactionHistory) API. This might be useful if that transaction has been updated during its lifetime.

## Changing the order in which certain output transactions are generated

If a set of input and system-created transactions have the same *effective at* datetime then LUSID generates output transactions in the following order:

1. System-created transactions in response to instrument events.
2. Input transactions in order of *as at* (that is, entry) datetime, unless modified by transaction types (see below). Note a modified transaction is still sequenced by its original *as at* entry datetime rather than its *as at* modified datetime.
3. System-created transactions in response to holdings adjustments.

Consider the same example above except this time the *effective at* datetimes are identical:

| Effective date | Entry date | **Activity** | Implementation |
| --- | --- | --- | --- |
| 20 May 2023 | T1 | Holdings adjustment of 100 Microsoft shares | Created by LUSID in response to an [AdjustHoldings](https://www.lusid.com/docs/api#operation/AdjustHoldings) API call |
| 20 May 2023 | T2 | Purchase of 50 Microsoft shares | Loaded by the user |
| 20 May 2023 | T3 | Sale of 80 Microsoft shares | Loaded by the user |
| 20 May 2023 | T4 | Microsoft cash dividend: $0.20 per share | Created by LUSID in response to a [cash dividend instrument event](/v1/docs/handling-a-cash-dividend-corporate-action-event) |

LUSID generates the following output transactions to represent this economic activity:

| Sequence | **Effective at datetime** | As at entry datetime | **Transaction type** | **Output transaction origin** |
| --- | --- | --- | --- | --- |
| 1 | 20 May 2023 00:00:00 | T2 | `Buy` | Input |
| 2 | 20 May 2023 00:00:00 | T3 | `Sell` | Input |
| 3 | 20 May 2023 00:00:00 | T1 | `AdjustmentIncrease` | System |

Note the following:

- The `DividendIncome` output transaction is *not* generated. This is because LUSID would normally process an instrument event first, but at T0 there is no holding in Microsoft, and so no entitlement to the dividend.
- The `Buy` output transaction is generated before the `Sell` output transaction. This is because, by default, LUSID generates output transactions with the same *effective at* datetime in *as at* entry datetime order.

It is possible to configure the order in which output transaction are generated from **input transactions only** using transaction types. So for example we could configure the `Buy` transaction type to have a *higher* transaction sequence number than the `Sell` transaction type, which means all `Buy` transactions have a *lower* priority than `Sell` transactions. [See how to do this](/v1/docs/what-is-a-transaction-type-calculation#transactionsequence-calculation).

The result of this configuration would be as follows:

| Sequence | **Effective at datetime** | As at entry datetime | **Transaction type** | **Output transaction origin** |
| --- | --- | --- | --- | --- |
| 1 | 20 May 2023 00:00:00 | T3 | `Sell` | Input |
| 2 | 20 May 2023 00:00:00 | T2 | `Buy` | Input |
| 3 | 20 May 2023 00:00:00 | T1 | `AdjustmentIncrease` | System |
