Idirect-Tech / Breeze-Python-SDK

The official Python client library for the ICICI Securities trading APIs
MIT License
53 stars 28 forks source link

Square Off OptionPlus Order #29

Closed prattyush closed 1 year ago

prattyush commented 1 year ago

I am trying to square off an option plus order and I keep getting "Resource Not Available".

I am taken examples from your documentation but it doesn't work.

result = self.icicid_client.square_off(exchange_code="NFO", product="options", stock_code="NIFTY", expiry_date=order['expiry_date'], right=order['right'], strike_price=order['strike_price'], action="Sell", order_type="Market", validity="day", stoploss=0, quantity=order['quantity'], price=0, trade_password="", disclosed_quantity="0")

Do tell, if I need to modify any parameter. Further, do we have product or product_type as the input parameter and is OptionPlus a valid attribute.

OptionPlus works with Buy order correctly.

Idirect-Tech commented 1 year ago

To square off an option plus order, a new API will be available soon. Above code won't work and option plus square off is basically square off open position AND cancel cover order as well

prattyush commented 1 year ago

Ohhh ok...

Do we have any tentative timeline like in a month or 6 months. Will be grateful if you can share that.

Idirect-Tech commented 1 year ago

Yes, very soon. Less than a month.

prattyush commented 1 year ago

Cool. Thanks man. Closing the issue.

B.T.W love your api's. My trading improved quite a lot due to the API's, especially able to modify the stop losses programmatically, doing so in UI was very time consuming given that my trading style is scalping which is very time critical.

With square off I could really implement some useful features. OptionPlus is a unique product which is only and only present in ICICI Direct, super duper thankful for it.