Providing you have suitable access control permissions, you can create a fee type describing a particular class of fees for a fund, for example legal fees or management fees. Work through a tutorial on fees.

A fee type is designed to determine how LUSID should record both fee accruals and fee payments by automatically generating appropriate transactions each time a fund valuation is finalised.

Once a fee type is created, you can add a fee of this type to a particular fund, optionally nominating a portfolio in which to generate fee transactions.

The following methods to create a fee type are available:

Using the LUSID web app

Coming soon.

Using the LUSID API

  1. Obtain an API access token.

  2. Call the CreateFeeType API, specifying a scope in the URL and, in the body of the request:

    • A code that, together with the scope, uniquely identifies the fee type in LUSID.

    • A name and, optionally, a description.

    • In the componentTransactions array, a template for at least one kind of transaction, for example transactions representing fee accruals. You can specify more than one transaction template to generate different kinds of transaction, for example transactions representing corresponding fee payables as well (this is recommended). Each template:

      • Must have a displayName.

      • Can have a condition. If omitted, a transaction is always generated. Note a condition uses LUSID's filter syntax, and expressions can be chained using the and and or operators.

      • Must have a transactionFieldMap object that provides instructions for populating the mandatory fields for a transaction in LUSID. You can specify a static value (of an appropriate data type) for each field, or use Mustache template syntax to insert the following variables:

        {{FundFee.feeInstrument}}
        {{FundFee.valuationPointDate}}
        {{FundFee.defaultFeeTransactionId}}
        {{FundFee.name}}
        {{FundFee.code}}
        {{FundFee.description}}
        {{FundFee.origin}}
        {{FundFee.feeCurrency}}
        {{FundFee.totalAnnualAccrualAmount}}
        {{FundFee.feeRatePercentage}}
        {{FundFee.startDate}}
        {{FundFee.endDate}}
        {{FundFee.amount}}
        {{FundFee.previousAccrual}}
        {{FundFee.totalAccrual}}

        This set may be extended in future. You can call the GetFeeTemplateSpecifications API to see the definitive list.

      • Can have a transactionPropertyMap object that creates properties in the Transaction domain to extend the data model of fee transactions.

Note: Once created, you can edit a fee type using the UpdateFeeType API.

Consider the following example, of a fee type with a scope of MyFeeTypes (in the URL) and code of LegalFees (in the body). There are two transaction templates, one for fee accruals and one for fee payables:

curl -X POST 'https://<your-domain>.lusid.com/api/api/feetypes/MyFeeTypes'
  -H 'Content-Type: application/json-patch+json'
  -H 'Authorization: Bearer <your-API-access-token>'
  -d '{
  "code": "LegalFees",
  "name": "Legal fees",
  "description": "Generating transactions to accrue and settle legal fees for funds",
  "componentTransactions": [
    {
      "displayName": "Transaction for legal fee accruals",
      "transactionFieldMap": {
        "transactionId": "{{FundFee.defaultFeeTransactionId}}-Accrual",
        "type": "FeeAccrual",
        "source": "default",
        "instrument": "{{FundFee.feeInstrument}}",
        "transactionDate": "{{FundFee.valuationPointDate}}",
        "settlementDate": "{{FundFee.valuationPointDate}}",
        "units": "{{FundFee.amount}}",
        "transactionPrice": {
          "price": "1.0",
          "type": "Price"
        },
        "transactionCurrency": "{{FundFee.feeCurrency}}",
        "exchangeRate": "1.0",
        "totalConsideration": {
          "currency": "{{FundFee.feeCurrency}}",
          "amount": "{{FundFee.amount}}"
        }
      },
      "transactionPropertyMap": []
    },
    {
      "displayName": "Transaction for legal fee payables",
      "transactionFieldMap": {
        "transactionId": "{{FundFee.defaultFeeTransactionId}}-Payable",
        "type": "FeePayment",
        "source": "default",
        "instrument": "{{FundFee.feeInstrument}}",
        "transactionDate": "{{FundFee.valuationPointDate}}",
        "settlementDate": "{{FundFee.valuationPointDate}}",
        "units": "{{FundFee.amount}}",
        "transactionPrice": {
          "price": "1.0",
          "type": "Price"
        },
        "transactionCurrency": "{{FundFee.feeCurrency}}",
        "exchangeRate": "1.0",
        "totalConsideration": {
          "currency": "{{FundFee.feeCurrency}}",
          "amount": "{{FundFee.amount}}"
        }
      },
      "transactionPropertyMap": []
    }
  ]
}'

Note the following:

  • The first template in the componentTransactions collection defines transactions for fee accruals. The second template defines transactions for fee payments.

  • The transactionId must be unique in a portfolio. The {{FundFee.defaultFeeTransactionId}} variable consists of the fee code and the valuation point date, which should be unique.

  • The type must be a transaction type that exists in the named source and confers a suitable economic impact on holdings and journal entry lines.

  • The transactionDate and settlementDate are set to the datetime of the finalised valuation point that triggers LUSID to automatically generate fee transactions.

Providing the request is successful, the response confirms that the fee type's unique identifier consists of its scope and code:

{
  "id": {
    "scope": "MyFeeTypes",
    "code": "LegalFees"
  },
  "name": "Legal fees",
  "description": "Generating transactions to accrue and settle legal fees for funds",
  "componentTransactions": [
    ...
}