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<Transaction> withdrawToCoinbaseAccount({
String? profileId,
required double amount,
required String coinbaseAccountId,
required String currency,
}) async {
var response = await _transfersRestClient.withdrawToCoinbaseAccount(
profileId: profileId,
amount: amount,
coinbaseAccountId: coinbaseAccountId,
currency: currency,
);
if (response.statusCode != 200) throw response;
return Transaction.fromJson(json.decode(response.body));
}