subaccountTransferHistory method
Sub-account Transfer History (For Sub-account)
Implementation
Future<Either<String, List<SubaccountTransferData>>>
subaccountTransferHistory({
String? asset,
int? type,
int? startTime,
int? endTime,
int? limit,
int? recvWindow,
}) {
Map<String, String> params = {};
if (asset != null) params['asset'] = asset;
if (type != null) params['type'] = type.toString();
if (startTime != null) params['startTime'] = startTime.toString();
if (endTime != null) params['endTime'] = endTime.toString();
if (limit != null) params['limit'] = limit.toString();
if (recvWindow != null) params['recvWindow'] = recvWindow.toString();
return sendRequest(
path: 'sapi/v1/sub-account/transfer/subUserHistory',
type: RequestType.GET,
params: params,
keyRequired: true,
signatureRequired: true,
timestampRequired: true,
).then((r) => r.isLeft
? Left(r.left)
: Right(List<SubaccountTransferData>.from(
r.right.map((e) => SubaccountTransferData.fromMap(e)))));
}