getAnalysisWithMultiFrame method

Future<List<Map<String, dynamic>>> getAnalysisWithMultiFrame({
  1. required List<Intervals> intervals,
})

Implementation

Future<List<Map<String, dynamic>>> getAnalysisWithMultiFrame({
  required List<Intervals> intervals,
}) async {
  _validationInput(
    validateMultiTickers: true,
    intervals: intervals,
  );

  List<String> indicatorsSend =
      _formatInputIndicatorsMultiIntervals(intervals: intervals);
  final res = await DioManagerClass.getInstance.dioPostMethod(
    url: tradingView.screener.toLowerCase(),
    body: {
      "symbols": {
        "tickers": tradingView.symbols,
      },
      "columns": indicatorsSend,
    },
    header: {"User-Agent": "tradingview_ta/3.3.0"},
  );
  if (res.statusCode == 200) {
    // _formatResToMapMultiInterval
    return _formatResToMapMultiInterval(res.data, indicatorsSend);
  } else {
    throw Exception(res.data);
  }
}