Order book / trade details / order api does not return past orders

How do i retrieve past past orders (not of current day but of past) that was successful via any platform?

1 Like

Hi @codeofnode

As of now we dont provide past orders through API. This feature we have in Paytm Money Mobile app and web. We will check the feasibility and try to bring this feature in open api in the future.

For me pm.order_book() function is not working to retrieve today’s orders. May I know what am I missing?

pm.order_book()
Traceback (most recent call last):
File “”, line 1, in
File “C:\Users\NSE\pyPMClient-master\pmClient\pmClient.py”, line 246, in order_book
return self.api_call_helper(‘order_book’, Requests.GET, None, None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\NSE\pyPMClient-master\pmClient\apiService.py”, line 26, in api_call_helper
raise Exception(response.text)
Exception: {“status”:500,“message”:“Unexpected Error”,“error_code”:“PM_OPEN_API_500”}

Hi @9899281828

Thanks for highlighting the issue. We are working on this issue and will fix soon and keep you updated.

Also, did it occur multiple time or only once?

1 Like

It’s occuring every time.
Can you please also suggest the best version of python for this pmClient package?

Ok, will update you once the issue is resolved.

Q : Can you please also suggest the best version of python for this pmClient package?
A : >= Python 3.10.1

2 Likes