> Every Taji docs page as Markdown: https://docs.taji.is/llms.txt

# TradeStation

A US broker for stocks, options and futures, reached with your own TradeStation API key.

## Before you link

You need your own TradeStation API key and secret, which TradeStation issues for a funded account, then a sign-in in your browser.

### Fees

`tradestation.com/pricing/`:

- Equity (2026-09-21): $0 per order and share; pass-through not itemized.
- Option (2026-09-21): $0–$0.80 single-leg, $0–$0.40 multi-leg per contract, tier-dependent (index +$0.50); FINRA CAT $0.000003/deliverable share, min $0.01/trade.
- Future (2026-10-06): $0 per order; $1.75 Regular, $0.50 Micro per contract at 0–500 contracts/month, commission only; futures options $0.85; clearing $0.10/contract/side under the top tier; exchange and NFA fees extra, not itemized.

### Data subscriptions

Non-pro, per contract-account. AMEX/NYSE/NASDAQ Pkg #1 $1.00 each, Pkg #2 $11.00, Pkg #3 $16.00, OPRA $3.00; futures real-time (CME/CBOT/COMEX/NYMEX) $0 meeting a $40/mo futures-commission threshold. `tradestation.com/pricing/`, 2026-09-21.

The bind probes the plan (`probe_tier`): equity, index, future and option real-time were measured on one sign-in (M, 2026-11-19).

## Link

Start `tradestation-sim` from Connections in the window, or run `taji-link tradestation-sim`. It takes the API key and secret, which Taji seals in the vault, then you sign in in your browser; signing in also lists your funded accounts, where orders are real.

### Linking

Fetched 2026-11-18. Standard Auth0 key (`client_secret` on every refresh, access token 20 min / 1200 s, `auth.rs`; `https://api.tradestation.com/docs/fundamentals/authentication/auth-overview`, `…/refresh-tokens`). "yours" is a password, a code or money.

| Step | Page and controls | Yours |
|---|---|---|
| `account` | `https://api.tradestation.com/docs/faq` ("How do I get an API Key?"): funded TradeStation account required; links "API Product Page" (`https://www.tradestation.com/trading-platforms/trading-api/`). `https://www.tradestation.com/platforms-and-tools/trading-api/` (`https://www.tradestation.com/trading-api/`): "Fund your account with a minimum balance of $10,000"; buttons "Get started", "Request an API Key" (`https://developer.tradestation.com`). `https://www.tradestation.com/open-account/` (`…/pricing/open-account/`): "Open account". `https://www.tradestation.com/pricing/funding-instructions/`: "Open account"; "Select the account type you would like to fund:" ("Equities", "Futures", "Futures Options"), steps "Account Type", "Assets to Transfer", "Transfer Method", "Currency", "Instructions", button "Next". Application and deposit controls at `https://my.tradestation.com`: unsourced | yours: opening an account, funding |
| `ask` | e-mail Client Experience (address on `https://api.tradestation.com/docs/faq`); no self-service key control in `api.tradestation.com/docs`. On `https://www.tradestation.com/platforms-and-tools/trading-api/`: "Once funded, TradeStation will send over your unique API key", or "Request an API Key" (`https://developer.tradestation.com`, form controls unsourced). Email subject/body fields: unsourced | none: the agent may |
| `issued` | Client Experience issues an Auth0 "API Key" (`client_id`) and `client_secret` under "Default API Key Configuration" (`Regular Web App`, `Auth Code Flow`, non-expiring "Refresh Tokens", scopes `MarketData`, `ReadAccount`, `Trade`, "Allowed Callback URLs" `http://localhost`, `:80`, `:3000`, `:3001`, `:8080`, `https://api.tradestation.com/docs/fundamentals/authentication/api-keys`; plus `http://localhost:31022`, `…/auth-code`). Delivery format and issuance wait (`wait_s`): unsourced | none: agent (`sign_in` at `https://signin.tradestation.com/authorize` is yours: login) |

## What you get

Your balances, positions and orders, and TradeStation's market data, for stocks, options and futures. What it serves, cell by cell: [TradeStation coverage](https://docs.taji.is/reference/coverage/tradestation.md).

## Behaviour and limits

Measured 2026-08-03 to 2026-11-19; each entry carries its own date. P = vendor doc; D = the vendor's OpenAPI document; M = measured.

### Sign-in redirect

**The allow-listed loopback redirect is the bare origin (2026-09-13).** `authorize` with `redirect_uri=http://localhost:31022` or `…/`: 302 to `/u/login`; `…/callback`: `login-error`, `Callback URL mismatch`.

### Contract list

v3 has no `symbols/search`. A root's dated futures: v2 search `C=FU&R=<root>` (or `C=Future`); `C=F` is 400 `Invalid search criteria` on both hosts (2026-10-08).

