X

X402stock · Compare

by X402stock

GETBase

$0.05

per call · USD Coin on Base

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

Endpoint

GET https://x402stock.xyz/api/v1/compare

1

Calls / 30d

1

Unique payers / 30d

Aug 17

Last called

exact

Payment scheme

Call this service

TypeScript · @x402/fetch
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);

const res = await fetchWithPay("https://x402stock.xyz/api/v1/compare", {
  method: "GET",
});
const data = await res.json();
cURL
curl -X GET \
  "https://x402stock.xyz/api/v1/compare?tickers=AAPL%2CMSFT%2CNVDA" \
  -H "X-PAYMENT: <signed x402 payment>"

Example response

{
  "as_of": "2026-05-30T07:00:00.000Z",
  "count": 2,
  "rows": [
    {
      "available": "ok",
      "change_percent": -0.371,
      "dividend_yield_percent": 0.35,
      "eps": 8.26,
      "gross_margin_percent": 47.86,
      "market_cap": 4589945623560,
      "name": "Apple Inc.",
      "net_margin_percent": 27.15,
      "pe_ratio": 37.69,
      "price": 311.35,
      "revenue": 451442000000,
      "ticker": "AAPL"
    },
    {
      "available": "ok",
      "change_percent": 5.45,
      "dividend_yield_percent": 0.66,
      "eps": 11.82,
      "gross_margin_percent": 69.4,
      "market_cap": 3346000000000,
      "name": "Microsoft Corporation",
      "net_margin_percent": 36.1,
      "pe_ratio": 38.1,
      "price": 450.24,
      "revenue": 270000000000,
      "ticker": "MSFT"
    }
  ],
  "source": "x402stock",
  "tickers": [
    "AAPL",
    "MSFT"
  ]
}

Payment details

Pay to0x3070fbb3803819fb5bdfe9286fdc6325a877fa85
AssetUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
NetworksBase
Schemesexact

Is this your API?

Pin it to the top of Market Data and the homepage with a featured placement.

Get featured →

More from X402stock & similar services