allMarkPriceStream method

Stream<List<WsMarkPrice>> allMarkPriceStream({
  1. bool is1s = false,
})

Mark price and funding rate for all symbols pushed every 3 seconds or every second.

Implementation

Stream<List<WsMarkPrice>> allMarkPriceStream({
  bool is1s = false,
}) {
  final channel = subscribe('!markPrice@arr' + (is1s ? "@1s" : ""));
  return channel.stream.map<List>(toList).map<List<WsMarkPrice>>(
      (e) => e.map((a) => WsMarkPrice.fromMap(a)).toList());
}