`symbols/{s}`, 2026-09-28 (`symbols.rs`): MNQZ26 tick `0.25`, point value `2`; AAPL, `$SPX.X` tick `0.01`, point value `1`; SPY 261218C600 point value `100`. No tradability, halt, size cap or notional floor; unlisted `Errors[]` `NotFound`.

### Symbology

Probed on `symbols/`, `quotes/`, `barcharts/`, `options/expirations/`, 2026-10-26:

- Stock: served `BRK.A`, `BRK.B`, `BAC.PL`; NotFound `BRK/B`, `BRK-B`, `BRKB`, `BAC.P`, `AAPL(D)`; `.P .W .F .Q .D` are per symbol.
- Future: served `ESZ26`, `ESZ26.D`, `@ES`, `@ES.D`, `@ESZ26`, `@ESZ26.D`; NotFound `ESZ6`, `.P`, `.C`, `CLZ26.D`.
- Forex: served `EURUSD`, `.A`, `.M`, `.B`; `BTCUSD`; NotFound `.O`, `EUR/USD`, `BTCUSD.A`.
- Index, `.X` only: `DOT_X_INDEXES` (`lib.rs`); bare NotFound.
- Index, bare only: COMP DJI INDU TICK TRIN ADD DJT DJU SOX BKX XAU XND; `.X` NotFound.
- Index `RUT` `OEX`: in `DOT_X_INDEXES`; bare answers only `symbols/`, quotes and bars `Not entitled`, no expirations.
- Index, neither: DJIA NYA MID SML SPXPM.

Option roots (`{root} {YYMMDD}{C\|P}{strike}`, `BRKB` for `BRK.B`; `occ.rs`) answer `symbols/` and `quotes/` with `PointValue` 100; an index's chain lists `SPX`; `SPXW` (also `EOM`); `NDX`; `NDXP`; `RUT`; `RUTW`; `MRUT`; `XSP`; `OEX`; `VIX` with `VIXW`; `DJX` with `DJXW`; `BKX` with `BKXPM`; `XAU`. `$VIXW.X`, `$DJXW.X`, `$SPX` expirations: 400. Digit roots (`SPY7`, `GM1`): expirations 400, `symbols/` NotFound (no mini or adjusted series).

### Rate limit and error semantics

Per sign-in (API key × user), rolling; budgets and stream caps in `ratelimit.rs` (`api.tradestation.com/docs/fundamentals/rate-limiting/rate-limiting-overview`, 2026-10-12, 2026-10-22).

Concurrency limits bind open streams, not REST requests (P, 2026-10-31); charged per open, never per message. 429 `Rate quota exceeded` or `Stream quota exceeded`.

`400: Invalid Symbol` is permanent, by message.

Idle connections close at 115-120 s on `api` and `sim-api` (2026-10-31).

An invalid symbol in a multi-symbol `stream/quotes` is one frame, `{"Symbol":"ZZQQNOTREAL","Error":"FAILED, INVALID SYMBOL"}`; the rest stream on (SIM, 2026-10-19). Any other `{Symbol, Error}` is the teardown's bare `FAILED` (2026-08-03).

**`stream/marketdepth/aggregates` `MNQZ26`, SIM 2026-12-02:** 10 levels a side, best price first, per level `Price`, `TotalSize`, `TotalOrderCount`, `LatestTime` (`quotes.rs`, `source.rs`); `AAPL` is 401 not entitled on this login.

### OHLCV — daily and 1-minute

`barcharts` (chunked by month in `hist.rs`) has no settle but states `TotalTicks`, `UpVolume`, `DownVolume`. 1-minute history reaches 1997.

`barcharts` `interval=5` and `30` (`unit=Minute`) equal the `1` fold, close-stamped, no page or limit (SPY regular and `USEQ24Hour`, ESZ26 Globex, 2026-10-29/30; `hist.rs`). 20,000 regular minutes of 1m: 400 (2026-11-02).

**5m and 30m, other classes, week 2026-11-02/06, measured 2026-11-07:** `$SPX.X`, `SPY 261113C735`, `BTCUSD`, `EURUSD`, `ESZ26 C7600` serve both on the clock mark; a bar closing at a session end is stamped at its close (crypto and forex 21:59Z, options 16:15 ET; `hist.rs` `Grid::start`).

`interval=60` and `240` (2026-10-29/30, 2026-01-12/16, measured 2026-11-01/02): SPY `Default` from 09:30 ET, `USEQ24Hour` from 04:00 (no 09:30 break), ESZ26 from 18:00 (17:00 halted), native (`hist.rs`).

**Indexes serve 1-minute bars, 2026-09-15:** `$SPX.X` contiguous, open-stamped, the last forming; the bar stream closes each minute (`BarStatus: "Closed"`, `IsRealtime: true`, `barstream.rs`, SIM 2026-09-23).

