{"version":1,"resources":["https://finance.toonhaus.dev/api/stock/quote","https://finance.toonhaus.dev/api/stock/peers","https://finance.toonhaus.dev/api/stock/recommendations","https://finance.toonhaus.dev/api/market/indices","https://finance.toonhaus.dev/api/market/sectors","https://finance.toonhaus.dev/api/market/trending","https://finance.toonhaus.dev/api/crypto/price","https://finance.toonhaus.dev/api/forex/rate","https://finance.toonhaus.dev/api/stock/metrics","https://finance.toonhaus.dev/api/stock/earnings","https://finance.toonhaus.dev/api/stock/news","https://finance.toonhaus.dev/api/stock/dividends","https://finance.toonhaus.dev/api/stock/price-history","https://finance.toonhaus.dev/api/stock/price-target","https://finance.toonhaus.dev/api/stock/insiders","https://finance.toonhaus.dev/api/stock/lobbying","https://finance.toonhaus.dev/api/stock/gov-spending","https://finance.toonhaus.dev/api/market/news","https://finance.toonhaus.dev/api/market/earnings-calendar","https://finance.toonhaus.dev/api/market/ipo-calendar","https://finance.toonhaus.dev/api/stock/filings","https://finance.toonhaus.dev/api/stock/options","https://finance.toonhaus.dev/api/stock/financials","POST https://finance.toonhaus.dev/api/stock/screen"],"description":"Financial data API for AI agents. Stocks, market data, forex, crypto, insider trades, SEC filings, options, screener. Pay per query, no signup.","instructions":"# toon.haus — Financial Data API\n\nReal financial data for AI agents. No signup, no API keys. Pay per query via x402 micropayments (USDC on Base).\n\n## Quick Start\n\nCall any endpoint. Get a 402 response with payment requirements. Pay with any x402 client. Receive data.\n\n```\nGET https://finance.toonhaus.dev/api/stock/quote?ticker=AAPL → 402 → pay $0.001 → stock quote\n```\n\n## Pricing\n\n| Tier | Price | Endpoints |\n|------|-------|-----------|\n| Basic | $0.001 | quote, peers, recommendations, indices, sectors, trending, crypto, forex |\n| Standard | $0.005 | metrics, earnings, news, dividends, price-history, price-target, insiders, lobbying, gov-spending, market news, earnings-calendar, ipo-calendar |\n| Premium | $0.01 | filings, options, financials, screen |\n\nAverage research session: $0.03-0.06 (6-8 calls)\n\n## Endpoints\n\n### Stock (per ticker)\n- `GET /api/stock/quote?ticker=AAPL` — Price, change, market cap, company profile ($0.001)\n- `GET /api/stock/metrics?ticker=AAPL` — P/E, PEG, margins, ROE, growth, beta ($0.005)\n- `GET /api/stock/earnings?ticker=AAPL&limit=4` — EPS actuals vs estimates by quarter ($0.005)\n- `GET /api/stock/recommendations?ticker=AAPL` — Analyst buy/hold/sell consensus ($0.001)\n- `GET /api/stock/price-history?ticker=AAPL&period=1y&interval=1d` — OHLCV candles ($0.005)\n- `GET /api/stock/price-target?ticker=AAPL` — Analyst target high/low/mean ($0.005)\n- `GET /api/stock/dividends?ticker=AAPL` — Yield, rate, ex-date, 5yr history ($0.005)\n- `GET /api/stock/options?ticker=AAPL&date=2026-05-16` — Calls/puts with IV, volume, OI ($0.01)\n- `GET /api/stock/financials?ticker=AAPL&type=income&period=quarterly` — Income/balance/cashflow statements ($0.01)\n- `GET /api/stock/filings?ticker=AAPL&form=10-K` — SEC filings with direct links ($0.01)\n- `GET /api/stock/insiders?ticker=AAPL` — Insider transactions + sentiment (P=buy, S=sell, M=exercise) ($0.005)\n- `GET /api/stock/peers?ticker=AAPL&grouping=sector` — Peer companies ($0.001)\n- `GET /api/stock/news?ticker=AAPL&limit=10` — Company news ($0.005)\n- `GET /api/stock/lobbying?ticker=LMT` — Corporate lobbying records ($0.005)\n- `GET /api/stock/gov-spending?ticker=RTX` — Government contract awards ($0.005)\n- `POST /api/stock/screen` — Stock screener with 50+ filters ($0.01)\n\n### Market\n- `GET /api/market/indices` — S&P 500, Nasdaq, Dow, Russell 2000 ($0.001)\n- `GET /api/market/sectors` — 11 sector ETFs performance ($0.001)\n- `GET /api/market/trending?region=US` — Trending symbols ($0.001)\n- `GET /api/market/news?limit=20&category=general` — Market news ($0.005)\n- `GET /api/market/earnings-calendar?from=2026-04-20&to=2026-04-25` — Upcoming earnings ($0.005)\n- `GET /api/market/ipo-calendar?from=2026-04-01&to=2026-04-30` — IPO schedule ($0.005)\n\n### Forex & Crypto\n- `GET /api/forex/rate?pair=EURUSD` — Real-time exchange rate ($0.001)\n- `GET /api/crypto/price?symbol=BTC` — Crypto price, volume, market cap ($0.001)\n\n### Screener\n`POST /api/stock/screen` accepts two modes:\n\n**Predefined:** `{\"screener\": \"day_gainers\", \"count\": 10}`\n\n**Custom query:** Filter by sector, P/E, market cap, growth, dividends, short interest, and 50+ fields:\n```json\n{\n  \"query\": {\n    \"operator\": \"and\",\n    \"operands\": [\n      {\"operator\": \"eq\", \"operands\": [\"region\", \"us\"]},\n      {\"operator\": \"eq\", \"operands\": [\"sector\", \"Technology\"]},\n      {\"operator\": \"lt\", \"operands\": [\"peratio.lasttwelvemonths\", 25]},\n      {\"operator\": \"gt\", \"operands\": [\"quarterlyrevenuegrowth.quarterly\", 10]}\n    ]\n  },\n  \"count\": 15\n}\n```\n\n## Workflows\n\n### Stock Deep Dive (\"Should I buy AAPL?\")\n1. quote → current price and profile\n2. metrics → valuation and growth\n3. earnings → beat/miss history\n4. recommendations → analyst consensus\n5. price-target → upside/downside\n6. insiders → smart money activity\n7. news → recent catalysts\nCost: ~$0.03\n\n### Market Morning Brief\n1. indices → market direction\n2. sectors → sector rotation\n3. trending → what retail is watching\n4. market news → top headlines\nCost: ~$0.01\n\n### Insider Signal Detection\n1. screen → find active stocks\n2. insiders (per ticker) → filter for cluster buying\n3. quote → current price vs buy price\n4. price-history → drift since insider purchase\nCost: ~$0.04\n\n### Find Undervalued Tech Stocks\n1. screen → custom query: sector=Technology, P/E<25, revenue growth>10%, region=US\n```json\nPOST /api/stock/screen\n{\"query\":{\"operator\":\"and\",\"operands\":[{\"operator\":\"eq\",\"operands\":[\"region\",\"us\"]},{\"operator\":\"eq\",\"operands\":[\"sector\",\"Technology\"]},{\"operator\":\"lt\",\"operands\":[\"peratio.lasttwelvemonths\",25]},{\"operator\":\"gt\",\"operands\":[\"quarterlyrevenuegrowth.quarterly\",10]}]},\"count\":10}\n```\n2. metrics (per result) → verify P/E, margins, ROE\n3. financials → check revenue trend\n4. peers → relative valuation\nCost: ~$0.08 (screen + 3 calls per candidate)\n\n### Build a Dividend Portfolio\n1. screen → custom query: dividend yield>3%, region=US, market cap>$10B\n```json\nPOST /api/stock/screen\n{\"query\":{\"operator\":\"and\",\"operands\":[{\"operator\":\"eq\",\"operands\":[\"region\",\"us\"]},{\"operator\":\"gt\",\"operands\":[\"forward_dividend_yield\",3]},{\"operator\":\"gt\",\"operands\":[\"intradaymarketcap\",10000000000]}]},\"count\":20}\n```\n2. dividends (per result) → verify yield, payout history, no cuts\n3. financials (type=cashflow) → free cash flow covers dividends\n4. metrics → debt levels, ROE\nCost: ~$0.12\n\n### Congressional Trading / Political Exposure\n1. lobbying → corporate lobbying spend and topics\n2. gov-spending → government contract awards\n3. insiders → insider buying/selling activity\n4. price-history → price around key dates\nCost: ~$0.02\n\n### Earnings Volatility Play\n1. earnings-calendar → who reports this week\n2. earnings → historical surprise magnitude\n3. options → implied volatility\n4. price-history → realized vol comparison\nCost: ~$0.03\n\n### Screener Fields Reference\nOperators: eq, gt, lt, gte, lte, btwn, is-in (combined with and/or)\n- Categorical: sector, region, exchange\n- Valuation: peratio.lasttwelvemonths, pegratio_5y, pricebookratio.quarterly\n- Market: intradaymarketcap, percentchange, dayvolume, avgdailyvol3m, beta\n- Growth: epsgrowth.lasttwelvemonths, quarterlyrevenuegrowth.quarterly, totalrevenues1yrgrowth.lasttwelvemonths\n- Profitability: returnonequity.lasttwelvemonths, netincomemargin.lasttwelvemonths, grossprofitmargin.lasttwelvemonths\n- Dividends: forward_dividend_yield, consecutive_years_of_dividend_growth_count\n- Leverage: totaldebtequity.lasttwelvemonths, currentratio.lasttwelvemonths\n- Short: short_percentage_of_float.value, days_to_cover_short.value\nSectors: Technology, Healthcare, Financial Services, Consumer Cyclical, Consumer Defensive, Industrials, Energy, Real Estate, Basic Materials, Communication Services, Utilities\n\n## Response Format\nAll responses are JSON. Full OpenAPI spec at /openapi.json.\n\n## Payment\nx402 protocol on Base (eip155:8453). USDC payments. No signup, no API keys."}