getAllReports method
Get all reports
Gets a list of past fills/account reports.
https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getreports
Implementation
Future<http.Response> getAllReports({
String? portfolioId,
DateTime? after,
int? limit,
ReportTypeEnum? type,
bool? ignoreExpired,
}) async {
Map<String, dynamic> queryParameters = {};
if (portfolioId != null) queryParameters['portfolio_id'] = portfolioId;
if (after != null) queryParameters['after'] = after.toIso8601String();
if (limit != null) queryParameters['limit'] = limit;
if (type != null) queryParameters['type'] = type.reportType();
if (ignoreExpired != null)
queryParameters['ignore_expired'] = ignoreExpired;
return get(
path: '/reports',
queryParameters: queryParameters,
);
}