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

Authentication not working #4

Open
MonkeymanCoder opened this issue Jan 29, 2021 · 1 comment
Open

Authentication not working #4

MonkeymanCoder opened this issue Jan 29, 2021 · 1 comment

Comments

@MonkeymanCoder
Copy link

If I am understanding this correct, the client.py will redirect you to a login page where you will enter user id pwd and pass an access token to the client and this is how authentication will be done. I ran this program and it is not taking me to any web page opening a browser not authenticating. So please let me know if this is a working code or still more work needs to be done.

@eyesuk
Copy link

eyesuk commented Feb 12, 2021

This is what you need to do in order to log in successfully.
First follow the updates on issue #2 to the client.py, then add a ts_client.login() to initiate a log in within your code.

if you do this correctly in your text editor/IDE, the output will be a url to paste in your browser, and the response from that url should be pasted back to your text editor/IDE output location.

Hope this helps

from ts.client import TradeStationClient
ts_client = TradeStationClient(
    username="your_id",
    client_id="your_client_id",
    client_secret="your_secret",
    redirect_uri="http://localhost:27353/callback",
    paper_trading="PAPER_TRADING"
    
)
ts_client.login()
a= ts_client.quotes(symbols=['AMZN'])

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

2 participants