areed1192 / td-ameritrade-python-api

Unofficial Python API client library for TD Ameritrade. This library allows for easy access of the Standard API and allows users to build data pipelines for the Streaming API.
MIT License
684 stars 252 forks source link

CancelTime Format #154

Closed greg12579 closed 3 years ago

greg12579 commented 3 years ago

I see that the code was updated to accept the cancelTime input. However I can't seem to figure out the format to make it work. Any ideas?

areed1192 commented 3 years ago

If you look here you'll see an example of a cancel order.

greg12579 commented 3 years ago

That may work but does not include the time. What if you wanted to cancel the order at 13:35PM? It looks like issue #139 has a similar issue. I see this as a potential fix. I can try it.

('cancelTime', {'date': '2020-12-14T14:30:00', 'shortFormat': False})

areed1192 commented 3 years ago

I would say try with that first and see what happens if it works, I'll add an example in the repo so other people can reference it. It's one of the issues where they never documented so it's just guessing and seeing what works.

JimLynchCodes commented 2 years ago

@areed1192 you put out this library with zero testing? Makes me pretty worried! 😬

ckoehncke commented 2 years ago

2023-12-01T23:00:00+0000 Got following { "error" : "Only dates without specific time are allowed for cancelTime." }

Tried using above cancel time, but got error, still searching

ckoehncke commented 8 months ago

Update, you can set a order to auto cancel on specific date (but not specific time), format is

[cancelTime] = "YYYY-MM-DD"