**Options serve 1-minute and daily bars, SIM 2026-09-23**: daily stamped 20:15Z (option close), the last forming; 1m streams (`AAPL 261218C330`, SIM 2026-09-29; unlisted `404`). `BTCUSD` 2026-09-30: 1m; daily weekdays, stamped 16:59 ET all year.

**Forex and future-option bars, 2026-10-31:** `EURUSD` 1m, 5m, 30m, daily weekdays stamped 16:59 ET, `TotalVolume` `0`. `ESZ26 C7600` 1m, 5m, 30m, daily weekdays stamped 17:00 ET with `OpenInterest`; its bar stream opens (`ESZ26 C7700`, `P7600`, SIM 2026-11-02: `200`, last history bar `Closed` / `IsEndOfHistory: true`, then 5 s `Heartbeat`s).

**A dated future's daily bar is stamped 17:00 ET (Globex close), its ET date the trade date, SIM 2026-09-24** (`MNQZ26`).

**`quotes/` on AAPL, `$SPX.X`, NQZ26, `SPY 260925C660`, SIM 2026-09-23:** `MarketFlags.IsDelayed: false`, decimal-text numbers, `TradeTime` the last print.

**`stream/quotes` `$SPX.X`, SIM 2026-11-04:** ~0.75 frames/s, `IsDelayed: false`, `TradeTime` whole seconds ~1.2 s behind; no index trades stream (`plugins/tradestation/scripts/tradestation_walk.py spx_stop`: 3 ms trip).

**Forex, future option and crypto symbols, 2026-10-31 / 11-01 (`source.rs`, `offer.rs`):** `EURUSD` (5 decimals) and `BTCUSD` (`GDAX`, 2 decimals, `Increment` `0.01`) are `FOREX`, `Currency` `USD`; `ESZ26 C7600` is `FUTUREOPTION` (`Root`/`Underlying` `ESZ26`, `Increment` `0.25`, `PointValue` `50`, no `ExpirationDate` or `StrikePrice`).

**Forming day (`source.rs`):** the equity quote's `Open`, `High`, `Low`, `Last`, `Volume` once `TradeTime` reaches the session open.

`USEQ24Hour` (`hist.rs`, `bars.rs`) carries **no overnight bars, SIM 2026-09-28** (AAPL 1m: 19:01–20:00 ET, then 04:01–05:00 ET; `USEQPreAndPost` no 04:xx bar) and covers `session=extended` (04:00–19:59 ET, 2026-09-25).

**Option session templates, SIM 2026-12-02** (`SPY 261203C739` 1m, 2026-12-01, close-stamped): `Default` 14:31Z–21:15Z (367 bars); `USOptPre` from 12:31Z (07:31 ET); `USOptPreAndPost` 12:31Z–21:15Z (375); `USEQ24Hour` and `USEQPreAndPost` equal `Default`; the bar stream opens with `USOptPreAndPost`. An option's extended session and its one bar stream ask `USOptPreAndPost` (`hist.rs`, `livestream.rs`).

