etrd_account_portfolio | R Documentation |
Provides detailed portfolio information for a selected brokerage account
etrd_account_portfolio( account, count = 50, marketSession = "REGULAR", totalsRequired = "false", lotsRequired = "false", view = "QUICK", access_tokens = NULL, etrade_cred = NULL, sandbox = FALSE )
account |
The account ID key, not the account ID associated with the
specific account. Use |
count |
The number of positions to return in the response. If not specified, defaults to 50. 50 is also the maximum. |
marketSession |
The market session. Default: REGULAR. Options: REGULAR, EXTENDED |
totalsRequired |
It gives the total values of the portfolio. Default: false. |
lotsRequired |
It gives position lots for positions. Default: false. |
view |
The view query. Default: Quick. Options: PERFORMANCE, FUNDAMENTAL, OPTIONSWATCH, QUICK, COMPLETE |
access_tokens |
Access tokens are created using
|
etrade_cred |
The output created from
|
sandbox |
ETRADE offers a sandbox environment for validating API calls and responses. If using the sandbox environment, this must be set to TRUE in each function called throughout etrader. ETRADE states "Sandbox responses use stored data that's intended to provide typical responses for basic use cases. So the responses you receive will not contain current data, and may not exactly match your requests in other ways." Essentially, the responses will not match the requests entered but successful pull will indicate whether the entry was valid or not. |
a list of portfolio objects based on request
## Not run: account_id = etrd_account_list()$accountIdKey[1] et_act_details = etrd_account_portfolio(account_id) # Convert list to a data frame positions = dplyr::bind_rows(lapply(et_act_details$AccountPortfolio[[1]]$Position, function(x) {data.frame(x)})) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.