I am subscribing to the sensex options with token received from the firstock_SearchScrips (eg. 822783 for SENSEX2380465500PE)
But I am not getting ticks on the message_handler for SUBSCRIBE_FEED for this token.
Because of this our Stop loss logic is not working for sensex options. Please look at it urgently.
BankNifty, Finnifty are working fine.
Thank you for your patience and we are currently working on this scenario and we will promptly update you as soon as this issue is resolved.
Here is the code to get the subscribe feeds from sensex option.
from typing import Any
from thefirstock.firstockModules import firstockWebSockets
from thefirstock.pyClient.websocket import WsClient
from thefirstock.pyClient.websocket.enums import MessageTopic
# Choose 1 or 2 to activate either Websocket 1 or Websocket 2 in the webSocketLogin() function
client = firstockWebSockets.webSocketLogin(1)
ws = client.ws
def connected(client, message):
if message.get('s') == 'OK':
def msg_handler(client: WsClient, message: Any):
# Connect to the websocket using appropriate values for 'uid' and 'actid'
We thank you for your patience and Hope you have a good day.