py5paisa
py5paisa copied to clipboard
FivePaisaClient.bo_order() takes 1 positional argument but 2 were given
- 5paisa Python SDK version: All versions
- Python version: Python3
- Operating System: Windows and Linux both.
Description
I'm trying to place a Bracket Order for Products in NSE EQ segment, but getting the error Scrip does not exist or FivePaisaClient.bo_order() takes 1 positional argument but 2 were given . I tried to test the issue on postman also, but getting the same error on postman and python. Route: BRACKET_ORDER_ROUTE= f'{BaseUrl}BracketOrderRequest'
What I Did
To fix this issue I tried to downgrade the sdk version, but facing the same issue on all versions.
Paste the command(s) you ran and the output.
**Older SDK versions:-**
test_order = bo_co_order(scrip_code=1660, Qty=1, LimitPriceInitialOrder=345, TriggerPriceInitialOrder=345, LimitPriceProfitOrder=0, BuySell='B', Exch='N', ExchType='C', RequestType='P', TriggerPriceForSL=343, )
print(test_order)
client.bo_order(test_order)
____________________________
**py5paisa 0.6.2:-**
test_order = Bo_co_order(scrip_code=1660, Qty=1, LimitPriceInitialOrder=345, TriggerPriceInitialOrder=345, LimitPriceProfitOrder=0, BuySell='B', Exch='N', ExchType='C', RequestType='P', TriggerPriceForSL=343, LimitPriceForSL=343 )
print(test_order)
client.bo_order(test_order)
____________________________________________________________________________
**Here is the error I'm getting on Older sdk versions and postman```**
13:13:26 | Scrip does not exist
____________________________________________________________________________
**Error on latest version of sdk py5paisa 0.6.2**
TypeError: FivePaisaClient.bo_order() takes 1 positional argument but 2 were given
I am also facing this error. any solution?