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

Account.get_accounts returning error #193

Open
Whiterabbitz opened this issue Jan 10, 2025 · 3 comments
Open

Account.get_accounts returning error #193

Whiterabbitz opened this issue Jan 10, 2025 · 3 comments

Comments

@Whiterabbitz
Copy link

Hi sorry newbie here, hope not wasting your time.

Unable to get account information
The code was working last week.

Code:
session = Session("Username", "Password") # Live - API enabled at TT
print(session)

Returns session handle - #So I gather session is the same and working
<tastytrade.session.Session object at 0x0000016B7A517DD0>

account = Account.get_accounts(session,"Accountnumber")
OR
accounts = Account.get_accounts(session)
account = accounts[0] # Assuming you're using the first account

Fail with:

Field required [type=missing, input_value={'account-number': 'Account...vel': 'No Restrictions'}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.10/v/missing

Account in error in above error message - is partial of live account and correct for both methods.

Have they changed something?

Or am i doing something wrong - as I said code worked last week.

Thanks In Advance

@Graeme22
Copy link
Contributor

Hi! Tasty changed the API a bit, if you update to the latest version (pip install -U tastytrade) the problem should be fixed.

@tirthb
Copy link

tirthb commented Jan 13, 2025

Thanks for fixing it, so fast!

@Graeme22
Copy link
Contributor

No problem! I'm going to leave this open so people on old versions can find this quickly.

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