areed1192 / td-ameritrade-python-api

Unofficial Python API client library for TD Ameritrade. This library allows for easy access of the Standard API and allows users to build data pipelines for the Streaming API.
MIT License
684 stars 252 forks source link

Account Positions #145

Closed rymoore closed 3 years ago

rymoore commented 3 years ago

I'm using the get_accounts method to retrieve my TD account and was hoping to pull my current positions as shown in this documentation. Unfortunately, I'm not finding the expected 'positions' key in the resulting dictionary (account values, etc appear correct).

Is this a bug or am I doing something incorrectly?

TDSession.get_accounts()[0]['securitiesAccount']

Thanks in advance!

rymoore commented 3 years ago

Found this parameter as an option in the source code - no need for a response!

fields=['orders','positions']