I need response format on web-socket when multiple trades occur on a single order. What would be the "STATUS" of a partially executed order on web-socket ("on_order_update")?
Fetching the order book would take 500-600 milisec time. This would bring the latency up heavily and in effect the efficiency of execution would go to virtually null!
Websocket order update are asynchronous messages pushed by the OMS, order of the event or duplicate events are triggered in the few cases. Hence, we suggest fetching orderbook on order update event.
I could figure out by placing large order, but that would cost me large amount. That's why I asked for a sample message for partially executed order.Could you please mention how these above messages would look like in case of partially executed order.
PS: The 'status': 'OPEN messages for new order and modification are exactly same thereby making it very difficult to distinguish between them. The 'status': 'UPDATE message doesn't always come before 'status': 'OPEN (in case of modification)
Below is the messages, when order Is executed fully in one trade, look like,
"status": "TRIGGER PENDING"
andfilled_quantity
lesser than quantity. Something like:{'account_id': 'XXXXXX', 'unfilled_quantity': 0, 'checksum': '', 'placed_by': 'XXXXXX', 'order_id': '221227002038344', 'exchange_order_id': '1500000053707215', 'parent_order_id': None, 'status': 'UPDATE', 'status_message': None, 'status_message_raw': None, 'order_timestamp': '2022-12-27 11:40:14', 'exchange_update_timestamp': '2022-12-27 11:40:14', 'exchange_timestamp': '2022-12-27 11:40:14', 'variety': 'regular', 'exchange': 'NFO', 'tradingsymbol': 'BANKNIFTY22DEC44000CE', 'instrument_token': 22004994, 'order_type': 'LIMIT', 'transaction_type': 'BUY', 'validity': 'DAY', 'product': 'MIS', 'quantity': 25, 'disclosed_quantity': 0, 'price': 4.35, 'trigger_price': 0, 'average_price': 0, 'filled_quantity': 0, 'pending_quantity': 25, 'cancelled_quantity': 0, 'market_protection': 0, 'meta': {}, 'tag': None, 'guid': '42856XZvT78rgJpPQo'}
{'account_id': 'XXXXXX', 'unfilled_quantity': 0, 'checksum': '', 'placed_by': 'XXXXXX', 'order_id': '221227002038344', 'exchange_order_id': '1500000053707215', 'parent_order_id': None, 'status': 'OPEN', 'status_message': None, 'status_message_raw': None, 'order_timestamp': '2022-12-27 11:40:14', 'exchange_update_timestamp': '2022-12-27 11:40:14', 'exchange_timestamp': '2022-12-27 11:40:14', 'variety': 'regular', 'exchange': 'NFO', 'tradingsymbol': 'BANKNIFTY22DEC44000CE', 'instrument_token': 22004994, 'order_type': 'LIMIT', 'transaction_type': 'BUY', 'validity': 'DAY', 'product': 'MIS', 'quantity': 25, 'disclosed_quantity': 0, 'price': 5.35, 'trigger_price': 0, 'average_price': 0, 'filled_quantity': 0, 'pending_quantity': 25, 'cancelled_quantity': 0, 'market_protection': 0, 'meta': {}, 'tag': None, 'guid': '42856XZvT78rgJpPQo'}
I could figure out by placing large order, but that would cost me large amount. That's why I asked for a sample message for partially executed order.Could you please mention how these above messages would look like in case of partially executed order.
PS: The 'status': 'OPEN messages for new order and modification are exactly same thereby making it very difficult to distinguish between them. The 'status': 'UPDATE message doesn't always come before 'status': 'OPEN (in case of modification)
Below is the messages, when order Is executed fully in one trade, look like,
{'account_id': 'XXXXXX', 'unfilled_quantity': 0, 'checksum': '', 'placed_by': 'XXXXXX', 'order_id': '221227002222858', 'exchange_order_id': '1500000060547202', 'parent_order_id': None, 'status': 'OPEN', 'status_message': None, 'status_message_raw': None, 'order_timestamp': '2022-12-27 12:05:05', 'exchange_update_timestamp': '2022-12-27 12:05:05', 'exchange_timestamp': '2022-12-27 12:05:05', 'variety': 'regular', 'exchange': 'NFO', 'tradingsymbol': 'BANKNIFTY22DEC44000CE', 'instrument_token': 22004994, 'order_type': 'LIMIT', 'transaction_type': 'BUY', 'validity': 'DAY', 'product': 'MIS', 'quantity': 25, 'disclosed_quantity': 0, 'price': 12.6, 'trigger_price': 0, 'average_price': 0, 'filled_quantity': 0, 'pending_quantity': 25, 'cancelled_quantity': 0, 'market_protection': 0, 'meta': {}, 'tag': None, 'guid': '42856XGeUlFwRSgHo7'}
{'account_id': 'XXXXXX', 'unfilled_quantity': 0, 'checksum': '', 'placed_by': 'XXXXXX', 'order_id': '221227002222858', 'exchange_order_id': '1500000060547202', 'parent_order_id': None, 'status': 'COMPLETE', 'status_message': None, 'status_message_raw': None, 'order_timestamp': '2022-12-27 12:05:05', 'exchange_update_timestamp': '2022-12-27 12:05:05', 'exchange_timestamp': '2022-12-27 12:05:05', 'variety': 'regular', 'exchange': 'NFO', 'tradingsymbol': 'BANKNIFTY22DEC44000CE', 'instrument_token': 22004994, 'order_type': 'LIMIT', 'transaction_type': 'BUY', 'validity': 'DAY', 'product': 'MIS', 'quantity': 25, 'disclosed_quantity': 0, 'price': 12.6, 'trigger_price': 0, 'average_price': 12.2, 'filled_quantity': 25, 'pending_quantity': 0, 'cancelled_quantity': 0, 'market_protection': 0, 'meta': {}, 'tag': None, 'guid': '42856XGeUlFwRSgHo7'}
unfilled_quantity, filled_quantity and quantity
.