createProfile method

Future<Response> createProfile({
  1. String? name,
})

Create a profile

Create a new profile. Will fail if no name is provided or if user already has 10 profiles.

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

Implementation

Future<http.Response> createProfile({
  String? name,
}) async {
  Map<String, dynamic> body = {};
  if (name != null) body['name'] = name;

  return post(
    path: '/profiles',
    body: body,
  );
}