Search for orders associated with a TD account over the previous 60 days. The result is a list of three objects:
jsonlite formatted extract of all orders
all entered orders with details
a data frame of all executed orders with the executions
The TD brokerage account number associated with the Access Token
Orders from a certain date with. Format yyyy-mm-dd. TD indicates there is a 60 day max, but this limit may not always apply
Filter orders that occurred before a certain date. Format yyyy-mm-dd
the max results to return in the query
search by order status (ACCEPTED, FILLED, EXPIRED, CANCELED, REJECTED, etc)
A valid Access Token must be set using
td_auth_accessToken
. The most recent Access Token will be
used by default unless one is manually passed into the function.
a list of three objects: a jsonlite formatted extract of all orders, all entered orders with details, a data frame of all executed orders with the executions
if (FALSE) {
# Get all orders run over the last 50 days (up to 500)
td_orderSearch(accountNumber = 987654321,
startDate = Sys.Date()-days(50),
maxResult = 500, orderStatus = 'FILLED')
}