Shoonya-Dev / ShoonyaApi-py

141 stars 133 forks source link

On place order api call, getting error {'stat': 'Not_Ok', 'emsg': 'Invalid Input : basic_string::at: __n (which is 0) >= this->size() (which is 0)'} #168

Closed aykarageorge closed 2 months ago

aykarageorge commented 2 months ago

Error:

{'stat': 'Not_Ok', 'emsg': 'Invalid Input : basic_string::at: __n (which is 0) >= this->size() (which is 0)'}

This API call was working fine till last Fri, and over the weekend now getting the above error.

Payload:

{'ordersource': 'API', 'uid': '****', 'actid': '****', 'trantype': 'S', 'prd': 'C', 'exch': 'NSE', 'tsym': 'TATAPOWER-EQ', 'qty': '10', 'dscqty': '0', 'prctyp': 'MKT', 'prc': '', 'trgprc': '', 'ret': 'DAY', 'remarks': 'remarks', 'amo': 'No'}

bhushannsolanke commented 2 months ago

were you able to solve the issue? facing similar issue since then it was working fine till last to last week

aykarageorge commented 2 months ago

were you able to solve the issue? facing similar issue since then it was working fine till last to last week

Yes, I tried with 'prc': '0' instead of an empty string. It is resolved for now. It seems there were some updates made in the backend. Below the request that worked for me:

{'ordersource': 'API', 'uid': '', 'actid': '', 'trantype': 'S', 'prd': 'C', 'exch': 'NSE', 'tsym': 'TATAPOWER-EQ', 'qty': '10', 'dscqty': '0', 'prctyp': 'MKT', 'prc': '0', 'trgprc': '', 'ret': 'DAY', 'remarks': 'remarks', 'amo': 'No'}

bhavesh116 commented 2 months ago

yes, it was resolved, the developer that guided me was really helpful and professional

9993900116

On Thu, 25 Jul 2024 at 11:58 AM, George @.***> wrote:

were you able to solve the issue? facing similar issue since then it was working fine till last to last week

Yes, I tried with 'prc': '0' instead of an empty string. It is resolved for now. It seems there were some updates made in the backend. Below the request that worked for me:

{'ordersource': 'API', 'uid': '', 'actid': '', 'trantype': 'S', 'prd': 'C', 'exch': 'NSE', 'tsym': 'TATAPOWER-EQ', 'qty': '10', 'dscqty': '0', 'prctyp': 'MKT', 'prc': '0', 'trgprc': '', 'ret': 'DAY', 'remarks': 'remarks', 'amo': 'No'}

— Reply to this email directly, view it on GitHub https://github.com/Shoonya-Dev/ShoonyaApi-py/issues/168#issuecomment-2249556270, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIQNQ6BKEYXPXPAQCGO7JCTZOCLJXAVCNFSM6AAAAABK4QYCXSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBZGU2TMMRXGA . You are receiving this because you commented.Message ID: @.***>

bhushannsolanke commented 2 months ago

@aykarageorge Thanks! It worked :)