bookDepth method

Stream<BookDepth> bookDepth(
  1. String symbol, [
  2. int levels = 5
])
inherited

Implementation

Stream<BookDepth> bookDepth(String symbol, [int levels = 5]) {
  assert(levels == 5 || levels == 10 || levels == 20);

  final channel = _public('${symbol.toLowerCase()}@depth$levels');

  return channel.stream
      .map<Map>(_toMap)
      .map<BookDepth>((m) => BookDepth.fromMap(m));
}