Market data - 1m, 3m, 5m...

Hello.

I like to know how Binance calculate market data for 1m, 3m, 5m… interval.

1m
1627952400000,0.26426000,0.26426000,0.26350000,0.26377000,107853.40000000,1627952459999,28454.81422400,84,50189.20000000,13237.96777100,0

3m
1627952400000,0.26426000,0.26426000,0.26334000,0.26361000,287858.60000000,1627952579999,75922.60687000,200,135391.00000000,35714.49741700,0

5m
1627952400000,0.26426000,0.26426000,0.26331000,0.26363000,468411.60000000,1627952699999,123545.70739600,319,256898.30000000,67761.79897000,0

30m
1627952400000,0.26426000,0.26426000,0.26210000,0.26295000,2091938.50000000,1627954199999,550339.50356100,1716,991171.40000000,260794.65255100,0

1h
1627952400000,0.26426000,0.26426000,0.26048000,0.26062000,4846181.30000000,1627955999999,1270982.90187100,3497,2241176.50000000,587805.92583500,0

Example:
I’m retrieving data from WebSocket for each seconds. Is there a way to calculate data from 1 seconds to 1 minute, 3 minute, 5 minute interval? In other words I like to have only 1 connection to WebSocket.

Thank you.

Sorry, but not following your question. For which websocket stream is this?
When you query 5min interval, the returned data should already include all the data and changes within this 5mins.

Hello.

Example:
from ticker to kline_1m
or
from kline_1m to kline_3m (1 minute to 3 minute)

I like just to know it if possible to aggregate data manually from one interval to another.

Example:
(3x CLOSE from 1m)/ 3 = 3m (or something like that)