getLongShortRatio method

Future<Map<String, dynamic>?> getLongShortRatio({
  1. required String symbol,
  2. required String interval,
  3. int? limit,
})

Gets the Bybit user accounts' long-short ratio.

period must be one of the followin strings : '5min', '15min', '30min', '1h', '4h', '1d' https://bybit-exchange.github.io/docs/inverse/#t-marketopeninterest

Implementation

Future<Map<String, dynamic>?> getLongShortRatio(
    {required String symbol, required String interval, int? limit}) async {
  log.d('ByBitRest.getLongShortRatio');
  var parameters = <String, dynamic>{};
  parameters['symbol'] = symbol;
  parameters['period'] = interval;
  if (limit != null) parameters['limit'] = limit;
  return await request(
      path: '/v2/public/account-ratio', type: 'GET', parameters: parameters);
}