Idirect-Tech / Breeze-Python-SDK

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

Modify Order not working #119

Open pjsaravanan opened 3 months ago

pjsaravanan commented 3 months ago

Until Friday, my modify order script was working fine. Now, I am facing issues which was reported earlier by other members of the group. As per my experience with BreezeAPI, RequestsJSONDecodeError is thrown, then eventually all modification as well as deletion would not work. Have a look into this immediately. Such interruptions and unexpected behaviours may not give a good feel about using the API's.

Exception: modify_order() Error Traceback: File "F:\Program Files\Python311\streamlit\Lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 589, in _run_script exec(code, module.dict) File "F:\PythonApps\tradingconsole\NewTradingConsoleWithOrderAlgos v2.py", line 751, in breeze.modify_order(order_id=data["order_id"], File "F:\Program Files\Python311\streamlit\Lib\site-packages\breeze_connect\breeze_connect.py", line 891, in modify_order return self.api_handler.modify_order(order_id, exchange_code, order_type, stoploss, quantity, price, validity, disclosed_quantity, validity_date) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "F:\Program Files\Python311\streamlit\Lib\site-packages\breeze_connect\breeze_connect.py", line 1413, in modify_order self.error_exception(self.modify_order.name,e) File "F:\Program Files\Python311\streamlit\Lib\site-packages\breeze_connect\breeze_connect.py", line 949, in error_exception raise Exception(message).with_traceback(error.traceback) File "F:\Program Files\Python311\streamlit\Lib\site-packages\breeze_connect\breeze_connect.py", line 1410, in modify_order response = response.json() ^^^^^^^^^^^^^^^ File "F:\Program Files\Python311\streamlit\Lib\site-packages\requests\models.py", line 978, in json raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)

pjsaravanan commented 3 months ago

Until Friday, my modify order script was working fine. Now, I am facing issues which was reported earlier by other members of the group. As per my experience with BreezeAPI, RequestsJSONDecodeError is thrown, then eventually all modification as well as deletion would not work. Have a look into this immediately. Such interruptions and unexpected behaviours may not give a good feel about using the API's.

Exception: modify_order() Error Traceback: File "F:\Program Files\Python311\streamlit\Lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 589, in _run_script exec(code, module.dict) File "F:\PythonApps\tradingconsole\NewTradingConsoleWithOrderAlgos v2.py", line 751, in breeze.modify_order(order_id=data["order_id"], File "F:\Program Files\Python311\streamlit\Lib\site-packages\breeze_connect\breeze_connect.py", line 891, in modify_order return self.api_handler.modify_order(order_id, exchange_code, order_type, stoploss, quantity, price, validity, disclosed_quantity, validity_date) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "F:\Program Files\Python311\streamlit\Lib\site-packages\breeze_connect\breeze_connect.py", line 1413, in modify_order self.error_exception(self.modify_order.name,e) File "F:\Program Files\Python311\streamlit\Lib\site-packages\breeze_connect\breeze_connect.py", line 949, in error_exception raise Exception(message).with_traceback(error.traceback) File "F:\Program Files\Python311\streamlit\Lib\site-packages\breeze_connect\breeze_connect.py", line 1410, in modify_order response = response.json() ^^^^^^^^^^^^^^^ File "F:\Program Files\Python311\streamlit\Lib\site-packages\requests\models.py", line 978, in json raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)

My guess was right. Cancelling order also faces similar error.

Traceback: File "F:\Program Files\Python311\streamlit\Lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 589, in _run_script exec(code, module.dict) File "F:\PythonApps\tradingconsole\NewTradingConsoleWithOrderAlgos v2.py", line 762, in breeze.cancel_order(exchange_code=data["exchange_code"], order_id=data["order_id"]) File "F:\Program Files\Python311\streamlit\Lib\site-packages\breeze_connect\breeze_connect.py", line 887, in cancel_order return self.api_handler.cancel_order(exchange_code, order_id) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "F:\Program Files\Python311\streamlit\Lib\site-packages\breeze_connect\breeze_connect.py", line 1375, in cancel_order self.error_exception(self.cancel_order.name,e) File "F:\Program Files\Python311\streamlit\Lib\site-packages\breeze_connect\breeze_connect.py", line 949, in error_exception raise Exception(message).with_traceback(error.traceback) File "F:\Program Files\Python311\streamlit\Lib\site-packages\breeze_connect\breeze_connect.py", line 1372, in cancel_order response = response.json() ^^^^^^^^^^^^^^^ File "F:\Program Files\Python311\streamlit\Lib\site-packages\requests\models.py", line 978, in json raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)

