tickerStream method

Stream<WsTicker> tickerStream({
  1. required String symbol,
})

24hr rolling window ticker statistics for a single symbol.

These are NOT the statistics of the UTC day, but a 24hr rolling window for the previous 24hrs.

Implementation

Stream<WsTicker> tickerStream({required String symbol}) {
  final channel = subscribe('${symbol.toLowerCase()}@ticker');
  return channel.stream
      .map<Map>(toMap)
      .map<WsTicker>((e) => WsTicker.fromMap(e));
}