deleteProfile method

Future<Map> deleteProfile({
  1. required String profileId,
  2. required String to,
})

Delete a profile

Deletes the profile specified by profile_id and transfers all funds to the profile specified by to. Fails if there are any open orders on the profile to be deleted.

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

Implementation

Future<Map> deleteProfile({
  required String profileId,
  required String to,
}) async {
  var response = await _profilesRestClient.deleteProfile(
    profileId: profileId,
    to: to,
  );

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

  return json.decode(response.body);
}