It is wierd, when I place a stop loss market, it is getting closed immediately like a market order without considering trigger point and close the position. But when there is no open position it is working fine. Kindly check. Also when trying to place an SLM order with a different quantity for a open position I am getting the below Error, but when there is no open position it is working fine. Even stranger this is only happening for Options, for equity I did not face any issue.
basic SLM order code used.
resp = client.place_order(order_type = "MIS", instrument_token = 31207, transaction_type = 'SELL', quantity = 100, \
price = 0, trigger_price = 5.2, tag = 'test') # LTP 9.5" Trying to place an SLM order @ 5.2 with different quanity 100 than position 50
print(resp)
#########Response########
Exception when calling OrderApi->place_order: (-1)
Reason: Order Cancel
HTTP response body: {"fault":{"code":-1,"description":"Order Quantity is greater then net traded quantity","message":"Order Cancel"}}
It is wierd, when I place a stop loss market, it is getting closed immediately like a market order without considering trigger point and close the position. But when there is no open position it is working fine. Kindly check. Also when trying to place an SLM order with a different quantity for a open position I am getting the below Error, but when there is no open position it is working fine. Even stranger this is only happening for Options, for equity I did not face any issue.
basic SLM order code used. resp = client.place_order(order_type = "MIS", instrument_token = 31207, transaction_type = 'SELL', quantity = 100, \ price = 0, trigger_price = 5.2, tag = 'test') # LTP 9.5" Trying to place an SLM order @ 5.2 with different quanity 100 than position 50 print(resp)
#########Response######## Exception when calling OrderApi->place_order: (-1) Reason: Order Cancel HTTP response body: {"fault":{"code":-1,"description":"Order Quantity is greater then net traded quantity","message":"Order Cancel"}}