# x402stock Compare Multi-Stock

> x402stock Compare Multi-Stock is a paid API for AI agents from x402stock.vercel.app, paid per call via x402, $0.05/call, status unknown (last checked 2026-09-15).

Fetches side-by-side fundamental and price data for 1–3 US-listed stocks in a single call, returning price, day change, market cap, P/E, EPS, revenue, margins, and dividend yield per ticker.

## Facts

- Endpoint: GET https://x402stock.vercel.app/api/v1/compare
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402stock-compare-multi-stock-7f42ab1b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_E0xwuM2n_YMQ6HjmC6SEY

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability x402stock-compare-multi-stock-7f42ab1b
```

Example prompt: Compare AAPL, MSFT, and NVDA side by side — I want to see their price, P/E ratio, EPS, revenue, gross and net margins, and dividend yield all at once.

## When to prefer this

Use this endpoint when you need to compare 2–3 US stocks simultaneously on both price and fundamental metrics in a single API call. It is purpose-built for peer or watchlist comparisons and returns a comprehensive set of financial data per ticker. For a single stock, the cheaper /api/v1/quote/{ticker} endpoint is preferred. For more than 3 tickers, a different bulk data source should be used.

## Known failure modes

- Invalid or unrecognized ticker symbol returns null values or missing rows
- More than 3 tickers passed may be rejected or truncated
- Network timeout on Vercel cold start causing delayed response
- Stale or missing data for thinly traded or recently delisted stocks
- Payment failure (402) if USDC balance is insufficient

## How this service works

Compare 2 to 3 US-listed stocks side by side (peer or watchlist comparisons). Pass a comma-separated list via `?tickers=AAPL,MSFT,NVDA` (1 to 3 symbols). Returns price and day change, market cap, P/E, EPS, revenue, gross and net margins, and dividend yield per ticker. Built for multiple stocks — for a single stock, `/api/v1/quote/{ticker}` is cheaper. From x402stock

## Output

Returns a JSON object with a rows array where each entry corresponds to one ticker and includes: ticker symbol, company name, current price, day change percent, market cap, P/E ratio, EPS, trailing revenue, gross margin percent, net margin percent, dividend yield percent, and an availability flag. Also includes source attribution, timestamp (as_of), and count of tickers returned.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "$schema": "https://json-schema.org/draft/2020-12/schema",
     "properties": {
      "tickers": {
       "type": "string"
      }
     },
     "additionalProperties": {}
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "$schema": "https://json-schema.org/draft/2020-12/schema",
     "required": [
      "source",
      "as_of",
      "count",
      "tickers",
      "rows"
     ],
     "properties": {
      "note": {
       "type": "string"
      },
      "rows": {
       "type": "array",
       "items": {
        "type": "object",
        "required": [
         "ticker",
         "name",
         "price",
         "change_percent",
         "market_cap",
         "pe_ratio",
         "eps",
         "revenue",
         "gross_margin_percent",
         "net_margin_percent",
         "dividend_yield_percent",
         "available"
        ],
        "properties": {
         "eps": {
          "anyOf": [
           {
            "type": "number"
           },
           {
            "type": "null"
           }
          ]
         },
         "name": {
          "anyOf": [
           {
            "type": "string"
           },
           {
            "type": "null"
           }
          ]
         },
         "price": {
          "anyOf": [
           {
            "type": "number"
           },
           {
            "type": "null"
           }
          ]
         },
         "ticker": {
          "type": "string"
         },
         "revenue": {
          "anyOf": [
           {
            "type": "number"
           },
           {
            "type": "null"
           }
          ]
         },
         "pe_ratio": {
          "anyOf": [
           {
            "type": "number"
           },
           {
            "type": "null"
           }
          ]
         },
         "available": {
          "type": "string"
         },
  
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402stock-compare-multi-stock-7f42ab1b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402stock.vercel.app](https://www.zero.xyz/host/x402stock.vercel.app/llms.txt)
