createReport method
Create a report
Generates a report. Reports are either for past account history or past fills on either all accounts or one product's account.
https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_postreports
Implementation
Future<Map> createReport({
DateTime? startDate,
DateTime? endDate,
required ReportTypeEnum type,
DateTime? year,
ReportFormatEnum? format,
String? productId,
String? accountId,
String? email,
String? profileId,
}) async {
var response = await _reportsRestClient.createReport(
startDate: startDate,
endDate: endDate,
type: type,
year: year,
format: format,
productId: productId,
accountId: accountId,
email: email,
profileId: profileId,
);
if (response.statusCode != 200) throw response;
return json.decode(response.body);
}