Open crypt0inf0 opened 5 months ago
Is it possible to use a custom on message call back for client.subscribe
, client.quotes
, Can you give me a example or documentation on how to use custom call back functions?
I can use the custom callback using client.on_message
def on_feed(message):
# print(message)
# Check if 'type' is 'order' and then fetch 'ordSt'
if message.get('type') == 'order':
ordSt = message.get('data', {}).get('ordSt')
#print(ordSt)
if ordSt == 'complete':
nOrdNo = message.get('data', {}).get('nOrdNo')
print(nOrdNo)
else:
print("Type is not 'order'")
return
def app():
c.on_message = on_feed
c.subscribe_to_orderfeed()
t1 = Thread(target=app)
t1.start()
How to use client.on_message
on different function using different requirements?
@bheemaray-hb I'm checking out the new SDK
v1.2.1
, I noticed that the new SDK does not have custom call back message likeinstead it has,
It uses the,
How can I set custom callback function like,