Skip to main content
aifinhub

Worked example

Running the shipped broker-api-comparator engine on the input below produces exactly this output. Continuous integration recomputes it against the engine bundle on every build, so these numbers cannot drift from the code.

Input

{
  "tool": "broker-api-comparator",
  "require_options": false,
  "require_futures": false,
  "require_crypto": false,
  "require_mcp": false,
  "require_free_tier": false,
  "max_auth_complexity": 3
}

Output

{
  "filters": {
    "requireOptions": false,
    "requireFutures": false,
    "requireCrypto": false,
    "requireMcp": false,
    "requireFreeTier": false,
    "maxAuthComplexity": 3
  },
  "results": [
    {
      "broker": {
        "id": "alpaca",
        "name": "Alpaca",
        "url": "https://alpaca.markets/",
        "docsUrl": "https://alpaca.markets/docs/",
        "auth": "API Key + Secret",
        "authComplexity": 1,
        "orderTypes": [
          "market",
          "limit",
          "stop",
          "stop-limit",
          "trailing-stop",
          "bracket",
          "oco",
          "gtc",
          "ioc",
          "fok"
        ],
        "rateLimits": "200 req/min (free), higher on paid tiers",
        "marketData": [
          "IEX real-time (free)",
          "Full SIP on Algo Trader Plus ($99/mo)",
          "Historical bars + trades + quotes"
        ],
        "mcp": "official",
        "mcpNote": "Official MCP V2, 61 actions, idempotent order submission",
        "assets": {
          "stocks": true,
          "options": true,
          "futures": false,
          "crypto": true,
          "forex": false,
          "bonds": false
        },
        "accountMinimum": 0,
        "commission": "$0 (PFOF on equities)",
        "goodFor": "Solo AI operator, paper-to-live parity",
        "hasFreeTier": true,
        "notes": [
          "Free paper trading with same API surface as live",
          "Options require Algo Trader Plus tier",
          "Python/Go SDKs mature; rate-limit backoff documented"
        ]
      },
      "score": 1,
      "maxScore": 1,
      "fits": true,
      "failReasons": []
    },
    {
      "broker": {
        "id": "tradier",
        "name": "Tradier",
        "url": "https://tradier.com/",
        "docsUrl": "https://developer.tradier.com/",
        "auth": "OAuth 2.0",
        "authComplexity": 3,
        "orderTypes": [
          "market",
          "limit",
          "stop",
          "stop-limit",
          "oco",
          "gtc",
          "ioc",
          "fok"
        ],
        "rateLimits": "120 req/min market data, 60 req/min trading",
        "marketData": [
          "Real-time equities + options (streaming)",
          "Historical OHLC back ~5 years",
          "No Level-2 depth"
        ],
        "mcp": "community",
        "mcpNote": "Community MCP; idempotency is a manual patch",
        "assets": {
          "stocks": true,
          "options": true,
          "futures": false,
          "crypto": false,
          "forex": false,
          "bonds": false
        },
        "accountMinimum": 0,
        "commission": "$0 equities (PFOF), $0.35/contract options Pro",
        "goodFor": "Options-first retail, multi-leg strategies",
        "hasFreeTier": true,
        "notes": [
          "Free sandbox with delayed data",
          "Strong options chain + multi-leg order API",
          "US-only account eligibility"
        ]
      },
      "score": 1,
      "maxScore": 1,
      "fits": true,
      "failReasons": []
    },
    {
      "broker": {
        "id": "schwab",
        "name": "Schwab",
        "url": "https://www.schwab.com/",
        "docsUrl": "https://developer.schwab.com/",
        "auth": "OAuth 2.0 (3-legged)",
        "authComplexity": 4,
        "orderTypes": [
          "market",
          "limit",
          "stop",
          "stop-limit",
          "trailing-stop",
          "oco",
          "gtc",
          "ioc",
          "fok"
        ],
        "rateLimits": "120 req/min per endpoint (published tier)",
        "marketData": [
          "Real-time equities + options quotes",
          "Historical bars (1m to daily)",
          "No exchange depth via API"
        ],
        "mcp": "none",
        "mcpNote": "No official or listed community MCP server",
        "assets": {
          "stocks": true,
          "options": true,
          "futures": true,
          "crypto": false,
          "forex": true,
          "bonds": true
        },
        "accountMinimum": 0,
        "commission": "$0 equities, $0.65/contract options",
        "goodFor": "Established retail, post-TDA API migration",
        "hasFreeTier": true,
        "notes": [
          "API rebuilt after TD Ameritrade integration; still maturing",
          "Requires individual developer registration and app review",
          "Token refresh flow is finicky vs Alpaca/Tradier"
        ]
      },
      "score": 0,
      "maxScore": 1,
      "fits": false,
      "failReasons": [
        "Auth ≤ 3"
      ]
    },
    {
      "broker": {
        "id": "robinhood",
        "name": "Robinhood",
        "url": "https://robinhood.com/",
        "docsUrl": "https://docs.robinhood.com/",
        "auth": "OAuth 2.0 (unofficial endpoints)",
        "authComplexity": 4,
        "orderTypes": [
          "market",
          "limit",
          "stop",
          "stop-limit",
          "gtc",
          "ioc"
        ],
        "rateLimits": "Not publicly documented; low throughput",
        "marketData": [
          "Delayed quotes in public tier",
          "Limited historical depth",
          "No public Level-2"
        ],
        "mcp": "none",
        "mcpNote": "No MCP; unofficial SDKs only",
        "assets": {
          "stocks": true,
          "options": true,
          "futures": false,
          "crypto": true,
          "forex": false,
          "bonds": false
        },
        "accountMinimum": 0,
        "commission": "$0 (PFOF), $5/mo Gold for margin + extras",
        "goodFor": "Casual retail; not recommended for agents",
        "hasFreeTier": true,
        "notes": [
          "No officially supported public API in 2026",
          "Community SDKs break on auth changes without notice",
          "Paper trading unavailable"
        ]
      },
      "score": 0,
      "maxScore": 1,
      "fits": false,
      "failReasons": [
        "Auth ≤ 3"
      ]
    },
    {
      "broker": {
        "id": "ibkr",
        "name": "Interactive Brokers",
        "url": "https://www.interactivebrokers.com/",
        "docsUrl": "https://www.interactivebrokers.com/en/trading/ib-api.php",
        "auth": "OAuth + TWS/IB Gateway",
        "authComplexity": 5,
        "orderTypes": [
          "market",
          "limit",
          "stop",
          "stop-limit",
          "trailing-stop",
          "bracket",
          "oco",
          "gtc",
          "ioc",
          "fok"
        ],
        "rateLimits": "~50 msg/sec per connection; 50 orders/sec burst",
        "marketData": [
          "Global equities via subscription bundles",
          "Level-2 depth on most exchanges",
          "Historical depth across asset classes"
        ],
        "mcp": "community",
        "mcpNote": "Community CLI MCP; audit before production",
        "assets": {
          "stocks": true,
          "options": true,
          "futures": true,
          "crypto": true,
          "forex": true,
          "bonds": true
        },
        "accountMinimum": 0,
        "commission": "Tiered per-share or fixed; ~$0.0035/sh tiered",
        "goodFor": "Multi-asset-class, international, scale",
        "hasFreeTier": false,
        "notes": [
          "Requires TWS or IB Gateway running locally",
          "Idempotency via client-supplied orderId",
          "Fully headless gateway is possible but under-documented"
        ]
      },
      "score": 0,
      "maxScore": 1,
      "fits": false,
      "failReasons": [
        "Auth ≤ 3"
      ]
    }
  ],
  "fittingBrokers": [
    {
      "broker": {
        "id": "alpaca",
        "name": "Alpaca",
        "url": "https://alpaca.markets/",
        "docsUrl": "https://alpaca.markets/docs/",
        "auth": "API Key + Secret",
        "authComplexity": 1,
        "orderTypes": [
          "market",
          "limit",
          "stop",
          "stop-limit",
          "trailing-stop",
          "bracket",
          "oco",
          "gtc",
          "ioc",
          "fok"
        ],
        "rateLimits": "200 req/min (free), higher on paid tiers",
        "marketData": [
          "IEX real-time (free)",
          "Full SIP on Algo Trader Plus ($99/mo)",
          "Historical bars + trades + quotes"
        ],
        "mcp": "official",
        "mcpNote": "Official MCP V2, 61 actions, idempotent order submission",
        "assets": {
          "stocks": true,
          "options": true,
          "futures": false,
          "crypto": true,
          "forex": false,
          "bonds": false
        },
        "accountMinimum": 0,
        "commission": "$0 (PFOF on equities)",
        "goodFor": "Solo AI operator, paper-to-live parity",
        "hasFreeTier": true,
        "notes": [
          "Free paper trading with same API surface as live",
          "Options require Algo Trader Plus tier",
          "Python/Go SDKs mature; rate-limit backoff documented"
        ]
      },
      "score": 1,
      "maxScore": 1,
      "fits": true,
      "failReasons": []
    },
    {
      "broker": {
        "id": "tradier",
        "name": "Tradier",
        "url": "https://tradier.com/",
        "docsUrl": "https://developer.tradier.com/",
        "auth": "OAuth 2.0",
        "authComplexity": 3,
        "orderTypes": [
          "market",
          "limit",
          "stop",
          "stop-limit",
          "oco",
          "gtc",
          "ioc",
          "fok"
        ],
        "rateLimits": "120 req/min market data, 60 req/min trading",
        "marketData": [
          "Real-time equities + options (streaming)",
          "Historical OHLC back ~5 years",
          "No Level-2 depth"
        ],
        "mcp": "community",
        "mcpNote": "Community MCP; idempotency is a manual patch",
        "assets": {
          "stocks": true,
          "options": true,
          "futures": false,
          "crypto": false,
          "forex": false,
          "bonds": false
        },
        "accountMinimum": 0,
        "commission": "$0 equities (PFOF), $0.35/contract options Pro",
        "goodFor": "Options-first retail, multi-leg strategies",
        "hasFreeTier": true,
        "notes": [
          "Free sandbox with delayed data",
          "Strong options chain + multi-leg order API",
          "US-only account eligibility"
        ]
      },
      "score": 1,
      "maxScore": 1,
      "fits": true,
      "failReasons": []
    }
  ]
}

