Provides the order details for a selected brokerage account based on the search criteria provided.
etrd_order_history( account, count = 100, status = NULL, fromDate = Sys.Date() - 30, toDate = Sys.Date(), symbol = NULL, securityType = NULL, transactionType = NULL, marketSession = NULL, output = c("df", "list"), access_tokens = NULL, etrade_cred = NULL, sandbox = FALSE )
The account ID key, not the account ID associated with the
specific account. Use
Number of orders to return with a max of 100
a valid status: OPEN, EXECUTED, CANCELLED, INDIVIDUAL_FILLS, CANCEL_REQUESTED, EXPIRED, REJECTED, PARTIAL, DO_NOT_EXERCISE, DONE_TRADE_EXECUTED
a date object for the start of the filter
a data object for the end of the filter
a specific symbol to filter for
a valid security type: EQ, OPTN, MF, MMF
a valid transaction type: ATNM, BUY, SELL, SELL_SHORT, BUY_TO_COVER, MF_EXCHANGE
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 are created using
The output created from
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 or df of orders