getAccountTransfers method
Future<Response>
getAccountTransfers({
- required String accountId,
- DateTime? before,
- DateTime? after,
- int? limit,
- TransferEnum? transferType,
Get a single account's transfers
Lists past withdrawals and deposits for an account.
https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getaccounttransfers
Implementation
Future<http.Response> getAccountTransfers({
required String accountId,
DateTime? before,
DateTime? after,
int? limit,
TransferEnum? transferType,
}) async {
Map<String, String> queryParameters = {};
if (before != null) queryParameters['before'] = before.toIso8601String();
if (after != null) queryParameters['after'] = after.toIso8601String();
if (limit != null) queryParameters['limit'] = limit.toString();
if (transferType != null)
queryParameters['type'] = transferType.transferType();
return get(
path: '/accounts/$accountId/transfers',
queryParameters: queryParameters,
);
}