getAllCurrencies method

Future<List<Currency>> getAllCurrencies()

Get all known currencies

Gets a list of all known currencies. Note: Not all currencies may be currently in use for trading.

https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getcurrencies

Implementation

Future<List<Currency>> getAllCurrencies() async {
  var response = await _currenciesRestClient.getAllCurrencies();

  if (response.statusCode != 200) throw response;

  return listDecode(response.body)
      .map((currency) => Currency.fromJson(currency))
      .toList();
}