Pass an order ID and Account number to get details such as status, quantity, ticker, executions (if applicable), account, etc.

td_orderDetail(orderId, accountNumber, accessToken = NULL)

Arguments

orderId

A valid TD Ameritrade Order ID

accountNumber

The TD brokerage account number associated with the Access Token

accessToken

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.

Value

list of order details

Examples

if (FALSE) {

# Get stored refresh token
refreshToken = readRDS('/secure/location/')

# generate a new access token
accessToken = td_auth_accessToken(refreshToken, 'consumerKey')

# Get order details for a single order
# Passing Access Token is optional once it's been set
td_orderDetail(orderId = 123456789, accountNumber = 987654321)

}