markPriceKlineCandlestickData method
Kline/candlestick bars for the mark price of a symbol.
Klines are uniquely identified by their open time.
Implementation
Future<Either<String, List<Kline>>> markPriceKlineCandlestickData({
required String symbol,
required String interval,
String? startTime,
String? endTime,
String? limit,
}) {
Map<String, String> params = {
'symbol': symbol,
'interval': interval,
};
if (startTime != null) params['startTime'] = startTime;
if (endTime != null) params['endTime'] = endTime;
if (limit != null) params['limit'] = limit;
return sendRequest(
path: 'fapi/v1/markPriceKlines',
type: RequestType.GET,
params: params,
).then((r) => r.isLeft
? Left(r.left)
: Right(List<Kline>.from(r.right.map((e) => Kline.fromList(e)))));
}