ok so basically i am calling a telegram api to send me msgs. let me do one thing let me just remove my entire code from on_order_ callback and just print. if that works i will do these expensive operation out of call back.
@tonystark i am 100% sure there is a issue with websocket on_order_ callback. today 4 terminals all running zerodha api in 3 terminals no disconnection reason no order yet triggered in those account. 4th terminal frequent disconnection coz i am firi…
see i saw the disconnection in all accounts at the same time when i placed a bunch of orders. ignore error 500 thats some other issue i figured out. As autoreconnct was enabled after few seconds it reconnected and since than all worked perfectly.
@rakeshr @sujith is it expected a very simple code working daily during market hours while running post market doesnt even go to on_connect function it keeps retrying
@rakeshr in above code by default reconnection is enabled as per documentation does this mean if websocket gets reconnected on_connect() will be called again and hence we would be able to resubscribe tokens ?
so rather than always fetching orderbook set a flag during disconnect and once reconnected make sure all orders are there and than again rely on websocket.
@sujith i read the doc i am now asking a very simple question if i get a successful response i get a order id if i dont get a successful response i dont get a order id but i can search it by tag in orderbook. my quesiton is if tag not found in order…
sujith now your comment is confusing. do you mean to say if OMS throws a error and tag not found in orderbook than the order is not placed and we can retry ? if OMS throws a error and tag found means order placed and we can read order status to know…
@rakeshr @sujith thank you both for your inputs here is what i am thinking as final solution please suggest if there any logical flow. place every order with unique tag. after placing a order using orderbook and search that tag to find orderid. than…
placed_by,order_id,exchange_order_id,parent_order_id,status,status_message,status_message_raw order_timestamp,exchange_update_timestamp,exchange_timestamp
abpve are many fields for each order in orderbook. lets say i placed a order and OMS throw a …
hi sujith when OMS times out and throws a Exception can the returned order id be trusted to fetch details for that order ? or we need to do it some other way
that ok sujith i understood but just to clarify order_history doesnt come under Quote it comes under Special Reads right ? i have to make sure all type of reads i am doing using kite.* should be below 10req/sec and also make sure individual restrict…
kite.order_history() is counted as Quote api ? or its counted as other endpoint ?
Quote API - 1r/s
Order place API - 10r/s
Historical API - 3r/s
All other endpoints - 10r/s
kite.order_history() comes under which of these
@sujith thanks for your response. but my questions is not related to rate limitation. basically what i want to ask is can even reading of order status come under rate limitation ?
@rakeshr thanks for your reply but as i said in my first post if i call ws.close() method based on time condition it gives this error Connection error: 1006 - connection was closed uncleanly " do we need to do something else before we close the co…
yes its actually much better to do this way right now i was calculating unfilled quantity and giveing it back to modify_order but now algo will become simple after ur clarification. thank you so much
sujith one last doublt if i have placed order with 100quantities limit order. now 50 are filled i want to change limit price still i dont need to give quantities as 50. automatically 50 quantities(unfilled) will be taken for new limit value. basical…
so if i place a order for 100 quantities and than i see 50 is filled while converting to market i dont need to give quanties i just need to convert it to market and it will automatically take unfilled quantities ?