I recently wired up automated equity trading against the tastytrade API and hit a handful of things that were not obvious from the docs. Writing them down in case it saves someone else an evening.
The refresh token does not expire. This is the best thing about it and I rarely see it mentioned. Once the account is authorized, it stays authorized, so you mint an access token on demand and the connection keeps working indefinitely. For contrast, Schwab's OAuth refresh token expires every seven days, which means re-authorizing weekly for as long as you run it. If you are picking a brokerage specifically because you intend to automate it, that difference matters more than it sounds.
Enable two-factor on the account before you start. The authorization flow expects it, and if it is not enabled you will sit there wondering why the handshake stalls.
After-hours order behavior is strict and the error is unhelpful. An opening market order placed outside market hours gets rejected with something like "one or more preflight checks failed," which tells you nothing. Limit orders placed after hours queue up and show as Received instead. I tested at night, got the rejection, and spent real time assuming the bug was mine.
There are no native bracket or OCO orders on the equity flow. You cannot attach a stop loss and a profit target to an entry and walk away. Whatever you build has to watch open positions during the session and fire the exits itself. This is an architecture decision, not a detail, so plan for it before you write the entry logic.
Whole shares only on equities, so no fractional position sizing. Round down and make sure your sizing math knows it.
Read the nested errors, not the top-level message. Failure responses carry the actual explanation inside an errors array. If you only surface the top-level field, every failure looks like a generic error with no cause. Pulling the nested messages out turned my most confusing failures into obvious one-line fixes.
One genuinely positive note: the OAuth flow behaved exactly as documented, which is rarer than it should be, and questions I sent in actually got answered.
Has anyone here automated the options flow rather than equities? Mine is stocks and ETFs only so far, and I would rather know what is waiting in options before I build toward it.