Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frequently receiving 'Request Unauthorised' error #38

Closed
ronaldpaul opened this issue Jan 31, 2022 · 4 comments
Closed

Frequently receiving 'Request Unauthorised' error #38

ronaldpaul opened this issue Jan 31, 2022 · 4 comments

Comments

@ronaldpaul
Copy link

Whenever I try to modify order status or try to square off any positions, I very often receive the error

{"status":"error","message":"Request Unauthorised","data":{}}

I am not sure whether this has something to do with token authorization or any other issues from the broker side. But I receive this very often in the web socket. Please let me know how I can resolve this issue.

An example scenario is, if LTP is greater than specific price, modify a pending order. When I try to do this, I see this error printed in log.

Thanks.

@ronaldpaul
Copy link
Author

@algo2t , kindly help in resolving this issue. I checked with SAS Online, they mentioned that the URL alpha.sasonline.in will session out in 75 minutes of inactivity. It appears that they have released new API with the base URL as alphaapi.sasonline.in. If possible, kindly incorporate this URL and routes mentioned in the document https://drive.google.com/file/d/15HMf1ieewe2FgHxZJ-YIGeDtyNVEgCQ2/view.

Thanks a lot for your effort in building this library.

@algo2t
Copy link
Owner

algo2t commented Apr 1, 2022

Their new API is completely different and needs api_secret , I will have to evaluate the effort and then do the update or might think of creating some other package

@algo2t algo2t pinned this issue May 3, 2022
@suresh-n
Copy link

suresh-n commented May 4, 2022

is Access token endpoint: /oauth2/token working ? i get the response code after enter credntial & twfa but when i'm tryign to generate token using the response code getting "Method Not Allowed 405" error.

sasonline support team saying the wont support further on this.

example:

https://alphaapi.sasonline.in/oauth2/token?grant_type=authorization_code
&client_id=xxxxx
&client_secret=zzzzzzz
&code=yyyyyyy
&redirect_uri=http://127.0.0.1

@ronaldpaul
Copy link
Author

I resolved this 'Request Unauthorised' error by polling the server once for every one hour. It keeps the connection alive. Closed the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants