Skip to main content

Unsubscribe feed

Request details: Parameter

ParameterDescription
t'u' represents Unsubscribe Feed
kOne or more scriplist for unsubscription
from typing import Any
from thefirstock.firstockModules import firstockWebSockets
from thefirstock.pyClient.websocket import WsClient
from thefirstock.pyClient.websocket.enums import MessageTopic


client = firstockWebSockets.webSocketLogin()
ws = client.ws


@ws.on_connect
def connected(client, message):
if message.get('s') == 'OK':
client.unsubscribe_feed('NSE', '22')


@ws.on_message(MessageTopic.UNSUBSCRIBE_FEED)
def msg_handler(client: WsClient, message: Any):
print(message)


ws.connect(uid='userId', actid='userId')
ws.run_forever()

Response details

ParameterDescription
t'uk' represents Unsubscribe feed acknowledgement
kOne or more scriplist for unsubscription. Example NSE