renameProfile method

Future<Response> renameProfile({
  1. required String profileId,
  2. required String name,
})

Rename a profile

Rename a profile. Names 'default' and 'margin' are reserved.

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

Implementation

Future<http.Response> renameProfile({
  required String profileId,
  required String name,
}) async {
  Map<String, dynamic> body = {
    'profile_id': profileId,
    'name': name,
  };

  return put(
    path: '/profiles/$profileId',
    body: body,
  );
}