Views:

Related resources:

Explanation

Tutorials

Reference

Instruments > How-to guides

It's not possible to completely delete (as in destroy) an instrument stored in the LUSID instrument master. This is because that instrument might be required to calculate holdings from historical transactions. 

However, providing you are a LUSID user with sufficient privileges, you can:

  • Hard delete a non-currency instrument. The instrument name is prefixed with DELETED and its state set to Deleted. All unique and non-unique identifiers (except the LUID) are removed and can be re-assigned. The instrument is no longer returned by the LUSID ListInstruments API; it can only be retrieved by a direct call to the GetInstrument API using the LUID.
  • Soft delete an instrument. The instrument state is set to Inactive. Unique identifiers only (except the LUID) are removed and can be re-assigned; the instrument retains its non-unique identifiers. The instrument is still returned by the ListInstruments API.

Note: If you are the LUSID domain owner, you are automatically assigned the built-in lusid-administrator role, which has all the permissions necessary to perform the operations in this article.

Once deleted (whether hard or soft):

  • Historical transactions in portfolios that originally resolved to this instrument will still do so. 
  • New transactions in portfolios that would have resolved to this instrument are mapped to the unknown instrument instead.

If you have created a new instrument and given it the unique identifier(s) of the deleted instrument, you can call the LUSID ResolveInstrument API with the reResolve parameter set to True to re-resolve all the transactions in a particular portfolio (new and historic) to the new instrument.

Note you cannot reactivate a deleted instrument.

Using the LUSID REST API

To call any LUSID API, first obtain an API access token.

Hard delete

Call the LUSID DeleteInstruments API for your LUSID domain, passing in your API access token, a delete mode of hard and a list of instruments (up to 2000) identified by LUID, for example:

curl -X POST "https://<your-domain>.lusid.com/api/api/instruments/$delete?deleteMode=Hard&scope=default"
   -H "Authorization: Bearer <your-API-access-token>"
   -H "Content-Type: application/json-patch+json"
   -d "[ 'LUID_ABCABCAB','LUID_DEFDEFDE']"

Soft delete

Call the LUSID DeleteInstruments API for your LUSID domain, passing in your API access token, a delete mode of soft and a list of instruments (up to 2000) identified by LUID, for example:

curl -X POST "https://<your-domain>.lusid.com/api/api/instruments/$delete?deleteMode=Soft&scope=default"
   -H "Authorization: Bearer <your-API-access-token>"
   -H "Content-Type: application/json-patch+json"
   -d "[ 'LUID_ABCABCAB','LUID_DEFDEFDE']"


Note: To soft delete a single instrument, you can alternatively call the LUSID DeleteInstrument API.

Using the LUSID web app

Note: Currently, the web app only supports soft delete.

  1. Sign in to the LUSID web app using the credentials of a LUSID administrator.
  2. From the left-hand menu, select Data Management > Instruments.
  3. On the Instruments dashboard, click the Delete button for the appropriate instrument record: