getInstrumentNearStrike

Syntax

getInstrumentNearStrike(instrument)

Details

Get the near-leg strike price 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 DOUBLE type.

Examples

swap = {
    "productType": "Swap",
    "swapType": "FxSwap",
    "version": 0,
    "currencyPair": "EURUSD",
    "direction": "Buy",
    "notional": ["EUR", 1E6],
    "nearStrike": 1.1,
    "nearExpiry": 2025.12.08,
    "nearDelivery": 2025.12.10,
    "farStrike": 1.2,
    "farExpiry": 2026.06.08,
    "farDelivery": 2026.06.10
}
instrument = parseInstrument(swap)

getInstrumentNearStrike(instrument)
// output: 1.1

Related functions: parseInstrument, getInstrumentField, getInstrumentKeys