# Broker pack standard

A template for an expert pack an agent can load before it sends an order. Copy this file, replace every `{placeholder}`, and delete a section only after you write why that broker does not have it.

Not financial advice. Automated trading can lose money. If this pack is more than 30 days old, re-check the broker's docs.

Unofficial, unless the page says otherwise. No account id in this file. No person's name. The operator names the account by reading it back from the broker each session.

## Human page and raw markdown

Publish two URLs. They are not the same document.

- **Raw markdown** at `/packs/{broker}.md`. Serve the file verbatim. Do not append a footer, a prompt, or a rewritten section. An agent that fetches this URL gets the operating rules and nothing else.
- **Human page** at `/guides/ai-agents-for-{broker}`. Render that same file for a person: a jump list of the headings, tables as tables, and lists as lists, including the nested ones. Do not put a second session table in front of the pack. The page is the pack.

The human page opens with a copy-ready prompt box and a Copy button, before the title, the risk line, and the jump list. The button copies the prompt, not the page. The TradeStation prompt is:

```
Load https://theagentictrader.com/packs/tradestation.md and treat it as your operating rules. Set the environment to sim and confirm. Ask me the broker account type (equities or futures), the symbol, and the size first. Do not invent a size. After I answer, read the doc map, tell me the five traps that matter for that setup, then run one sim round trip on that symbol and size and report back.
```

A new broker uses the same shape. Load `https://theagentictrader.com/packs/{broker}.md` and treat it as the operating rules. Set the simulator and confirm the read-back. Ask for account type, symbol, and size before the round trip. Do not invent a size. Read the doc map, name the traps that matter for that setup, run one simulator round trip on that symbol and size, and report back.

## Source tags

Tag every fact. A missing tag is a claim, not a note.

- **Untagged:** tested on the broker's simulator. Say the month and year.
- **[field]:** learned in an earlier real session. Say what was seen, not a story.
- **[docs]:** from the broker's docs, and not re-tested on the simulator.

When a `[docs]` line and a simulator line disagree, write both and stop. Do not pick one in the send path.

## Checklist

- [ ] Human page: prompt box and Copy button at the top, jump list, tables. Raw markdown stays verbatim
- [ ] How an expert works
- [ ] First-hour traps
- [ ] MCP vs API, or the one path this broker has
- [ ] Order type and duration by session
- [ ] Confirm gaps: what the dry run lets through
- [ ] Don't double-send
- [ ] Buy and sell table, read from the position
- [ ] Ticks and combos
- [ ] Reading status
- [ ] Failures
- [ ] Going live
- [ ] Permissions
- [ ] Symbols
- [ ] Token and call costs
- [ ] Crash recovery
- [ ] Order playbook
- [ ] Don't know: stop and ask
- [ ] Look it up, with the doc map

## How an expert works

Write the rules the agent follows on every send.

1. The operator picks the trade. The agent carries it out. A plan names symbol, side, size, order type, price, duration, and max loss. A missing field means no send. The agent never invents a size.
2. Use the simulator until the operator turns live trading on. Rehearse a new order shape on the simulator first.
3. Desk limits: max quantity, max notional, orders per day, open positions. Until the operator sets them, send the smallest unit, one symbol at a time. The agent cannot raise a limit.
4. The agent's checks run first. Then confirm, place, and verify. Say whether the broker's confirm is a safety net. If it is not, point at the confirm-gaps section.
5. Read the position before every buy or sell, and again after the fill.
6. Read a real clock in the broker's timezone before choosing the order type and duration.
7. If it isn't known, stop and say so. Never invent an endpoint, a field, an account id, a fill, or a rule.
8. Never print or ask for tokens, client secrets, auth codes, or passwords. If one is pasted into the chat, tell the operator to revoke it.
9. Name the kill word. On that word, cancel the agent's working orders and end the session.

## First-hour traps

What goes wrong before the first order, in the order an agent hits it.