**Index options, SIM 2026-12-02:** `USOptPreAndPost` serves SPXW its Curb bars (16:15–17:00 ET) and no GTH bar; expiring SPY and QQQ series print to 16:15 ([ARCHITECTURE.md](https://docs.taji.is/catalog/tradestation/architecture.md#constraints-and-limits)).

### Continuous series

`@ES`, `@NQ`, … state their contract in `Underlying` (SIM `symbols/@NQ`, 2026-11-05 UTC: `NQZ26`, no `ExpirationDate`). SIM, 2026-10-10: `search?contracts=MNQ` leads `@MNQ` (`expiry: null`, `tradable: false`), then five dated, unsorted; `symbols/` resolves expired NQU26 (2026-09-18).

### Orders

SIM, equity and futures (2026-09-24); single-leg option (`F 261218C20`) `BUYTOOPEN`. Rows echo `GCP`/`GDP` as `GTC+`/`GTD+`. A future short open passes.

A bracket answer lists children, then parent. Cancelling one `ordergroups {Type: OCO}` member leaves the other.

SIM, 2026-11-04 UTC: `PUT orderexecution/orders/<child> {"StopPrice"}` on an unfilled OSO BRK child answers 200 "Cancel/Replace order sent.", same `OrderID`; parent and both links intact. After the entry fills (MNQZ26) the parent reads `FLL` yet still lists both `OSO` children; `PUT` on either moves it in place, same `OrderID`, links intact.

**`OrderConfirmID` stays spent** (M, 2026-11-02, sim-api.tradestation.com; refusal and `REJ` shape in `orders.rs`): spent after a cancel, a rejection, a body change, and across accounts. On `ordergroups` dedupe is per member: a resend refuses only repeated ids, fresh ones land (`ACK` beside `REJ`); with an id on member 0 only, a resend places member 1 again. A bracket resent under its entry's id: entry `REJ`, children `CAN` in ~1 s. No lookup or echo (D, OpenAPI, 2026-11-02).

A group refuses per member inside a 200: a marketable bracket target rested entry and stop. An extended-session group's exits admit only `DAY`/`GTC`; after 16:00 ET a `DYP` entry fills alone (2026-09-24).

Refused on SIM: `DAY` after 16:00 ET (2026-10-10: MNQZ26 `session closed`; `GTC` rests `WORKING`), `DYP` after 20:00, `OPG` after 09:29, `CLO` after 15:59, `AllOrNone` but `DAY` or on an odd lot, `BUYTOCOVER` with no short, exit OCO with no position, market or stop on a `+` duration.

A future option (`NQZ26 C30750`, `AssetType: FUTUREOPTION`) refuses at build, both SIM accounts, 2026-09-24, 2026-10-08: `BUY` 400 `Invalid symbol … for the asset type 'EQ'.`, `…TOOPEN`/`…TOCLOSE` `Invalid trade action.`, as `Legs` too, with any `Route` or `AssetType`. The v3 `OrderRequest` has no `AssetType` (2026-08-11).

**Order filters and lookback (SIM, 2026-12-02):** `orders` and `historicalorders` filter server-side on `symbol=` and `status=` (comma lists, OpenAPI 2026-12-01); `historicalorders?since=` 731 days back is 400 "The maximum lookback is 730 calendar days".

### Options

SPXW vertical, SIM 2026-10-08: net credit 1.50 echoed `LimitPrice: -1.5`, `ACK`. Ticks 0.05 under 3, 0.10 from 3 (`IncrementSchedule`); SPY options 0.01.

Live host, 2026-10-10: greeks and probabilities off a one-leg `stream/options/quotes` (no probabilities multi-leg), none off `quotes/`.

Future options, 2026-09-24, both hosts (`source.rs`): `v3/marketdata/options/expirations` is 400 `Symbol not supported by this endpoint` for `@NQ`, `NQZ26`, `MNQZ26`. v2 search: `C=FO&R=NQ` 36 `Category: FutureOption` rows, `C=FO&R=NQZ26` 24 near the money (12, 2026-11-19) (`Name` `NQZ26 C30750`, `StrikePrice`, `OptionType`, `/Date(ms)/` `ExpirationDate`, `PointValue` 20); quotes answer.

**Plus durations on an option (SIM, 2026-12-02 01:43 ET, in GTH):** `orderconfirm` accepts `DYP`, `GCP` on limit, market, stop and stop-limit alike; the POST of `SPX 261218P7405` limit `DYP` answers 200 `FAILED` "DAY+/GTC+/GTD+ are not supported", read back `Duration: "DAY+"`, so the crate refuses an option's non-regular session. Cboe's 07:30–09:25 and 16:00–16:15 ET option sessions (2026-10-19) are documented for the live host only (`https://api.tradestation.com/docs/fundamentals/extended-hours-options`).

**Spread name (SIM, 2026-12-02):** `POST options/spreadname` answers `Dec03 <low>/<high> Call Vertical`, `LongShort`, `Quantity`; `StrikePrice` must be a number. Unused: the kernel names spreads (`presets::recognize`).

**Position groups (SIM, 2026-12-02 11:24 ET):** a SPY 700/705 call vertical bought as one order, no stream connected, reads at the next `stream/accounts/{a}/positiongroups` dial: `custom` and `orderbased` `GroupID` the order id, `GroupName` `Dec03 700/705 Call Vertical`; `marginbased` `GroupID` `SPY-<n>` with `MarginEstimate` and `BuyingPowerImpactEstimate`. A snapshot frame carries `Groups` and the ungrouped `Positions`, then `StreamStatus: EndSnapshot`. Mode `orderbased`/`orderbased`, `AutoMerge` true.

**Position-group writes (SIM, 2026-12-02):** create, update, split, merge and delete answer 200 and show at the next dial; quantities signed; `update` keeps its `GroupID`, the others answer new ones (split: `Groups[]`); an identical second vertical auto-merges, its id becoming opaque.

### Stops

Every trade print judges a held stop: the quote stream states no sale condition, so none is excluded.

## Open

- 1h and 4h bars on `$SPX.X`, options, forex, crypto, future options.
- Forming-day extended-hours `Volume`, `High`, `Low`.
- An option order on a Plus duration on the live host (SIM refuses it).
- Option OSO child `PUT` replace; `WALK_MARKET=1` RTH/Globex legs (`plan`, `spx_stop`, `own_stop`, `spread_stop`, `cross_entry`).

## References

- How the vendor works and how Taji is built on it: [TradeStation: how it works](https://docs.taji.is/catalog/tradestation/architecture.md).
- OpenAPI: https://api.tradestation.com/docs/specification/
