getInstrumentInstrumentId

Syntax

getInstrumentInstrumentId(instrument)

Details

Get the ID 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 STRING type.

Examples

bond = {
    "productType": "Cash",
    "assetType": "Bond",
    "bondType": "DiscountBond",
    "version": 0, 
    "instrumentId": "259924.IB",
    "start": 2025.04.17,
    "maturity": 2025.07.17,
    "issuePrice": 99.664,
    "dayCountConvention": "ActualActualISDA"
}
instrument = parseInstrument(bond)
getInstrumentInstrumentId(instrument)

// output: 259924.IB

Related functions: parseInstrument, getInstrumentField, getInstrumentKeys