- How to get access: MCP, API key, or both. Where the operator clicks. What a bot cannot fetch because the site blocks it.
- Which environment the first connection uses. How to set the simulator and read it back before any account call.
- Whether market data and orders share that environment.
- Sign-in scopes that have to be granted up front, and what a refresh does not add.
- Token lifetimes, and what one 401 retry means.
- How to match an account to an asset. Never type an account id from memory.
- Whether simulator accounts are shared with other sessions.
- Clock traps: a shell that prints UTC, a timezone library the host does not ship.

## MCP vs API

If the broker has both, one table. Columns: getting started, brackets and OCO, streaming, tick sizes, how the responses differ. Then one sentence: which path is for a supervised simulator session, and which path is for an automated rule.

If there is only one path, say so, and say what that path cannot do.

## Order type and duration by session

One block per asset the pack covers. For each session (regular, pre-market, post-market, closed, and any asset-specific window):

- order types that work
- durations that work
- the default duration
- durations that are accepted and then sit inactive
- durations that are rejected, with the reject text
- what was tested on the simulator, and what is `[docs]` only

Call out the durations that exist only on a named list (for example an extended-hours options list). Say how often that list changes, and that a confirm on a name outside the list is not permission to send.

Say what a replace can change, and what requires a cancel and a new order. Say the longest expiration the broker will actually keep, even if confirm accepts a longer one.

## Confirm gaps

A table of what the broker's confirm accepted that the agent must still reject. One row per case. Columns: what it let through, what the agent must do instead.

Then a short list of what confirm does catch, with the error text.

Say what to do when confirm succeeds but its quote or balance lookup failed.

## Don't double-send

- A retry after a timeout can place the same order twice. What to read before resending.
- The server's dedupe key, if there is one: length, how to build it, how long it lives.
- What the other path uses instead. Do not invent a second key.

## Buy and sell table

| Intent | Stock | Option | Future |
|---|---|---|---|
| Open long | `{BUY}` | `{BUY_TO_OPEN}` | `{BUY}` |
| Close long | `{SELL}` | `{SELL_TO_CLOSE}` | `{SELL}` |
| Open short | `{SELL_SHORT}` | `{SELL_TO_OPEN}` | `{SELL}` |
| Close short | `{BUY_TO_COVER}` | `{BUY_TO_CLOSE}` | `{BUY}` |

Replace the placeholders with this broker's action names. Then write:

- Read the position first. Name the cheap call and the expensive one.
- Which action opens a short, and which action never closes a long.
- After the fill, which field says open or close, and what a close must show.
- What a cash account cannot do. `[docs]`
- Close test positions in the same session.

## Ticks and combos

- The tick for each product the pack covers, and the dollar value of one tick when it is known.
- Which quote field is not the tick.
- Where symbol details live, and what to say when that tool does not exist.
- Multiplier, and which field holds it. Do not assume 100.
- Combo rule: one order with legs, priced before it is sent. What a negative limit means.
- Which quote flags block a send: delayed, halted, restricted, not entitled. Where those flags sit on each path.
- Keep the quote time, bid, and ask with every order.

## Reading status

- The place response is not the status, if that is true here. How to poll, how often, and when to stop.
- Field names on each path, side by side.
- A status table: code, meaning, and whether it is final.
- Which filter misses cancels.
- Whether a replace keeps the order id.
- What the simulator never shows that live will: queues, partial fills, buying-power rejects.

## Failures

| What happens | What to do |
|---|---|
| 401 | Refresh once, retry once, then stop |
| 429 | Wait the reset, retry once, then stop |
| 503 on confirm or place | Do not send. Retry once, then stop |
| Errors on the confirm | Do not place |
| Buying-power reject | Stop. Do not resize and retry |
| Rejected short | Stop. Do not retry larger |
| Anything else you don't recognize | Stop, cancel working orders, report |

