etrd_account_balance {etrader} | R Documentation |
ETrade Account Balances
Description
This API returns detailed balance information for a specified account for the current user. The information returned includes account type, option level, and details on up to four balances - account balance, margin account balance, day trade balance, and cash account balance.
Usage
etrd_account_balance(
account,
realTimeNAV = "false",
output = c("df", "list"),
access_tokens = NULL,
etrade_cred = NULL,
sandbox = FALSE
)
Arguments
account |
The account ID key, not the account ID associated with the
specific account. Use |
realTimeNAV |
Default is false. If true, fetches real time balance |
output |
Indicate whether the output should be in the form of a data frame ('df') or list ('list'). Data frame is returned by default. |
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. |
Value
df or list of account balance information
Examples
## Not run:
account_id = etrd_account_list()$accountIdKey[1]
etrd_account_balance(account_id)
## End(Not run)