Scenario: - I place a market order in CNC - Order is rejected because market orders are forbidden for the given instrument - Do I expect and catch an OrderException?
You can handle OrderException, and look for the error message. Example: {"status": "error", "message": "Enter Valid Price", "error_type": "OrderException"}
from kiteconnect.exceptions import OrderException try: # Order placement except OrderException: # Perform the exception handling
OrderException
, and look for the error message.Example:
{"status": "error", "message": "Enter Valid Price", "error_type": "OrderException"}