getFeeEstimateForCryptoWithdrawal method

Future<Response> getFeeEstimateForCryptoWithdrawal({
  1. String? currency,
  2. String? cryptoAddress,
})

Get fee estimate for crypto withdrawal

Gets the fee estimate for the crypto withdrawal to crypto address

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

Implementation

Future<http.Response> getFeeEstimateForCryptoWithdrawal({
  String? currency,
  String? cryptoAddress,
}) async {
  Map<String, String> queryParameters = {};
  if (currency != null) queryParameters['currency'] = currency;
  if (cryptoAddress != null)
    queryParameters['crypto_address'] = cryptoAddress;

  return get(
    path: '/withdrawals/fee-estimate',
    queryParameters: queryParameters,
  );
}