takerBuySellVolume method
Taker long/short ratio
Implementation
Future<Either<String, List<TakerLongShortRatio>>> takerBuySellVolume({
required String symbol,
required String period,
String? limit,
String? startTime,
String? endTime,
}) {
Map<String, String> params = {
'symbol': symbol,
'period': period,
};
if (limit != null) params['limit'] = limit;
if (startTime != null) params['startTime'] = startTime;
if (endTime != null) params['endTime'] = endTime;
return sendRequest(
path: 'futures/data/takerlongshortRatio',
type: RequestType.GET,
params: params,
keyRequired: true,
).then((r) => r.isLeft
? Left(r.left)
: Right(List<TakerLongShortRatio>.from(
r.right.map((e) => TakerLongShortRatio.fromMap(e)))));
}