Closed moreirajbn closed 3 years ago
That error is actually from the TD API not the R package. I do not have any checks on order type in the function. You can reach out to the TD api team and ask them to make the change, but they might be hesitant with the future status uncertain.
If you review the documentation, LIMIT_ON_CLOSE is not a valid option: https://developer.tdameritrade.com/account-access/apis/post/accounts/%7BaccountId%7D/orders-0
Thanks for the super quick reply. My bad... I use limit on close orders with TD on other platforms, so I (wrongfully) assumed it was accepted by the API. I'll talk to TD team and ask for this. Thanks again.
Hi, I've been using the rameritrade library and it's been excellent. What I'd like to report here is not really an issue, it's more of a suggestion. The library supports many order types, but Limit on Close (LOC) orders are not accepted, even though TD Ameritrade do support LOC orders. The lirbrary accepts Market on Close, but not Limit on Close orders, so I suspect it might be easy to implement it.
Error: 400 - 'LIMIT_ON_CLOSE' is not a valid orderType. Valid values are (for Order and SavedOrder) 'MARKET', 'LIMIT', 'STOP', 'STOP_LIMIT', 'TRAILING_STOP', MARKET_ON_CLOSE', 'TRAILING_STOP_LIMIT', (these are only valid for Order) 'EXERCISE', 'NET_DEBIT', 'NET_CREDIT', 'NET_ZERO'.
Would it be possible to add this order type? Thanks for the library, it's awesome!