alienbrett / PyAlly

Ally Invest API Module for Python3
https://alienbrett.github.io/PyAlly/
MIT License
57 stars 28 forks source link

get_holdings needs account # #19

Closed JTraversa closed 4 years ago

JTraversa commented 4 years ago

Though the documentation appears to indicate that an account # is not necessary to execute get_holdings, it appears that the function returns a Keyerror searching for an account value if you do not provide one.

I am unsure of whether this is an issue with documentation or the wrapper as I haven't looked into ally's documentation on the call as of yet.

eyesuk commented 4 years ago

I am able to get my account holdings with the code below

import ally
a = ally.Ally()
h = a.get_holdings()
print(h)

The account number must be in your shell startup files along with the APIkeys, but it does work

JTraversa commented 4 years ago

Ah, I've hardcoded everything as I'm distributing the application to at least a few others and prompt for input for their Keys. I can just prompt for an account # as well.

Just was not sure if you could query multiple accounts under a key pair at once by omitting a specific account #.

eyesuk commented 4 years ago

Just was not sure if you could query multiple accounts under a key pair at once by omitting a specific account #

APIkeys are unique to accounts, if you would like to query multiple accounts, you would have to submit a new request with the appropriate keys and acct number for the account you are querying.