python equity & FO Order Code for individually buy sell modify with stop loss and stop loss market

pals
I searched through the documentation and unable to find the individual example code for equity and option , now i am executing orders by market without stop loss , it reduce the capital . . . . . please help me to find a example for orders manipulation . . .
  • rakeshr
    You can refer to this example for placing Market equity order. To place stoploss order you need to change order_type to SL/SLM and send additional field of trigger_price and price field based on SL/SL-M order type. You can refer to this documentation to know about all order fields.
  • pals
    thanks for reply,
    I will try

    the combinations gives some errors like the following

    kiteconnect.exceptions.InputException: Trading in NSE is not allowed using NRML product type. Try placing an order in CNC/MIS.

    I will reply after test . . .

    Thanks for instruction . . .
  • sujith
    @pals,
    You can know more about product types at Zerodha here.
  • pals
    My thanks to sujith and rakeshr , motivated to next step tos olve the problem . . .
    I tried with some combinations and finally have done a SLM order . . .. . .

    I confused with the below combinations, so i searched the python example code for diff orders . .
    how to use where to use, which is suitable with other . . .

    # Products
    PRODUCT_MIS = "MIS"
    PRODUCT_CNC = "CNC"
    PRODUCT_NRML = "NRML"
    PRODUCT_CO = "CO"
    PRODUCT_BO = "BO"

    # Order types
    ORDER_TYPE_MARKET = "MARKET"
    ORDER_TYPE_LIMIT = "LIMIT"
    ORDER_TYPE_SLM = "SL-M"
    ORDER_TYPE_SL = "SL"

    # Varities
    VARIETY_REGULAR = "regular"
    VARIETY_BO = "bo"
    VARIETY_CO = "co"
    VARIETY_AMO = "amo"

    ------------------the above are the items --------------------------
    ------------------below are the order placement --------------------------

    def place_order(self,
    variety,
    exchange,
    tradingsymbol,
    transaction_type,
    quantity,
    product,
    order_type,
    price=None,
    validity=None,
    disclosed_quantity=None,
    trigger_price=None,
    squareoff=None,
    stoploss=None,
    trailing_stoploss=None,
    tag=None):
    """Place an order."""

    ----------------------------------------------------------------------------------
Sign In or Register to comment.