py5paisa
py5paisa copied to clipboard
place_order() takes 1 positional argument but 2 were given
- 5paisa Python SDK version: 0.5.1
- Python version: 3.7.4
- Operating System: Windows 10
Description
I am trying to place an order via the place_order() method. But I am getting the following error :
17:38:32 | 'NoneType' object is not subscriptable
17:38:32 | 'head'
17:38:32 | 'NoneType' object is not subscriptable
None
Traceback (most recent call last):
File "c:/Users/test/Desktop/Projects/NewProject/Code/core.py", line 38, in
My code:
from py5paisa import FivePaisaClient
from py5paisa.order import Order, OrderType, Exchange
cred={
"APP_NAME":"YOUR APP_NAME",
"APP_SOURCE":"YOUR APP_SOURCE",
"USER_ID":"YOUR USER_ID",
"PASSWORD":"YOUR PASSWORD",
"USER_KEY":"YOUR USERKEY",
"ENCRYPTION_KEY":"YOUR ENCRYPTION_KEY"
}
client = FivePaisaClient(email="[email protected]", passwd="password", dob="YYYYMMDD",cred=cred)
client.login()
test_order = Order(order_type='B',exchange='B',exchange_segment='C', scripdata = 'GOLDM 03 Nov 2021_20211103', quantity=1, price=47900,is_intraday=True,IsGTCOrder=False,IsEOSOrder=True)
response = client.place_order(test_order)
I am too facing the same problem !!
Having same issue. @5paisa Looks like some of your new changes causing this issue in py5paisa.py file. Please fix asap
Any workarounds at least?
same issue facing as well when deploying the code on Google cloud, could you please help with solution
I am also facing same issue. 5paise has changed the way of placing an order as per new documentation.
client.place_order(OrderType='B',Exchange='N',ExchangeType='C', ScripCode = 1660, Qty=1, Price=260)
But with the above format, I am not able to make market order. If i set Price to 0 for market order, 11:04:36 | please enter valid input above error is being thrown.
5paise team, please help.
Please follow latest documentation.
Now it is single instruction.
Dear @5paisa team, please help. I'm having same issue for Bo TypeError: FivePaisaClient.bo_order() takes 1 positional argument but 2 were given
I'm still facing the same error in 2023.....When will this problem be resolved?