Pass an Order ID and Account number to cancel an existing open order

td_cancelOrder(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

order API URL. Message confirming cancellation

Examples

if (FALSE) { td_cancelOrder(orderId = 123456789, accountNumber = 987654321) }