getOpenInterestPeriodic method
void
getOpenInterestPeriodic({})
Gets the total amount of unsettled contracts periodically.
In other words, get the total number of contracts held in open positions
every period.
period must be one of the followin strings :
'5min', '15min', '30min', '1h', '4h', '1d'
https://bybit-exchange.github.io/docs/inverse/#t-marketopeninterest
Implementation
void getOpenInterestPeriodic(
{required String symbol,
required String interval,
int? limit,
required Duration period}) {
log.d('ByBitRest.getOpenInterestPeriodic');
streamGroup!.add(Stream.periodic(period, (_) {
return getOpenInterest(symbol: symbol, interval: interval, limit: limit);
}).asyncMap((event) async => await event));
}