Download live kline data for all pairs

Hello! My trading algorithm requires live 1h klines for all (USDT and BTC) pairs for last 24h. Currently, I’m getting this data in for loop with GET requests on ‘’ and this process takes about 5 minutes.
What would be the fastest way to do this?

“threads” but that is a separate topic that does not go with this forum

You should use the websocket(Binance API Documentation) stream for this for live data and cache it. For historical data, you can download it from