Skip to main content

Acknowledgement order update

Websocket TouchLine order Acknowledgement will provide the status of websocket connection to the server.

Request details

ParameterDescription
tok ‘o’ represents order update subscription
kOne or more scriplist for subscription. Example NSE 22#BSE
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.subscribe_order('userId')


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


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

Order subscription Acknowledgement

ParameterDescription
t‘ok’ represents order update subscription acknowledgement

Sample response

{
't': 'ok',
}