Unable to exit position

raminde
raminde edited November 2017 in PHP client
if u can quickly check i am unable to exit many of my BO positions I guess its a bug/no reverse check...while calling from api..

when I go to kite.zerodha.com I am unable to exit my RCOM stock..
when i click exit it takes me to orders but in orders there are no pending.. orders of rcom to exit

just checked it is applicable to all current positions

Possible cause..
as i am integrating zerodha api.. I sent a delete request to delete open orders.. however i send it to regular instead of bo.. so I guess that resulted it...i belive there should have been a check but there seems none to verify if its bo or regular, this is only what i can help u with. please feel free to exit my positions..I authorize to do the same..

id zz0118
  • sujith
    It should be resolved by now.
  • raminde
    tried calling back on 8033102000 not able to please call me on 9220230962
  • raminde
    Here are insights which might be helpful for you to resolve the issue...track down the bug.

    Bracket order was placed..
    Bracket order got executed
    cancel order to exit position was sent through api... delete request ... now the problem was the above cancel order should have been sent to bo but was sent to regular..
    ... I guess the bug is..:
    it should have checked on input orders at server level too and also a possible result of duplication of data store at two level than checking from same source.

    The way your system data works must be like this(duplication of data).. one where it saves if exit orders are sent or not and other where the orders are actually there, each time it doesnt do a real time check and rather relies on saved data for speed. so once I sent the delete order on regular... the saved data table got updated however as the actual order was bo it did not got deleted. all my new orders seems to work all right. those are those bo orders which no delete order to regular was sent

    How to replicate the situation for your trouble shooting..

    execute a bo order.
    and then send a delete order with same leg order but to regular.. and that would give you that problem..

    ok there is more to the bug. now when u exit from orderbook it puts reverse order and shows up in positions and when u exit positions..


    I guess this info might be useful for you to track the bug.
  • raminde
    just noticed -- because of the bug my margin also seems to be blocked more than what its should be... just makes me wonder if there are still open positions not visible to me even from kite.zerodha.com
    Please check this is serious stuff.
  • raminde
    max margin on bo for my jetair should not exceed Rs.219 for bracket order
    yet Rs 1000 is blocked... so just wondering are there open positions not viewable..
  • raminde
    after calling the call center ... they exited the position manually... but the margin is still blocked... and whats more interesting ... the margin that was blocked got increased on my exiting the position... its all gone crazy now..
  • raminde
    good i think now order exception has been added when some one tries to delete leg of bracket order... thats let me to my other question then how do we exit a bracket order via api, i want to exit it via market order not limit order.

    ie., how to exit bracket order with market and not limit.. does update allows squareoff to be market order?
  • sujith
    sujith edited November 2017
    You can check out example. You just need to pass the same params from PHP client.
Sign In or Register to comment.