Hi team,
I’m working on integrating real-time market feeds using SmartWebSocketV2 from the SmartAPI Python SDK. I can successfully:
Authenticate using SmartConnect.generateSession(...)
Receive a valid jwtToken and feedToken
Establish a WebSocket connection (HTTP 101 Switching Protocols)
Send heartbeats (PING/PONG works)
Call subscribe(...) with correlationID, mode="full", and a properly structured tokenList like:
{
"exchangeType": 1,
"tokens": ["3045"] # Tested with SBIN, RELIANCE, and other NSE symbols
}
The subscription message appears to be sent successfully (confirmed via WebSocket trace), but I do not receive any server acknowledgment or live tick data. Neither on_message() nor on_ticks() receive anything after the subscription call. This happens even during market hours.
I have verified token formats via the instrument dump (exch_seg="NSE") and confirmed activity using REST quote API. Still, the WebSocket remains silent.
Could you advise:
Whether additional headers or client metadata are required during the connection?
If SmartWebSocketV2 has known issues with certain tokens or API versions?
Any examples or known working tokens/settings we should test against?
Appreciate any guidance. Thanks!