| What AI agents need | Before | After (with Stock Market API) |
| Price movement with real context | Mostly OHLCV candles. Agents see the outcome, not the process. | OHLCV plus trades, quotes, and order book updates demonstrating how price formed during the session. |
| Reliable market timing | Session boundaries guessed from timestamps. Pre/post-market often mixed in. | System events mark start/end of messages, system hours, and regular market hours, so agents align reasoning with true market phases. |
| Liquidity and microstructure signals | No depth view. Liquidity is inferred from volume or spread proxies. | Level 1 quotes (best bid/ask + sizes) plus Level 2 price levels (side, price, size, timestamps) to model liquidity changes directly. |
| Order flow behavior | No way to learn how orders appear, move, or get filled. | Level 3 order book events (add/modify/delete/execute/clear book) so agents can learn real order lifecycle behavior. |
| Trade quality and special conditions | Trades treated as plain prints. Odd lots or extended-hours trades silently pollute training. | Trade flags (odd lot, extended hours, intermarket sweep, trade breaks, single-price crosses, trade-through exempt) help agents filter and label trades properly. |
| Handling halts, auctions, and symbol state changes | Sudden gaps or frozen quotes look like “model failure.” | Admin messages provide trading status, auction information, operational halts, official price, and other symbol-level messages that explain regime changes. |
| Backtesting that matches real behavior | Backtests look smooth but fail when real order book dynamics matter. | Agent training and evaluation can include quotes + depth + L3 events, making simulations closer to real conditions and reducing surprises. |
| A clean way for agents to call data tools | Custom wrappers, brittle endpoint logic, and lots of glue code. | Same resources can be called via REST or JSON-RPC, which is easier for tool-using agents and structured workflows. |