'how to display binance crypto specific pair price value in flutter UI?

I was working to make a crypto app but I have some issues displaying crypto pairs in UI. I've tried different ways but it's not working.

Please can you suggest to me how to display Binance crypto pair values in flutter using API.

   Future login(BuildContext context) async {
  
    final channel = WebSocketChannel.connect(Uri.parse('wss://stream.binance.com:9443/ws/btcusdt@aggTrade'));
 
    channel.stream.listen((data) {
      print(data);
    },
        onError: (error) => print(error));
    channel.sink.add(
        jsonEncode(
            {
              {
                "method": "SUBSCRIBE",
                "params":
                [
                  "btcusdt@aggTrade",
                  "p",
                ],
                "id": 1,

                price:"p",

              },
            print(price)
         [
          {
           "method": "SUBSCRIBE",
          //"params":
            "pair": "btcusd",
             "channel": "trade"
        "btcusdt@aggTrade",
      "btcusdt@depth"


             //"id": 1
           }
         ],
            }


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source