allSymbolsPriceTicker method

Future<Either<String, List<TickerPrice>>> allSymbolsPriceTicker()

Latest price for all symbols.

Implementation

Future<Either<String, List<TickerPrice>>> allSymbolsPriceTicker() {
  return sendRequest(
    path: 'fapi/v1/ticker/24hr',
    type: RequestType.GET,
  ).then((r) => r.isLeft
      ? Left(r.left)
      : Right(List<TickerPrice>.from(
          r.right.map((e) => TickerPrice.fromMap(e)))));
}