Idirect-Tech commented 3 months ago

Dear Saravanan,

We are checking the error. We will get back to you shortly.

[E29CF836] Thanks & Regards, Akash Sapkal, Team Breeze API, ICICI Securities


From: Saravanan Padmanaban @.> Sent: 29 July 2024 09:51 To: Idirect-Tech/Breeze-Python-SDK @.> Cc: Subscribed @.***> Subject: Re: [Idirect-Tech/Breeze-Python-SDK] Modify Order not working (Issue #119)

CAUTION: This email originated from outside the organization! Do not click links, open attachments or reply, unless you recognize the sender's email address! Use 'Report suspicious Email' button in the toolbar to report Phishing mails. Beware!

Until Friday, my modify order script was working fine. Now, I am facing issues which was reported earlier by other members of the group. As per my experience with BreezeAPI, RequestsJSONDecodeError is thrown, then eventually all modification as well as deletion would not work. Have a look into this immediately. Such interruptions and unexpected behaviours may not give a good feel about using the API's.

Exception: modify_order() Error Traceback: File "F:\Program Files\Python311\streamlit\Lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 589, in _run_script exec(code, module.dict) File "F:\PythonApps\tradingconsole\NewTradingConsoleWithOrderAlgos v2.py", line 751, in breeze.modify_order(order_id=data["order_id"], File "F:\Program Files\Python311\streamlit\Lib\site-packages\breeze_connect\breeze_connect.py", line 891, in modify_order return self.api_handler.modify_order(order_id, exchange_code, order_type, stoploss, quantity, price, validity, disclosed_quantity, validity_date) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "F:\Program Files\Python311\streamlit\Lib\site-packages\breeze_connect\breeze_connect.py", line 1413, in modify_order self.error_exception(self.modify_order.name,e) File "F:\Program Files\Python311\streamlit\Lib\site-packages\breeze_connect\breeze_connect.py", line 949, in error_exception raise Exception(message).with_traceback(error.traceback) File "F:\Program Files\Python311\streamlit\Lib\site-packages\breeze_connect\breeze_connect.py", line 1410, in modify_order response = response.json() ^^^^^^^^^^^^^^^ File "F:\Program Files\Python311\streamlit\Lib\site-packages\requests\models.py", line 978, in json raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)

My guess was right. Cancelling order also faces similar error.

Traceback: File "F:\Program Files\Python311\streamlit\Lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 589, in _run_script exec(code, module.dict) File "F:\PythonApps\tradingconsole\NewTradingConsoleWithOrderAlgos v2.py", line 762, in breeze.cancel_order(exchange_code=data["exchange_code"], order_id=data["order_id"]) File "F:\Program Files\Python311\streamlit\Lib\site-packages\breeze_connect\breeze_connect.py", line 887, in cancel_order return self.api_handler.cancel_order(exchange_code, order_id) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "F:\Program Files\Python311\streamlit\Lib\site-packages\breeze_connect\breeze_connect.py", line 1375, in cancel_order self.error_exception(self.cancel_order.name,e) File "F:\Program Files\Python311\streamlit\Lib\site-packages\breeze_connect\breeze_connect.py", line 949, in error_exception raise Exception(message).with_traceback(error.traceback) File "F:\Program Files\Python311\streamlit\Lib\site-packages\breeze_connect\breeze_connect.py", line 1372, in cancel_order response = response.json() ^^^^^^^^^^^^^^^ File "F:\Program Files\Python311\streamlit\Lib\site-packages\requests\models.py", line 978, in json raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)

— Reply to this email directly, view it on GitHubhttps://github.com/Idirect-Tech/Breeze-Python-SDK/issues/119#issuecomment-2254913425, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A3TQZ4ZXPSOG4FHL7CVUCS3ZOW7MLAVCNFSM6AAAAABLTOMKZGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJUHEYTGNBSGU. 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).

Idirect-Tech commented 3 months ago

Dear Saravanan,

We have resolved the error. Modify order functionality is working fine now. Please verify at your convenience.

[E29CF836] Thanks & Regards, Akash Sapkal, Team Breeze API, ICICI Securities


From: Akash Sapkal /EPG/ISEC/NAVI MUMBAI @.> Sent: 29 July 2024 10:46 To: Idirect-Tech/Breeze-Python-SDK @.>; Idirect-Tech/Breeze-Python-SDK @.> Cc: Subscribed @.> Subject: Re: [Idirect-Tech/Breeze-Python-SDK] Modify Order not working (Issue #119)

Dear Saravanan,

We are checking the error. We will get back to you shortly.

[E29CF836] Thanks & Regards, Akash Sapkal, Team Breeze API, ICICI Securities


From: Saravanan Padmanaban @.> Sent: 29 July 2024 09:51 To: Idirect-Tech/Breeze-Python-SDK @.> Cc: Subscribed @.***> Subject: Re: [Idirect-Tech/Breeze-Python-SDK] Modify Order not working (Issue #119)

CAUTION: This email originated from outside the organization! Do not click links, open attachments or reply, unless you recognize the sender's email address! Use 'Report suspicious Email' button in the toolbar to report Phishing mails. Beware!

Until Friday, my modify order script was working fine. Now, I am facing issues which was reported earlier by other members of the group. As per my experience with BreezeAPI, RequestsJSONDecodeError is thrown, then eventually all modification as well as deletion would not work. Have a look into this immediately. Such interruptions and unexpected behaviours may not give a good feel about using the API's.

Exception: modify_order() Error Traceback: File "F:\Program Files\Python311\streamlit\Lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 589, in _run_script exec(code, module.dict) File "F:\PythonApps\tradingconsole\NewTradingConsoleWithOrderAlgos v2.py", line 751, in breeze.modify_order(order_id=data["order_id"], File "F:\Program Files\Python311\streamlit\Lib\site-packages\breeze_connect\breeze_connect.py", line 891, in modify_order return self.api_handler.modify_order(order_id, exchange_code, order_type, stoploss, quantity, price, validity, disclosed_quantity, validity_date) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "F:\Program Files\Python311\streamlit\Lib\site-packages\breeze_connect\breeze_connect.py", line 1413, in modify_order self.error_exception(self.modify_order.name,e) File "F:\Program Files\Python311\streamlit\Lib\site-packages\breeze_connect\breeze_connect.py", line 949, in error_exception raise Exception(message).with_traceback(error.traceback) File "F:\Program Files\Python311\streamlit\Lib\site-packages\breeze_connect\breeze_connect.py", line 1410, in modify_order response = response.json() ^^^^^^^^^^^^^^^ File "F:\Program Files\Python311\streamlit\Lib\site-packages\requests\models.py", line 978, in json raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)

My guess was right. Cancelling order also faces similar error.

Traceback: File "F:\Program Files\Python311\streamlit\Lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 589, in _run_script exec(code, module.dict) File "F:\PythonApps\tradingconsole\NewTradingConsoleWithOrderAlgos v2.py", line 762, in breeze.cancel_order(exchange_code=data["exchange_code"], order_id=data["order_id"]) File "F:\Program Files\Python311\streamlit\Lib\site-packages\breeze_connect\breeze_connect.py", line 887, in cancel_order return self.api_handler.cancel_order(exchange_code, order_id) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "F:\Program Files\Python311\streamlit\Lib\site-packages\breeze_connect\breeze_connect.py", line 1375, in cancel_order self.error_exception(self.cancel_order.name,e) File "F:\Program Files\Python311\streamlit\Lib\site-packages\breeze_connect\breeze_connect.py", line 949, in error_exception raise Exception(message).with_traceback(error.traceback) File "F:\Program Files\Python311\streamlit\Lib\site-packages\breeze_connect\breeze_connect.py", line 1372, in cancel_order response = response.json() ^^^^^^^^^^^^^^^ File "F:\Program Files\Python311\streamlit\Lib\site-packages\requests\models.py", line 978, in json raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)

— Reply to this email directly, view it on GitHubhttps://github.com/Idirect-Tech/Breeze-Python-SDK/issues/119#issuecomment-2254913425, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A3TQZ4ZXPSOG4FHL7CVUCS3ZOW7MLAVCNFSM6AAAAABLTOMKZGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJUHEYTGNBSGU. 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).