getInstrumentCurrencyPair
语法
getInstrumentCurrencyPair(instrument)
详情
根据输入的金融工具,获取该工具的货币对。
参数
instrument INSTRUMENT 类型标量或向量,表示金融工具。
返回值
STRING 类型标量或向量。
例子
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)
getInstrumentCurrencyPair(ins)
// output: USDCNY
