withdrawToCoinbaseAccount method
Withdraw to Coinbase account
Withdraws funds from the specified profile_id to a www.coinbase.com wallet.
https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_postwithdrawcoinbaseaccount
Implementation
Future<http.Response> withdrawToCoinbaseAccount({
String? profileId,
required double amount,
required String coinbaseAccountId,
required String currency,
}) async {
Map<String, String> body = {
'amount': amount.toString(),
'coinbase_account_id': coinbaseAccountId,
'currency': currency,
};
if (profileId != null) body['profile_id'] = profileId;
return post(
path: '/withdrawals/coinbase-account',
body: body,
);
}