INNER CODE UNIT · Python

on_noreconnect

buzzsubash/algo_trading_strategies_india · broker-utilities/mtm_square_off_zerodha/zerodha_ltp_subscriber.py:229

    def on_noreconnect(self, ws):
        """WebSocket no reconnect callback"""
        self.logger.error("🚫 WebSocket failed to reconnect")

    def on_ticks(self, ws, ticks):
        """
        Enhanced tick data handler with faster processing.
        Optimized for high-frequency data processing.
        """
        try:
            current_time = time.time()
            tick_count = len(ticks)

            for tick in ticks:
                # Get symbol info from database
                symbol_info = self.get_symbol_info(tick['instrument_token'])

                # Prepare data for batch insertion

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…