OpenApi-5p / py5paisa

Official Python SDK for 5paisa APIs natively written in VB .NET
https://5paisa.github.io
92 stars 68 forks source link

Not able to place an order #93

Open adish1501 opened 3 years ago

adish1501 commented 3 years ago

Description

Actually, I have installed "py5paisa-0.3.1" too, but I was not able to logged in and getting this error "TypeError: 'NoneType' object is not subscriptable". As a result, I moved back to older version "py5paisa-0.1.8" where I am able to logging into 5paisa account but not able to place an order and received following error while executing following command:

Code from py5paisa.order import Order, OrderType, Exchange File "", line 1, in test_order = Order(order_type='B',exchange='N',exchange_segment='D', scrip_code=52875, quantity=50, price=205,is_intraday=True,atmarket=False)

Error Received

File "C:.....\py5paisa\order.py", line 64, in init self.exchange = exchange.value

AttributeError: 'str' object has no attribute 'value'

Can you please rectify the issue

qalpesh commented 3 years ago

You are getting an attribute error for line 64.