td_accountData | R Documentation |
Retrieves a account data for the accounts linked to the Access Token
td_accountData(output = "df", accessToken = NULL)
output |
Use 'df' for a list of 3 data frames containing balances, positions, and orders. Otherwise the data will be returned as a list of lists |
accessToken |
A valid Access Token must be set using
|
The output will be either a list of three data frames or a list of three
lists that contain balances, positions, and orders for TD Ameritrade accounts
linked to the access token. For historical orders, see
td_orderSearch
. The default is for a data frame output which is
much cleaner.
a list of requested account details
## Not run:
# Get stored refresh token
refreshToken = readRDS('/secure/location/')
# Generate a new access token
accessToken = td_auth_accessToken(refreshToken, 'consumerKey')
# Passing the accessToken is optional. The default will return balances
asDF = td_accountData()
asList = td_accountData('list',accessToken)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.