Finvasia Shoonya throws this error when it receives an order that is not valid.
What is an invalid order?
- Incorrect stock/derivative symbol being passed
- Invalid quantity: Quantity not in multiples of derivative lot size
- Invalid price: Price not in multiples of tick size. If tick size is 0.05, then prices like 10.55, 10.60 are valid but 10.78, 220.11 are invalid. Zero price is only valid for market orders, for all other order types price must be non-zero.
- Price out of range: Price too far away from live price (i.e. outside the circuit limit range)
- Invalid target & stoploss in case of Bracket Order (Every stock has specific max target & stoploss range defined by the stock broker)
- Stoploss order – Invalid trigger price (trigger already hit): If trigger price is higher than live price (for a sell stoploss order) or trigger price is lower than live price (for a buy stoploss order)
- Stoploss order – Invalid price: Price lower than trigger price for a buy stoploss order or Price higher than trigger price for a sell stoploss order
- Incorrect Product Type: An intraday order for a stock that has been banned for intraday trading
- Any other order parameters that can cause order to fail validation checks
Solution
The only solution here is to replicate the exact same order by directly entering it on Shoonya. You will most likely find the cause there.
Note that in some cases of a stoploss order, you might need to change trigger price & order price with respect to the current live price to replicate the scenario. This is because stock price would have changed when you are testing than what it was when error occurred.