What streams do you subscribe to?
I see correctly closed candlesticks on btcusdt@kline_1s
every second, and for btcusdt@kline_1m
there is a closed one produced at the end of every minute. The events with "x": false
are updates to the current candlestick.
E.g.,
{"e":"kline","E":1673599679537,"s":"BTCUSDT","k":{"t":1673599620000,"T":1673599679999,"s":"BTCUSDT","i":"1m","f":2472813428,"L":2472817723,"o":"18848.16000000","c":"18847.32000000","h":"18851.01000000","l":"18845.00000000","v":"163.44536000","n":4296,"x":false,"q":"3080747.90857550","V":"68.70418000","Q":"1295014.75876550","B":"0"}}
{"e":"kline","E":1673599680004,"s":"BTCUSDT","k":{"t":1673599620000,"T":1673599679999,"s":"BTCUSDT","i":"1m","f":2472813428,"L":2472817762,"o":"18848.16000000","c":"18847.47000000","h":"18851.01000000","l":"18845.00000000","v":"163.51684000","n":4335,"x":true,"q":"3082095.11798820","V":"68.74238000","Q":"1295734.73014250","B":"0"}}
{"e":"kline","E":1673599682044,"s":"BTCUSDT","k":{"t":1673599680000,"T":1673599739999,"s":"BTCUSDT","i":"1m","f":2472817763,"L":2472817897,"o":"18847.29000000","c":"18847.24000000","h":"18847.62000000","l":"18846.58000000","v":"2.76876000","n":135,"x":false,"q":"52182.51552090","V":"0.42068000","Q":"7928.73346010","B":"0"}}
Candlestick closes at 1673599679999. An event about this is generated at 1673599680004. The next update is for the following candle which is still open.