Can someone please help and provide the sample code for placing and modifying the bracket order. I have tried multiple things and even took help from ChatGPT, still it is not working well.
Also, if someone can help, what the below error is, I am getting while updating an ‘PENDING’ StopLoss order as below.
tsl.modify_order(
appOrderID = order_id,
modifiedOrderType=‘STOP_LOSS_MARKET’,
modifiedOrderQuantity=1,
modifiedLimitPrice=6.9,
modifiedStopPrice=6.9,
trade_type=‘MIS’
)
Traceback (most recent call last):
File “c:\Users\anura\OneDrive\Desktop\Anurag\dhan\DhanHQ-py\Strategy\Dhan_Tradehull_V2.py”, line 1373, in modify_order
p_orders = pd.DataFrame(self.xts1.get_order_book()[‘result’])
^^^^^^^^^
AttributeError: ‘Tradehull’ object has no attribute ‘xts1’
Sorry, if I have asked two questions in the same post.