☰
Login
Signup
Home
›
Python client
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Register
Categories
Recent Discussions
Activity
Categories
13.9K
All Categories
0
Incidents
156
Node JS client
40
Go client
793
.Net API client
380
Kite Publisher
537
.Net / VBA / Excel (3rd party)
458
Algorithms and Strategies
999
Java client
1.1K
API clients
404
PHP client
4K
Python client
348
Mobile and Desktop apps
1.4K
Market data (WebSockets)
3.3K
General
In this Discussion
July 2020
vijoeyz
July 2020
ansumanm
July 2020
sujith
BUG: Order COMPLETE update comes before Order OPEN notification
ansumanm
July 2020
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': ''}
Tagged:
Python on_order_update callback
sujith
July 2020
You can refer to this
thread
.
ansumanm
July 2020
Atleast, if you can send the exchange update timestamp in microseconds, I can use that field to ignore order updates if the exchange timestamp is less than the last received order update's exchange timestamp.
sujith
July 2020
This is a message sent by the OMS. We don't add or modify data. You may use this as an event to fetch orderbook and check for the latest status.
vijoeyz
July 2020
@sujith
What is UPDATE status? It is not documented in
https://kite.trade/docs/connect/v3/orders/#order-statuses
sujith
July 2020
It is the postback status (not order status) when there is a partial fill or successful order modification.
Sign In
or
Register
to comment.
What is UPDATE status? It is not documented in https://kite.trade/docs/connect/v3/orders/#order-statuses