LUSID automatically categorises the features of certain types of OTC instrument. You can optionally use these categories to conditionally select different pricing models in a recipe, to value instruments of the same type in different ways.
For example, you may have many FX option contracts mastered as instruments in LUSID, each with different features. To help you discover all the possible categories, call the GetAllPossibleFeatures API for the FxOption
instrument type, for example:
curl -X GET "https://<your-domain.lusid.com/api/api/instruments/FxOption/allfeatures"
-H "Authorization: <your-API-access-token>"
The response contains a list of feature keys and possible values, so for example the Instrument/Features/ExerciseType
feature key determines that FX option contracts are categorised either as American
and can be exercised at any time, or European
and can only be exercised at the maturity date. By omission, Bermudan-style option contracts are not supported:
{
"Instrument/Features/ExerciseType": [
"American",
"European"
],
"Instrument/Features/OptionType": [
"Call",
"Put"
],
"Instrument/Features/DeliveryType": [
"Physical",
"Cash"
],
"Instrument/Features/Barrier": [
"Double",
"Single"
],
"Instrument/Features/Touch": [
"Two",
"One",
"No"
],
"Instrument/Features/PayoffType": [
"Digital",
"Vanilla"
]
}
If you want to examine the categories for an individual instrument, call the GetExistingInstrumentCapabilities API with the LUID of that instrument, for example:
curl -X GET "https://<your-domain>.lusid.com/api/api/instruments/LUID_00003D64/capabilities?instrumentScope=default&recipeScope=default"
-H "Authorization: Bearer <your-API-access-token>"
The response reflects the choices you made when you mastered that instrument:
{
"instrumentId": "LUID_00003D64",
"model": "Unknown",
"features": {
"Instrument/Features/OptionType": "Call",
"Instrument/Features/DeliveryType": "Physical",
"Instrument/Features/ExerciseType": "European",
"Instrument/Features/PayoffType": "Vanilla"
},
...
}
Alternatively, you can call the QueryInstrumentCapabilities API, which returns information about supported metrics and market data dependencies in addition to features. See an example.
Note
If you find you need an additional license to use these APIs, contact Technical Support.