BUG: Order COMPLETE update comes before Order OPEN notification

ansumanm
ansumanm edited July 2020 in Python client
This is throwing off my Order management state machine. Look at the timestamps.

2020-07-10 14:34:36,120 - [on_message]Payload: b'{"type":"order","id":"","data":{"placed_by":"SA0310","order_id":"200710003560051","exchange_order_id":"1300000010688919","parent_order_id":null,"status":"COMPLETE","status_message":null,"status_message_raw":null,"order_timestamp":"2020-07-10 14:34:36","exchange_update_timestamp":"2020-07-10 14:34:36","exchange_timestamp":"2020-07-10 14:34:36","variety":"regular","exchange":"NSE","tradingsymbol":"SBIN","instrument_token":779521,"order_type":"MARKET","transaction_type":"BUY","validity":"DAY","product":"MIS","quantity":1,"disclosed_quantity":0,"price":0,"trigger_price":0,"average_price":196.3,"filled_quantity":1,"pending_quantity":0,"cancelled_quantity":0,"market_protection":0,"meta_raw":null,"meta":{},"tag":null,"guid":"4824X4w55us6b3VKo","account_id":"SA0310","unfilled_quantity":0,"app_id":4824,"checksum":""}}'
2020-07-10 14:34:36,121 - on_order_update: {'placed_by': 'SA0310', 'order_id': '200710003560051', 'exchange_order_id': '1300000010688919', 'parent_order_id': None, 'status': 'COMPLETE', 'status_message': None, 'status_message_raw': None, 'order_timestamp': '2020-07-10 14:34:36', 'exchange_update_timestamp': '2020-07-10 14:34:36', 'exchange_timestamp': '2020-07-10 14:34:36', 'variety': 'regular', 'exchange': 'NSE', 'tradingsymbol': 'SBIN', 'instrument_token': 779521, 'order_type': 'MARKET', 'transaction_type': 'BUY', 'validity': 'DAY', 'product': 'MIS', 'quantity': 1, 'disclosed_quantity': 0, 'price': 0, 'trigger_price': 0, 'average_price': 196.3, 'filled_quantity': 1, 'pending_quantity': 0, 'cancelled_quantity': 0, 'market_protection': 0, 'meta_raw': None, 'meta': {}, 'tag': None, 'guid': '4824X4w55us6b3VKo', 'account_id': 'SA0310', 'unfilled_quantity': 0, 'app_id': 4824, 'checksum': ''}
2020-07-10 14:34:36,122 - Starting new HTTP connection (1): localhost:6000
2020-07-10 14:34:36,127 - http://localhost:6000 "POST /ordermanager/api/v1.0/orders HTTP/1.1" 201 21
2020-07-10 14:34:36,128 - [on_message]Payload: b'{"type":"order","id":"","data":{"placed_by":"SA0310","order_id":"200710003560051","exchange_order_id":"1300000010688919","parent_order_id":null,"status":"OPEN","status_message":null,"status_message_raw":null,"order_timestamp":"2020-07-10 14:34:36","exchange_update_timestamp":"2020-07-10 14:34:36","exchange_timestamp":"2020-07-10 14:34:36","variety":"regular","exchange":"NSE","tradingsymbol":"SBIN","instrument_token":779521,"order_type":"MARKET","transaction_type":"BUY","validity":"DAY","product":"MIS","quantity":1,"disclosed_quantity":0,"price":0,"trigger_price":0,"average_price":0,"filled_quantity":0,"pending_quantity":1,"cancelled_quantity":0,"market_protection":0,"meta_raw":null,"meta":{},"tag":null,"guid":"4824X4w55us6b3VKo","account_id":"SA0310","unfilled_quantity":0,"app_id":4824,"checksum":""}}'
2020-07-10 14:34:36,128 - on_order_update: {'placed_by': 'SA0310', 'order_id': '200710003560051', 'exchange_order_id': '1300000010688919', 'parent_order_id': None, 'status': 'OPEN', 'status_message': None, 'status_message_raw': None, 'order_timestamp': '2020-07-10 14:34:36', 'exchange_update_timestamp': '2020-07-10 14:34:36', 'exchange_timestamp': '2020-07-10 14:34:36', 'variety': 'regular', 'exchange': 'NSE', 'tradingsymbol': 'SBIN', 'instrument_token': 779521, 'order_type': 'MARKET', 'transaction_type': 'BUY', 'validity': 'DAY', 'product': 'MIS', 'quantity': 1, 'disclosed_quantity': 0, 'price': 0, 'trigger_price': 0, 'average_price': 0, 'filled_quantity': 0, 'pending_quantity': 1, 'cancelled_quantity': 0, 'market_protection': 0, 'meta_raw': None, 'meta': {}, 'tag': None, 'guid': '4824X4w55us6b3VKo', 'account_id': 'SA0310', 'unfilled_quantity': 0, 'app_id': 4824, 'checksum': ''}
Sign In or Register to comment.