It looks like you're new here. If you want to get involved, click one of these buttons!
def on_message(ws, payload, is_binary):
global my_order_messages
if not is_binary:
parsed_msg = json.loads(payload)
if parsed_msg['type'] == 'order':
if parsed_msg['data']['status'] in ['OPEN', 'COMPLETE', 'CANCELLED', 'REJECTED']:
order_id = parsed_msg['data']['order_id']
my_order_messages[order_id] = parsed_msg['data']
I found text messages in postbacks are not as reliable as they are claimed or am I missing something?
An order can be in OPEN status, even if it is partially filled. That is how it works. I would suggest use Kite web or app to know these kind of behaviors before writing strategies.
@sujith , you mean we should be receiving all order status updates in function "on_ticks" or any other callback function?
on_order_update
. You can check out pykiteconnect documentation here for ticker.