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

The accountid environment variable was not passed in #75

Open
Aspire1Inspire2 opened this issue Apr 25, 2020 · 2 comments
Open

The accountid environment variable was not passed in #75

Aspire1Inspire2 opened this issue Apr 25, 2020 · 2 comments
Labels
question Questions about use, potential features, or improvements

Comments

@Aspire1Inspire2
Copy link

why is the self.accountIds = account_ids or []?
Is this intentional?
Or should we use self.accountIds = account_ids or os.environ['TDAMERITRADE_ACCOUNT_ID']?

class TDClient(object):
    def __init__(self, client_id=None, refresh_token=None, account_ids=None):
        self._clientId = client_id or os.environ['TDAMERITRADE_CLIENT_ID']
        self._refreshToken = refresh_token or os.environ['TDAMERITRADE_REFRESH_TOKEN']
        self.accountIds = account_ids or []
        self.session = TDASession(self._refreshToken, self._clientId)
@timkpaine
Copy link
Owner

account_ids isn't necessary to be set, as generally speaking most people either have a single account, or want information on all their accounts. we could pick it up from the environment, sure, but theres no need since its not a secret like the tokens are. so making it an argument is fine.

@timkpaine timkpaine added the question Questions about use, potential features, or improvements label Apr 25, 2020
@dahifi
Copy link
Collaborator

dahifi commented Apr 29, 2020

I load my account ID in an env file along with the rest of my account info since there's no need to have it checked in source control.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Questions about use, potential features, or improvements
Projects
None yet
Development

No branches or pull requests

3 participants