transferFundsBetweenProfiles method

Future<Map> transferFundsBetweenProfiles({
  1. required String from,
  2. required String to,
  3. required String currency,
  4. required double amount,
})

Transfer funds between profiles

Transfer an amount of currency from one profile to another.

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

Implementation

Future<Map> transferFundsBetweenProfiles({
  required String from,
  required String to,
  required String currency,
  required double amount,
}) async {
  var response = await _profilesRestClient.transferFundsBetweenProfiles(
    from: from,
    to: to,
    currency: currency,
    amount: amount,
  );

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

  return json.decode(response.body);
}