Stock market data infrastructure
Stock data API options for AI agents
Compare how AI agents can reach stock data: MCP servers, documented HTTP APIs with OpenAPI and llms.txt, and keyless pay-per-request access over x402.
Documentation revised
Third-party plans and limits on this page were checked against each provider's public pages on 2026-11-04. Providers change plans; their current pages are authoritative.
Three ways an agent gets data
An MCP server exposes provider-defined tools that an MCP client such as Claude Desktop can call. A documented HTTP API lets any agent that can make web requests call endpoints directly from an OpenAPI schema or an llms.txt map. A payment protocol such as x402 lets an agent with a wallet pay for a single request when it has no account or key. Many providers offer one of these; the right one depends on your agent runtime and who holds the credentials.
What this API offers today
There is no MCP server for this API today. Agents use the HTTP API, discovered through /llms.txt, /llms-full.txt, the OpenAPI schema and an agent skill file. Two credential paths exist: a server-held API key, or x402 payment in USDC on listed endpoints, where an unpaid request returns HTTP 402 with a payment quote and the signed retry returns data without any account.
# Discovery an agent can read before its first data call
GET https://stockmarketapi.ai/llms.txt # site map for LLMs
GET https://stockmarketapi.ai/llms-full.txt # every endpoint with parameters
GET https://stockmarketapi.ai/api/openapi.json # machine-readable schema
GET https://stockmarketapi.ai/skill.md # agent skill file
# Then an ordinary authenticated request
GET /api/v1/companies/AAPL/financials?exchange=NASDAQ&period_type=FY&limit=1
X-API-Key: <server-held key>
# Or, with no key: an unpaid request to a listed endpoint returns
# HTTP 402 with an x402 payment quote; a signed USDC payment retries it.
Choose an MCP server when
Your agent runs in an MCP client, you want tools to appear without writing request code, and the provider's tool set covers your queries. Alpha Vantage, for example, links an official MCP server from its documentation.
Choose HTTP plus x402 when
Your agent already makes HTTP calls, needs exact parameters such as exchange and period type, should return provenance with each value, or must pay per call without a human creating an account. Payments settle on-chain and are final, so give the agent a spending policy and a request budget before letting it pay.
Evaluate an agent data source
Give the agent one task with known answers: resolve a listing, fetch one period, report the source label and any missing fields. Check that it stops on ambiguous identity or denied access instead of guessing, and that unavailable data is reported as unknown rather than zero. The same test works for any provider.