Frequently asked questions

What does the Broker API Comparator methodology page document?
How AI Fin Hub's Broker API Comparator ranks retail broker APIs. Which brokers, data sources, fit-score formula, update cadence, and known limitations. It states the formulas, assumptions, data sources, limitations, and reproducibility steps behind the Broker API Comparator, in the Finance category.
When was the Broker API Comparator methodology last reviewed?
This methodology was last reviewed on 2026-04-22. The matching tool is at https://aifinhub.io/broker-api-comparator/.
Are the Broker API Comparator numbers reproducible?
Yes. This page embeds a worked example whose output is the verbatim result of running the shipped broker-api-comparator engine on a fixed input; the embedded JSON is recomputed and diffed against the engine in CI, so the numbers cannot drift from the code.

Methodology · Tool · Last updated 2026-04-22

How Broker API Comparator works

How the Broker API Comparator ranks retail broker APIs and where the facts come from.

Why these five brokers

The comparator covers five retail broker APIs that together represent the overwhelming majority of AI-driven retail trading setups among US and EU operators in 2026:

  • Alpaca — default choice for solo operators thanks to a free paper tier with live-parity and an official MCP server.
  • Interactive Brokers — the only realistic option for multi-asset, international, or scale use cases.
  • Tradier — options-first retail niche with a genuine API focus.
  • Schwab — the API successor to TD Ameritrade's developer program; still maturing but too large to ignore.
  • Robinhood — included because readers repeatedly ask, even though its public API story remains weak.

