How to get recent trades with aggregated trades

let’s think time is 11:00 and I want to get trades between 11:00 and 11:05 with aggregated trades I can do that first I should take the first trade’s id from 11:00 and wait for 5 minutes and take trades with aggregated trades fromid method It will work fine but I want to take that trades recently like if time is 11:00 when I run my program it should give me the result of every seconds trades without making me wait for 5 minutes is there a way for that

You can have live data stream using websocket. The update speed is in real time.