It looks like you're new here. If you want to get involved, click one of these buttons!
03Jul18 09:48:30, PUT|apiKey=apiKey, accessToken= accessToken, Url=https://api.kite.trade/orders/regular/180703000353787, Payload= exchange=NSE&tradingsymbol=HINDPETRO&transaction_type=SELL&order_type=LIMIT&product=CNC&quantity=100&price=258.9&validity=DAYPost back received - this is fine
03Jul18 09:48:30, WebSocket_MessageReceived : {"type":"order","data":{"placed_by":"clientId","order_id":"180703000353787","exchange_order_id":"1100000001068459","parent_order_id":null,"status":"OPEN","status_message":null,"order_timestamp":"2018-07-03 09:48:32","exchange_update_timestamp":null,"exchange_timestamp":"2018-07-03 09:48:32","variety":"regular","exchange":"NSE","tradingsymbol":"HINDPETRO","instrument_token":359937,"order_type":"LIMIT","transaction_type":"SELL","validity":"DAY","product":"CNC","quantity":100,"disclosed_quantity":0,"price":258.9,"trigger_price":0,"average_price":0,"filled_quantity":0,"pending_quantity":100,"cancelled_quantity":0,"market_protection":0,"meta":null,"tag":"c8db7faa","guid":"WnZBklGc2xzZxDKa","account_id":"clientId","unfilled_quantity":0,"app_id":106,"checksum":""}}A second postback received, however it contains the old price - this is redundant.
03Jul18 09:48:30, WebSocket_MessageReceived : {"type":"order","data":{"placed_by":"clientId","order_id":"180703000353787","exchange_order_id":"1100000001068459","parent_order_id":null,"status":"UPDATE","status_message":null,"order_timestamp":"2018-07-03 09:48:32","exchange_update_timestamp":null,"exchange_timestamp":"2018-07-03 09:48:32","variety":"regular","exchange":"NSE","tradingsymbol":"HINDPETRO","instrument_token":359937,"order_type":"LIMIT","transaction_type":"SELL","validity":"DAY","product":"CNC","quantity":100,"disclosed_quantity":0,"price":259.65,"trigger_price":0,"average_price":0,"filled_quantity":0,"pending_quantity":100,"cancelled_quantity":0,"market_protection":0,"meta":null,"tag":"c8db7faa","guid":"WnZBklGc2xzZxDKa","account_id":"clientId","unfilled_quantity":0,"app_id":106,"checksum":""}}Response received - this is fine
03Jul18 09:48:30, OrderId : {"status":"success","data":{"order_id":"180703000353787"}}
OMS sends these values. I think OMS doesn't update the value unless the modification is successful.
The order of postbacks is first you will receive postback with UPDATE status and then OPEN after modification is successful.
We will speak to OMS team to check if we can do something about this but for now, an intermediate solution is to ignore postback with UPDATE status and older value.
Cant ignore the UPDATE postbacks as it will blind us in case of partial fills etc. Things gets even murkier in case we modify a partially filled order. Let me exemplify.
Modified a partial filled order to 259.65 Post back received for the same. Here the status is UPDATE not OPEN Received the stale postback with the status as UPDATE and the pre-modified price. This should have come first. Please check this at your end.
Received the response - this is fine
Given the OMS is designed as such dont think TR/Omnesys is going to change it. Potential workarounds:
The issue wherein order of postbacks is wrong is something happening because of OMS. We just relay postbacks as and when we receive the signal from OMS.
There are many intermediate statuses, sending the exact status may panic some other user's system as some people work on a specified set of statuses.
Order tags already exist, a user can tag an order while placing it.
Overall the postback notification implementation is pretty impressive given it works across multiple platforms seamlessly and kudos to you for that. However much of the shine is lost due to the fact you have made the "state" exotic, redundant postbacks and random chronology.
I was trying to work on the postback messages using the webhook method before I landed on this page..
Are you guys saying I can get messages for my order status using websocket? If so, where can I find more information on this. I have been searching for this in the Kite Documentations.
Thanks
from Joy---
Hi,
First congrats on the API and glad to see the postback via the websocket
You can find the documentation about it here.
Hey thanks for the response.
I am using the KiteConnect Library for Python.
Am I supposed to use the following callback to get postback messages? If so, is there any documentation or an example of how i can use it?
on_order_update(ws, data) - Triggered when there is an order update for the connected user.
Thank You!
Thanks