Skip to main content

Unsubscribe order update

Request details: Parameter

ParameterDescription
t‘uo’ represents Unsubscribe Order update
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_depth('NSE', '22')


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


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

Response details

ParameterDescription
t‘uok’ represents Unsubscribe Order update acknowledgement