AI trading bots for stocksWhich brokers allow them — and the tokenized route outside market hours.
A bot that trades stocks needs a broker that accepts orders from software. Several do: Alpaca, Interactive Brokers, Tradier and Schwab have APIs, and since May 2026 Robinhood lets AI agents trade in a separate account through its MCP server. The account is always a verified person’s, and the stock market’s hours still apply — regular trading on the NYSE runs 9:30 a.m. to 4:00 p.m. ET. Tokenized stocks such as xStocks or Ondo’s tokens are a second route: they can move on blockchains around the clock, but are mostly not for US persons and can drift from the real share when the market is shut. Below: the routes, the rules, the evidence and the risks.
Reviewed November 6, 2026 · figures from our live data
The short answer
Official stock APIs exist at Alpaca, Interactive Brokers, Tradier and Schwab; Robinhood added Agentic Trading on 27 May 2026, where an external agent connects through MCP and trades only in its own account.
In the US the $25,000 pattern-day-trader minimum was replaced by intraday margin standards effective 4 June 2026; brokers may phase the change in until 20 October 2027.
Tokenized stocks (xStocks, Ondo, Robinhood’s EU stock tokens, Dinari via Gemini) can be traded by a bot from a wallet or an exchange, also outside market hours — but they are generally not offered to US persons.
Evidence is thin: in Alpha Arena season 1.5 on US stocks only one model was in profit at the end, and the StockBench study found most models struggle to beat buy-and-hold.
tokenized stocks a bot can trade in our data today
issuers
issuer countries
Brokers with an official API for stock bots
All of them need a brokerage account in your name. The API is the bot’s door into that account, not a separate account for the bot.
- 1
Alpaca
An API-first broker. Anyone, in any country, can open a free paper-only account with just an email address and test a bot against real-time quotes. Alpaca also publishes an official MCP server that lets assistants such as Claude Desktop, Claude Code or Cursor trade stocks, ETFs, options and crypto; it runs in paper mode unless you switch it to live.
- 2
Interactive Brokers
The TWS API does not talk to IBKR directly: it needs a running copy of Trader Workstation or IB Gateway on your machine or server. A regular account that has been approved and funded can open a paper trading account with the full range of trading functions in simulation.
- 3
Tradier
A brokerage API for US stocks, ETFs and options: market data, trading, streaming and accounts. Every Tradier Brokerage account includes a paper trading sandbox, whose market data is delayed by 15 minutes. Without Tradier partner status the API is for personal use only.
- 4
Charles Schwab (Trader API)
You register on the Schwab Developer Portal, create an app and request the Trader API; approval is manual, typically 1–3 business days. Access tokens last 30 minutes and refresh tokens 7 days, so a bot needs a fresh browser login at least once a week.
- 5
Open-source frameworks
You do not have to write the broker connection yourself. LumiBot, a free Python framework under GPL-3.0, connects to Alpaca, Charles Schwab, Interactive Brokers and Tradier, and backtests a strategy against historical data without a broker account.
Robinhood: Agentic Trading and its limits
Robinhood has two official routes for software: AI agents through its MCP server, and a crypto-only API.
- 1
Agentic Trading for US customersUS only
Launched in beta on 27 May 2026 in Robinhood’s US app. An external agent — the support pages name Claude Code, Claude Desktop, ChatGPT, Codex, Cursor and Grok, among others — connects to the Trading MCP server at agent.robinhood.com/mcp/trading. You need a primary individual account in good standing and must open a separate MCP account for the agent.
- 2
What the agent sees and where it trades
The agent gets read access to all your Robinhood accounts, positions and balances, but it can only place trades in its own agentic account — so it can only spend what you put there. Order types: market (by shares or dollars), limit, stop limit and stop market.
- 3
Approvals: off by default for external agents
With trade approvals on, the agent only proposes and you place the order yourself. Robinhood’s built-in agents start with approvals on; MCP accounts for external agents start with them off. Some trades still need your approval either way.
- 4
What it cannot doUS only
Robinhood’s agents cannot place multi-leg options orders, and they can trade crypto but not transfer, stake or lend it. Crypto trading is not available in some US states, including New York.
- 5
Built-in Robinhood Agents
Separately, Robinhood lets you build an agent inside its mobile app on an LLM you choose; it covers equities, options and crypto. It is still rolling out, so not every customer has it, and chatting is paid from a prepaid token balance.
- 6
Crypto API and unofficial librariesUS only
The Robinhood Crypto Trading API is for crypto customers in the United States and trades crypto only. Robinhood’s customer agreement (revised 2 November 2026) says its API package may not be used, and products may not be built on it, without Robinhood’s express written consent. Community libraries that log in with your password are not one of the official routes.
Account rules and market hours
A bot can run all night, but the stock market cannot. These are the limits on the broker route.
- 1
The $25,000 day-trading minimum is goneUS only
In the US FINRA replaced its day-trading margin rules, including the $25,000 pattern-day-trader minimum, with intraday margin standards. The SEC approved the change; it took effect on 4 June 2026, and firms that need more time may phase it in until 20 October 2027 — so check what your broker applies today.
- 2
What replaces itUS only
In the US margin calls now follow intraday margin deficits rather than a count of day trades. Alpaca, for example, switched on 4 June 2026: the equity needed for 4x intraday buying power fell from $25,000 to $2,000, pre-trade checks block orders that would create a deficit, and repeatedly missed intraday margin calls can restrict an account for up to 90 days.
- 3
Regular hours
The NYSE’s core session runs 9:30 a.m. to 4:00 p.m. ET on weekdays, with full closures on holidays such as Thanksgiving (26 November 2026) and early 1:00 p.m. closes such as 27 November and 24 December 2026.
- 4
Extended and overnight sessions
Some brokers go further. Alpaca supports overnight trading 8:00 p.m.–4:00 a.m. ET (Sunday to Friday), pre-market 4:00–9:30 a.m. and after-hours 4:00–8:00 p.m. ET; which stocks trade overnight is listed in its assets endpoint.
- 5
Only limit orders outside the core session
At Alpaca an extended-hours order must be a limit order with time-in-force day or GTC and the flag extended_hours set to true; market and stop orders are not accepted. A bot that sends market orders at night gets rejected, not filled.
The tokenized-stock route
A tokenized stock is a token whose issuer holds the share. A bot trades it like any other token: from its own wallet on-chain, or through an exchange account.
- 1
xStocks (Backed)
Issued by Backed Assets (JE) Limited in Jersey. Each xStock is backed 1:1 by the stock or ETF held by a regulated custodian, and runs on Ethereum, Solana, Arbitrum, Mantle, TON, Ink and other networks. The docs say xStocks trade around the clock on supported exchanges and DeFi venues; issuance and redemption at the issuer run 24/5.
- 2
xStocks at Kraken
Kraken listed 60 xStocks on 30 June 2025 as Solana tokens, tradable 24 hours a day, five days a week, with withdrawals to your own wallet. They are not available in the United States, Australia, Canada, Belgium or the UK. Ten of them, such as NVDAx and SPYx, can be traded with 3x leverage where allowed.
- 3
xStocks at Kraken in the EEAEU only
Kraken customers in the EEA must first pass an appropriateness questionnaire and can then buy, sell and convert xStocks only against fiat currency; customers outside the EEA can also use crypto.
- 4
Ondo Global Markets
Issued by Ondo Global Markets (BVI) Limited, with an “on” suffix such as TSLAon, on Ethereum, BNB Chain and Solana. Minting and redemption run 24/5 (Sunday 8:00 p.m. to Friday 7:59 p.m. ET), for six assets including NVDAon and SPYon 24/7; peer-to-peer the tokens move 24/7. In the UK, Switzerland and Singapore they are offered only to qualified or professional investors.
- 5
Robinhood stock tokens in the EUEU only
For EU customers Robinhood launched 200+ US stock and ETF tokens on Arbitrum on 30 June 2025, with 24/5 access and no commission or added spread from Robinhood (other fees may apply).
- 6
Dinari dShares via Gemini in the EUEU only
For EU customers Gemini offers dShares issued by Dinari, each backed 1:1 by the US share and starting with MSTR on Arbitrum. Dinari is not affiliated with Gemini; the product is not available to persons in the US.
Price gaps when the market is closed
A token can trade on Saturday; the share it tracks cannot. What the token costs then is a guess about Monday.
- 1
The share leads, the token follows
A World Federation of Exchanges working paper, reported on 20 October 2026, looked at 61 xStocks pairs with daily closes from July 2025 to May 2026. In none did the token lead price discovery; when a token closed above its stock, the token itself erased more than half the gap by the next trading day. The WFE represents stock exchanges and is not a neutral party.
- 2
Weekends are the blind spot
The WFE study left weekends out. A Goldsky report (September 2026) on 443 ticker-weekends found the Sunday-night token price called the direction of Monday’s official open 84% of the time — the weekend price carries information, but it is not the share price.
- 3
No creation or redemption at night or on weekends
Issuance and redemption at Backed and at Ondo run 24/5 for most tokens. Outside that window nobody can swap a token for the share at the issuer, so its price is set only by buyers and sellers on the venue.
- 4
Halts
Ondo may halt minting and redemption for corporate actions, excessive volatility or system risk controls; it posts halts at status.ondo.finance. A bot should read such status pages before trading.
- 5
Different hours on different venues
“24/7 on-chain” does not mean every venue is open: Kraken launched xStocks with 24/5 trading, Robinhood’s EU tokens offer 24/5 access. A bot needs the hours of the venue it trades on, not of the token.
Who can buy, what backs the token, and dividends
A tokenized stock is a claim on an issuer that holds the share — not the share in your name.
- 1
Mostly not for US persons
xStocks are not intended for distribution in the United States or to any US person; Ondo’s tokens are offered only outside the United States to eligible non-US persons; Gemini’s dShares are not available to persons in the US. For US customers the broker route is the main one.
- 2
Buying is not the same as minting
At Ondo, minting and redeeming directly need KYC and AML checks, and holding tokens bought on an exchange does not make you eligible to redeem. A bot that buys on the market depends on the market to sell again.
- 3
Dividends: reinvested or paid
xStocks reinvest dividends, net of withholding tax, by raising an on-chain multiplier; Ondo also reinvests net of withholding, so one token can come to represent more than one share. Robinhood pays dividends on its EU stock tokens into the app. A bot that compares prices must account for the multiplier.
- 4
Regulatory status
Kraken says the xStocks it offers are not registered with any local securities regulator; the offer rests on Backed’s base prospectus. Each Ondo asset is issued under its own prospectus.
How well do AI bots trade stocks — and the risks
The few public tests point one way: a bot can trade stocks on its own; beating the market is not the norm.
- 1
Alpha Arena season 1.5 (US stocks)
From late November to early December 2025, Nof1 had models trade US stocks in four modes, from a news-driven baseline to mandatory high leverage. A model later named Grok 4.20 was reported up about 12% over two weeks and in profit in all four; GPT-5.1 and Gemini 3 followed. As of 8 December only Grok 4.20 was still in profit.
- 2
StockBench
A benchmark that lets language-model agents trade stocks over several months without data contamination found that most models struggle to beat a simple buy-and-hold strategy, and that good scores on financial quiz questions do not carry over to trading.
- 3
Paper results flatter
Alpaca says its paper trading does not model market impact, slippage from latency, queue position, regulatory fees or dividends, and fills orders regardless of available size. A bot that wins on paper can lose live.
- 4
The agent can be wrong — you pay
Robinhood warns that agents can make errors, misinterpret instructions or act on outdated information, that agentic trading can lose your entire investment, and that you are responsible for the trades your agent places.
- 5
Keys and tokens are your account
Robinhood’s customer agreement says external AI agents can place real trades and that API keys are sensitive credentials. Keep the bot in a separate, small account where the broker allows one, and revoke its access when you stop.
- 6
Plumbing breaks
Schwab refresh tokens expire after 7 days, IBKR’s API stops when TWS or IB Gateway stops, extended-hours sessions accept only limit orders, and token venues have their own hours and halts. A bot needs checks that notice when it has stopped trading.
Questions
Is there an official AI trading bot or API for Robinhood stocks?US only+
Yes, for US customers. Since 27 May 2026 Robinhood’s Agentic Trading (beta) lets an external AI agent such as Claude or ChatGPT connect through its MCP server and trade in a separate MCP account; Robinhood also offers built-in agents in its app. The older Robinhood Crypto Trading API covers crypto only.
Can I use an unofficial Robinhood API library?+
Robinhood’s customer agreement says its API package may not be used without Robinhood’s express written consent. The official routes are Agentic Trading through MCP and the Crypto Trading API; brokers like Alpaca, Interactive Brokers, Tradier and Schwab publish stock APIs.
Do I still need $25,000 to day trade with a bot in the US?US only+
Not under FINRA’s rules since 4 June 2026: in the US the pattern-day-trader minimum was replaced by intraday margin standards. Brokers may phase the change in until 20 October 2027, so check your broker; Alpaca, for example, now needs $2,000 for 4x intraday buying power.
Can a bot trade stocks at night or on weekends?+
At some brokers on weeknights: Alpaca runs an overnight session 8:00 p.m.–4:00 a.m. ET, Sunday to Friday, with limit orders only. On weekends only tokenized stocks trade, on venues that are open then — and their price can drift from the share until the market reopens.
Can US persons buy tokenized stocks such as xStocks or Ondo tokens?+
Generally not. xStocks are not intended for US persons, Ondo offers its tokens only to eligible non-US persons, and Gemini’s dShares are not available to persons in the US. Kraken also excludes Australia, Canada, Belgium and the UK from xStocks.
Do AI trading bots make money on stocks?+
Not reliably. In Alpha Arena season 1.5 on US stocks only one model was still in profit at the end, and the StockBench study found most models struggle to beat buy-and-hold. Short contests are noisy, and paper results ignore slippage and fees.
- Tokenized stocks vs real stocks →
- Can AI agents trade on their own? →
- Build your own AI trading agent: step-by-step tutorial →
- Are trading bots legal? →
- The SEC innovation exemption and tokenized stocks →
- Token versions of the same stock, side by side →
- Robinhood — Robinhood is now open to agents (27 May 2026)
- Robinhood — Robinhood Agents overview
- Robinhood — Onboarding an external agent
- Robinhood — Trading with your agent
- Robinhood — Crypto Trading API
- Robinhood — Customer Agreement (revised 2 Nov 2026), § 29 API & MCP
- FINRA — Regulatory Notice 26-10 (intraday margin standards)
- Alpaca — FINRA retires the PDT rule
- Alpaca — Orders at Alpaca (extended and overnight hours)
- Alpaca — Paper trading
- Alpaca — Official MCP server
- Interactive Brokers — TWS API introduction
- Tradier — API documentation
- LumiBot — Schwab broker setup (Trader API)
- LumiBot — open-source trading framework
- NYSE — Hours and calendars
- xStocks — Documentation
- xStocks — Dividends and stock splits
- Kraken — Tokenized equities now available (30 Jun 2025)
- Kraken — xStocks availability
- Ondo — Global Markets documentation
- Ondo — Global Markets
- Robinhood — Stock tokens in the EU (30 Jun 2025)
- Gemini — Tokenized stocks, starting with MSTR
- Finance Magnates — WFE study on xStocks price discovery
- Goldsky — Tokenization report (Sep 2026)
- ForkLog — Alpha Arena season 1.5
- StockBench (arXiv 2510.02209)
This guide explains how these products work and is not investment advice or an offer of any security. Who may buy a product is set by its issuer; check the offering documents before investing.