td_accountData {rameritrade} | R Documentation |
Get account balances positions, and orders returned as a list
Description
Retrieves a account data for the accounts linked to the Access Token
Usage
td_accountData(output = "df", accessToken = NULL)
Arguments
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
|
Details
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.
Value
a list of requested account details
Examples
## 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)
[Package rameritrade version 0.1.5 Index]