Add this broker's own error strings as rows. Do not invent a cause for a status you cannot explain.

## Going live

1. The operator turns live trading on. The agent does not.
2. Bind the live account from the live accounts call.
3. Rehearse that exact order shape on the simulator first.
4. Name the live-only rejects the simulator never gave.
5. If the host or the rules will not send live orders, write a ticket a person can place: account type, symbol, action, quantity, order type, limit or stop, duration, route, session, the confirm summary, quote time, bid, and ask.

## Permissions

- Option approval levels, or this broker's equivalent, and what each level allows.
- Whether the simulator enforces them. A simulator accept is not proof live will accept. `[docs]`
- Intraday margin, the rule that replaced the pattern day trader designation. FINRA Regulatory Notice 26-10 is effective June 4, 2026. Firms may phase in until October 20, 2027. https://www.finra.org/rules-guidance/notices/26-10 If the broker still returns a pattern-day-trader flag or a day-trade count, say the flag is still on the payload and that the agent stops and asks. Do not tell the agent to enforce a $25,000 gate.
- What happens to an option in the money at expiry. Do not hold a simulator option through expiry to learn how live behaves.

## Symbols

One line per instrument, with one example of the shape and no real account attached.

- Stock: uppercase ticker.
- Option: the contract format, including how a half strike is written, and how a space is encoded on the API.
- Index: quote symbol versus contract symbol, if they differ.
- Futures: tradable contract versus a chart symbol that cannot be traded. How to pick the front month without guessing.
- Date formats that differ by tool.
- Unknown fields are rejected. Send only the documented ones.

## Token and call costs

- What one round trip costs, in calls and in tokens, on the path an agent will actually use.
- Which calls get more expensive through the day.
- Which built-in guide this pack outranks, and when that guide's display rules are for a person in chat.
- When to stream instead of poll. `[docs]`
- Rate limits, and the header that says how long to wait.

## Crash recovery

1. Read open orders, today's orders, and positions.
2. Match them to the agent's log by order id. Name the log columns and the timezone.
3. An order that is not in the log is not the agent's to cancel, unless it can be found by symbol and time window and then logged.
4. Say whether the broker has a client-tag field. If it does not, say so.

## Order playbook

Number the steps. The agent runs them in order.

1. Read the clock and name the session.
2. Read the position, then pick the action from the table.
3. Get a fresh quote. It must not be delayed, halted, restricted, or not entitled.
4. Build the order and check type, duration, tick, quantity, symbol case, and expiration.
5. Check that it is not already working or recently sent.
6. Confirm. Require no errors. Check that the echoed price equals the price sent.
7. Place, on the simulator path named above.
8. Poll until the status is final.
9. Re-read the position. On a close, the leg must say close, and the position must not have flipped.
10. Log it with the quote time, bid, and ask.
11. To change the price, replace it. To change the duration, cancel and resend.

## Don't know: stop and ask

A list of questions this pack does not answer. The agent stops instead of guessing. Start from the holes in the session tests, the holidays, and any order shape that was confirmed but never placed.

## Look it up

The doc map. One link per page the agent is allowed to treat as a source. Say which pages block a non-browser fetch, and tell the agent to ask the operator to open those.

- API specification
- Sign-in and tokens
- Simulator versus live
- Rate limits
- How to get a key
- Order durations, one page per asset
- Symbol formats
- The broker's own FAQ
- The MCP page, if there is one

Free check: https://theagentictrader.com/check?utm_source=md&utm_medium=agent&utm_campaign=packs-broker-pack-standard
Weekly note on broker and agent changes: https://theagentictrader.com/subscribe?utm_source=md&utm_medium=agent&utm_campaign=packs-broker-pack-standard
Desk Kit, $79 one-time. Full refund within 7 days: https://theagentictrader.com/desk-kit?utm_source=md&utm_medium=agent&utm_campaign=packs-broker-pack-standard
