withdrawToCryptoAddress method
Withdraw to crypto address
Withdraws funds from the specified profile_id to an external crypto address
https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_postwithdrawcrypto
Implementation
Future<Transaction> withdrawToCryptoAddress({
String? profileId,
required double amount,
required String currency,
required String cryptoAddress,
String? destinationTag,
bool? noDestinationTag,
String? twoFactorCode,
int? nonce,
String? fee,
}) async {
var response = await _transfersRestClient.withdrawToCryptoAddress(
profileId: profileId,
amount: amount,
currency: currency,
cryptoAddress: cryptoAddress,
destinationTag: destinationTag,
noDestinationTag: noDestinationTag,
twoFactorCode: twoFactorCode,
nonce: nonce,
fee: fee,
);
if (response.statusCode != 200) throw response;
return Transaction.fromJson(json.decode(response.body));
}