not able to place stop loss order
-
Can you please check if I am giving correct parameters? I want to place SL buy order with trigger price 119 and limit price 120 (for example).
sl_order= { "variety": 'NORMAL', "tradingsymbol": 'NIFTY31DEC2013750CE', "symboltoken": '39992', "transactiontype": 'BUY', "exchange": "NFO", "ordertype": 'SL', "producttype": "INTRADAY", "duration": "DAY", "quantity": '75', "price": '120.0', "trigger_price": '119.0', "squareoff": "0", "stoploss": "1", } obj.placeOrder(sl_order)
I get this response:
-
@admin - hi can anyone help with an example please? what params I need to send for SL-Limit order? Thanks.
-
Hi @prateekjjw001 , please check order constants and input correct parameters.
-
@admin - thanks, I still get an issue though:
order=create_order('NIFTY31DEC2014800CE','41772','BUY','75',order_type='STOPLOSS_LIMIT',trigger_price='2.0',limit_price='2.1',variety='STOPLOSS') order_id=obj.placeOrder(ce_sl_order)
I check order status and it has below error message in 'text' field of order:
16408 : Trigger price entered has invalid characters -
@admin - as discussed on call, there seems to be some issue with python sdk for SL orders. Please get this rectified.
-
Hi @prateekjjw001 ,
We placed an order using PythonSDK without any issues. Please find below our getOrderBook API response
The Response Content b'{"status":true,"message":"SUCCESS","errorcode":"","data":[{"variety":"STOPLOSS","ordertype":"STOPLOSS_LIMIT","producttype":"INTRADAY","duration":"DAY","price":2.0,"triggerprice":2.1,"quantity":"75","disclosedquantity":"0","squareoff":0.0,"stoploss":0.0,"trailingstoploss":0.0,"tradingsymbol":"NIFTY31DEC2014800CE","transactiontype":"BUY","exchange":"NFO","symboltoken":"41772","instrumenttype":"OPTIDX","strikeprice":14800.0,"optiontype":"CE","expirydate":"31DEC2020","lotsize":"75","cancelsize":"0","averageprice":0.0,"filledshares":"0","unfilledshares":"75","orderid":"201230001530388","text":"order is not open","status":"not modified","orderstatus":"rejected","updatetime":"30-Dec-2020 16:11:45","exchtime":"","exchorderupdatetime":"","fillid":null,"filltime":null},
-
@admin
Not getting any tick data for NFO.{"token":"49853","symbol":"NIFTY21JANFUT","name":"NIFTY","expiry":"28JAN2021","strike":"-1.000000","lotsize":"75","instrumenttype":"FUTIDX","exch_seg":"NFO","tick_size":"5.000000"}
-
@vikashshaw893 said in not able to place stop loss order:
{"token":"49853","symbol":"NIFTY21JANFUT","name":"NIFTY","expiry":"28JAN2021","strike":"-1.000000","lotsize":"75","instrumenttype":"FUTIDX","exch_seg":"NFO","tick_size":"5.000000"}
Hi, we need to take remote access tomorrow during market hours. Please share your contaact details on api@angelbroking.com
-
Hi @admin
As you mentioned I had send email with my contact details.
Please intimate the discussion -
@vikashshaw893 said in not able to place stop loss order:
As you mentioned I had send email with my contact details.
Hi @vikashshaw893 , thank you for your time. The issue is now resolved.