getInstrumentExpiry
Syntax
getInstrumentExpiry(instrument)
Details
Get the expiry date of one or more instruments.
Arguments
instrument is a scalar or vector of the INSTRUMENT type, indicating one or more instruments.
Returns
A scalar or vector of the DATE type.
Examples
forward = {
"productType": "Forward",
"forwardType": "FxForward",
"version": 0,
"expiry": 2025.09.24,
"delivery": 2025.09.26,
"currencyPair": "USDCNY",
"direction": "Buy",
"notional": ["USD", 1E8],
"strike": 7.2
}
ins = parseInstrument(forward)
getInstrumentExpiry(ins)
// Output: 2025.09.24
Related functions: parseInstrument, getInstrumentField, getInstrumentKeys
