symbolPriceTicker method

Future<Either<String, TickerPrice>> symbolPriceTicker({
  1. required String symbol,
})

Latest price for a symbol.

Implementation

Future<Either<String, TickerPrice>> symbolPriceTicker({
  required String symbol,
}) {
  Map<String, String> params = {'symbol': symbol};
  return sendRequest(
    path: 'fapi/v1/ticker/24hr',
    type: RequestType.GET,
    params: params,
  ).then(
      (r) => r.isLeft ? Left(r.left) : Right(TickerPrice.fromMap(r.right)));
}