What we don't cover

  • Futures-first brokers (NinjaTrader, AMP Futures) — different audience, different feature surface.
  • Crypto-native venues (Coinbase, Kraken) — covered separately in exchange-focused tools.
  • Institutional and professional-only platforms (Bloomberg Terminal, Refinitiv) — out of scope for retail decisions.
  • tastytrade — API exists and is improving, but we currently don't have enough first-hand usage to grade it fairly.

Data sources

All facts reflect published developer documentation as of 2026-04-22.

MCP availability is cross-referenced with the Finance MCP Directory rubric.

Fit-score formula

The score is deliberately simple: it's the count of active filters that the broker satisfies, out of the total number of active filters. The "Max auth complexity" slider is always an active criterion; the other "Must support" filters only count when the user has turned them on.

fit_score = count(active_filters_satisfied)
max_score = count(active_filters)
fits      = (fit_score == max_score)

No weighting. No hidden tier-bias. If two brokers tie on fit-score, the one with lower auth complexity wins — on the assumption that, all else equal, a simpler integration is better. Reading the full feature matrix is still recommended before committing, which is why the "Compare full table" toggle is one click away.

Auth complexity rubric (1–5)

  • 1 — static API key in a header, no token refresh.
  • 2 — API key + per-request signing or HMAC.
  • 3 — OAuth 2.0 with a simple refresh-token loop.
  • 4 — OAuth 2.0 with 3-legged flow, strict redirect rules, or app-review gating.
  • 5 — requires a persistent gateway process running on the client machine (e.g. IB Gateway / TWS).

Rate-limit caveat

Displayed rate limits are the vendor-published tier for a typical retail account. Real-world effective limits are frequently lower under concurrent load, burst behavior, or per-endpoint throttling that the docs don't explicitly surface. For high-frequency strategies, measure the actual limits on a paper/sandbox account before relying on the published figure.

MCP status

Three-level classification:

  • Official — first-party MCP server maintained by the broker.
  • Community — third-party MCP server actively maintained; audit before production use.
  • None — no MCP server currently listed or maintained beyond experimental forks.

Refresh cadence

Data is refreshed quarterly, or immediately when a broker announces a material API change (new auth flow, MCP launch, rate-limit change, new asset class). The most recent refresh date is shown at the top of the comparator and on this page. Corrections are logged at /corrections/.

Limitations

  1. Published data only. Private API tiers, enterprise quotas, and partner-only features are not modeled.
  2. Regional eligibility not modeled. Several brokers restrict account opening by country; verify eligibility directly.
  3. Order-type nuance lost. "Supports OCO" does not distinguish between true multi-leg OCO groups and simple paired cancellation.
  4. Fee disclosure is coarse. PFOF-model commissions are shown as "$0" even though effective spread costs are non-zero.
  5. MCP grade is a snapshot. Community servers rise and fall quickly; the status here is re-verified each refresh cycle.

Editorial independence

The comparator may reference brokers with current or future affiliate relationships with AI Fin Hub. The fit-score algorithm is deterministic and applied uniformly. No affiliate or sponsor payment alters rank, score, or feature presentation. See /sponsor-disclosure/.

Changelog

  • 2026-04-22 — Initial release with 5 brokers (Alpaca, IBKR, Tradier, Schwab, Robinhood).
Planning estimates only — not financial, tax, or investment advice.