fetchOIAnalysis abstract method

Future<String?> fetchOIAnalysis({
  1. required String underlyingSymbolId,
  2. required String expiry,
  3. required int timeFrom,
  4. required int timeTo,
})

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

Future<String?> fetchOIAnalysis({
  required String underlyingSymbolId,
  required String expiry,
  required int timeFrom,
  required int timeTo,
});