Can someone please paste an example code to place SL/SLM order in python?
If I am putting SL order (trigger price + limit price) the order is getting executed as a LIMIT order.
This is the payload that I am sending {'api_key': 'xxx', 'access_token': 'xxx', 'tradingsymbol': 'CRUDEOILM17DECFUT', 'exchange': 'MCX', 'transaction_type': 'SELL', 'order_type': 'LIMIT', 'quantity': '1', 'product': 'NRML', 'price': '3650', 'trigger_price': '3650', 'validity': 'DAY'}
Also, should the price be string or integer? I am not finding any examples in documentation...
Hi, We don't have python example as of now. You can check out example for placing order. It is an example for the limit order, you just need to send order type as SL and add trigger_price to place stop-loss order. You need to send price as a number.
Whatever you send finally it will be sent as a string. In order to be consistent, we recommend using numbers. Price, trigger price are float type. Quantity and disclosed quantity are integers.
We don't have python example as of now.
You can check out example for placing order. It is an example for the limit order, you just need to send order type as SL and add trigger_price to place stop-loss order.
You need to send price as a number.
Check the order type in your code.. or past your snippet here will check