fetchOIAnalysis method
- required String underlyingSymbolId,
- required String expiry,
- required int timeFrom,
- required int timeTo,
override
OI, OI-change, and previous-OI for the ATM +/- 5 strikes (11 total)
of expiry, measured over the window timeFrom..timeTo (unix
seconds) -- powers the OI Analysis screen. The SDK does not pass a
strike range: implementations must derive the current ATM strike
themselves (the same way atmSymbols already does) and resolve data
for the 5 strikes on either side of it. parseOIAnalysis additionally
trims the result to that window client-side, so an implementation
that returns more than 11 strikes is still handled correctly.
Resolve to a JSON object:
{
"calls": {"23450": {"oi": 87425, "oiChg": 3770, "prevOi": 83655}, ...},
"puts": {"23450": {"oi": ..., "oiChg": ..., "prevOi": ...}, ...}
}
Resolve to null when no data is available for the window.
Implementation
@override
Future<String?> fetchOIAnalysis({
required String underlyingSymbolId,
required String expiry,
required int timeFrom,
required int timeTo,
}) => _data.invokeMethod<String>('fetchOIAnalysis', {
'underlyingSymbolId': underlyingSymbolId,
'expiry': expiry,
'timeFrom': timeFrom,
'timeTo': timeTo,
});