# Market Data

> Real-time financial market data API for AI agents.
> Pay-per-call via x402 on Base mainnet (eip155:8453). No API keys required.

## Description

Market data, company fundamentals, options chains, earnings calendars, economic events,
portfolio optimization, and natural language market queries. All priced per-call — no subscriptions.

## Endpoints

All endpoints: `POST https://market2000.xyz/<endpoint>` with URL query string parameters.

| Endpoint | Description | Price |
|---|---|---|
| `/get_latest_price` | Most recent closing price + 1-day change for any ticker | $0.01 |
| `/get_price_history` | OHLC candlestick bars for a ticker and date range | $0.01 |
| `/get_market_movers` | Top gainers, losers, and most-active US stocks | $0.01 |
| `/get_fear_greed` | CNN Fear & Greed Index — score, 7 components, 30-day history | $0.01 |
| `/get_earnings_calendar` | Companies reporting earnings on a given date with EPS estimates | $0.01 |
| `/get_economic_calendar` | Macro events: CPI, Fed, NFP, GDP with forecasts and previous values | $0.01 |
| `/get_fundamentals` | P/E, margins, growth, balance sheet, analyst targets | $0.01 |
| `/get_trends` | Google Trends — daily/weekly/monthly top search queries by country | $0.01 |
| `/search_arxiv` | arXiv academic paper search with keyword query and category filter | $0.01 |
| `/get_hardware_prices` | CPU/GPU retail price index + semiconductor stock proxy | $0.01 |
| `/get_options_chain` | Full calls/puts with IV, OI, and put/call ratio | $0.05 |
| `/optimize_portfolio` | Markowitz optimization — max Sharpe, min vol, or max return | $0.05 |
| `/correlation_matrix` | Cross-asset Pearson/Spearman correlation matrix + diversification score | $0.02 |
| `/earnings_surprise` | EPS beat/miss history and price reaction on earnings days | $0.02 |
| `/daily_brief` | One-call digest: fear/greed + movers + earnings + macro events | $0.02 |
| `/analyze` | Natural language query — ask any market question in plain English | $0.02 |
| `/watch/register` | Price alert webhook — fires once when ticker crosses a threshold | $0.02 |

## Payment

- Protocol: [x402](https://x402.org) — HTTP-native pay-per-call micropayments
- Network: Base mainnet (eip155:8453)
- Asset: USDC (`0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`)
- Discovery: `/.well-known/x402`
- Docs: `https://market2000.xyz/docs`
