OrderException

vijoeyz
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?

Is there an example on catching Kite exceptions?
  • rakeshr
    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
This discussion has been closed.