Closed Jeyanthinath closed 3 years ago
Read this before you create a new issue.
Also What was your order type? Try latest develop. something related to this is fixed in #196 but not yet released.
The issue was in my code , I sent the empty in orderType, but instead of sdk error saying ordertype is empty or wrong , the python exception is happening.
Traceback (most recent call last): File "C:\NSE\Python Script\cash_new.py", line 73, in
alice.place_order(
File "C:\Users\branjan3\AppData\Local\Programs\Python\Python39\lib\site-packages\alice_blue\alice_blue.py", line 536, in place_order
'product':prod_type,
UnboundLocalError: local variable 'prod_type' referenced before assignment
There is a bug in the code, either you should declare the variable and default to that if nothing matches (it won't be logically correct here), or you should say order type should matches and throw an exception yourself. Can you please fix it
ref: https://github.com/krishnavelu/alice_blue/blob/master/alice_blue/alice_blue.py#L514-L539