Idirect-Tech / Breeze-Python-SDK

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

how to place optionplus sell order #26

Open bluealien0x7bd opened 1 year ago

bluealien0x7bd commented 1 year ago

Trying to place optionplus sell order `place_order(stock_code="NIFTY", exchange_code="NFO", product="optionplus", action="sell", order_type="Market", quantity="50", price="29", # limit price stoploss='25', # SLTP validity="day", disclosed_quantity="0", validity_date="2023-05-26T06:00:00.000Z", expiry_date="2023-06-01T06:00:00.000Z", right="put", strike_price="18200", order_type_fresh="Market", # Limit or Market

fresh order price.

                                                 order_rate_fresh="20",
                                                 user_remark="Test")`

but it returns error '{'Success': None, 'Status': 500, 'Error': 'Incorrect Limit Rate received. Actual Rate: 33.00'}'

How to calculate limit price, because its expecting limit price to be 33. Other than 33, all other values giving error.

Idirect-Tech commented 1 year ago

Dear User,

Correct limit price can be obtained from the error message only. In future, we will provide a way to calculate the limit price in SDK or a sperate API for the same.

Meanwhile, you will have to manually take the LP from error msg and feed it in the input parameters of the API


From: bluealien0x7bd @.> Sent: Friday, May 26, 2023 4:59 PM To: Idirect-Tech/Breeze-Python-SDK @.> Cc: Subscribed @.***> Subject: [Idirect-Tech/Breeze-Python-SDK] how to place optionplus sell order (Issue #26)

External Email Warning: Use 'Report suspicious Email' button to report Phishing mails. Do not click on any attachment or links/URL in this email unless sender is reliable.

Trying to place optionplus sell order place_order(stock_code="NIFTY", exchange_code="NFO", product="optionplus", action="sell", order_type="Market", quantity="50", price="29", # limit price stoploss='25', # SLTP validity="day", disclosed_quantity="0", validity_date="2023-05-26T06:00:00.000Z", expiry_date="2023-06-01T06:00:00.000Z", right="put", strike_price="18200", order_type_fresh="Market", # Limit or Market # fresh order price. order_rate_fresh="20", user_remark="Test")

but it returns error '{'Success': None, 'Status': 500, 'Error': 'Incorrect Limit Rate received. Actual Rate: 33.00'}'

How to calculate limit price, because its expecting limit price to be 33. Other than 33, all other values giving error.

— Reply to this email directly, view it on GitHubhttps://github.com/Idirect-Tech/Breeze-Python-SDK/issues/26, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A3TQZ42XM6TX3BLIOH6S6K3XICH23ANCNFSM6AAAAAAYQDIX2E. You are receiving this because you are subscribed to this thread.Message ID: @.***>

Print this mail only if absolutely necessary. Save Paper. Save Trees." "The information contained in this e-mail and any attachments to this message are intended for the exclusive use of the intended recipient and may contain proprietary, confidential or legally privileged information. If you are not the intended recipient, please note that you are not authorised to disseminate, distribute or copy this e-mail or any parts of it or act upon/rely on the contents of this e-mail in any manner. Please notify the sender immediately by e-mail and destroy all copies of this e-mail and any attachments. Please also note that ICICI Bank or its subsidiaries and associated companies, (collectively "ICICI Group"), are unable to exercise control or ensure the integrity of/over the contents of the information contained in e-mail transmissions and that any views expressed in this e-mail are not endorsed by/binding on the ICICI Group unless the sender does so expressly with due authority of ICICI Group. Before opening any attachments please check them for viruses and defects and please note that ICICI Group accepts no liability or responsibility for any damage caused by any virus that may be transmitted by this email. Any unauthorized use of this email or any attachment(s) may be treated as infringement of right(s) including right of privacy under the applicable laws of India including Information and Technology Act, 2000. Thank you for your cooperation. Regulatory Disclosures are available on https://www.icicisecurities.com (for institutional business) and www.icicidirect.com (for retail business).