Adding system properties to transactions and to transaction types

A system property is a built-in function that is either read-only or writable.

Note: You interact with a system property (that is, add, update and retrieve it) in the same way as a  custom property. A system property has a 3-stage key that is either in the protected system or default scope.

Adding transaction system properties

You can add any of the writable system properties in this table to a transaction and specify a value that LUSID can then use in a business operation.

Consider the following example of a call to the BatchUpsertTransactions API to upsert a foreign currency transaction, where:

  • The TradeToPortfolioRate system property specifies an exchange rate for the transaction currency to the portfolio currency, enabling LUSID to maintain the cost basis of the portfolio.

  • The TaxLotSelectionMethod system property overrides the default accounting method, set either on the transaction type (see below) or on the portfolio.

curl -X POST 'https://<your-domain>.lusid.com/api/api/transactionportfolios/Finbourne-Examples/Global-Equities/transactions/$batchUpsert?successMode=Partial' 
  -H 'Content-Type: application/json-patch+json'
  -H 'Authorization: Bearer <your-API-access-token>'
  -d '{
  "transactionRequest-1": {
    "transactionId": "Txn-0000001",
    "type": "Buy",
    "instrumentIdentifiers": {
      "Instrument/default/Figi": "BBG000C6K6G9",
    },
    "transactionDate": "2023-05-15T00:00:00.0000000+00:00",
    "settlementDate": "2023-05-18T00:00:00.0000000+00:00",
    "units": 1000,
    "transactionPrice": {
      "price": 120, "type": "Price"
    },
    "totalConsideration": {
      "amount": 120000, "currency": "GBP"
    },
    "properties": {
      "Transaction/default/TradeToPortfolioRate": {
        "key": "Transaction/default/TradeToPortfolioRate",
        "value": {
          "metricValue": {
            "value": 0.93,
            "unit": ""
          }
        }
      },
      "Transaction/default/TaxLotSelectionMethod": {
        "key": "Transaction/default/TaxLotSelectionMethod",
        "value": {
          "labelValue": "LowestCostFirst"
        }
      }
    }
  }
}'

Adding transaction type system properties

You can add any of the system properties in this table to a transaction type to change the default behavior for all the transactions belonging to that type.

Note: Some system properties are set on the transaction type itself, and some on an individual movement within the transaction type.

Consider the following example of a call to the SetTransactionType API to create a custom BuyProRated transaction type, where:

  • The TaxLotSelectionMethod system property (specified on the first movement) overrides the default accounting method, set on the portfolio.

  • The AllocationMethod system property (set on the transaction type itself) is set to Prorated to automatically split transactions that do not themselves have an SHK across all SHKs defined for the portfolio.

curl -X POST 'https://<your-domain>.lusid.com/api/api/transactionconfiguration/types/Bloomberg/BuyProRated?scope=default' 
  -H 'Content-Type: application/json-patch+json'
  -H 'Authorization: Bearer <your-API-access-token>'
  -d '{
   "aliases": [
     {
       "type": "BuyProRated",
       "description": "A custom transaction type to automatically split transactions across sub-holdings",
       "transactionClass": "Buy",
       "transactionRoles": "Longer",
       "isDefault": false
     },
   ],
   "movements": [
     {
       "movementTypes": "StockMovement",
       "side": "Side1",
       "direction": 1,
       "properties": {
         "TransactionConfiguration/default/TaxLotSelectionMethod": {
           "key": "TransactionConfiguration/default/TaxLotSelectionMethod",
           "value": {
             "labelValue": "LastInFirstOut"
           }
         }
       },
       "mappings": [],
       "movementOptions": []
     },
     {
       "movementTypes": "CashCommitment",
       "side": "Side2",
       "direction": -1,
       "properties": {},
       "mappings": [],
       "movementOptions": []
     }
   ],
   "properties": {
     "TransactionConfiguration/default/AllocationMethod": {
       "key": "TransactionConfiguration/default/AllocationMethod",
       "value": {
         "labelValue": "Prorated"
       }
     }
   }
  }'