{"uid":"cap_DHTllQU3f4B44cRUwlDmW","slug":"x402stock-xyz-3424f338","name":"x402stock Stock Comparison","description":"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","url":"https://x402stock.xyz/api/v1/compare","method":"GET","headers":{},"bodySchema":{"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"},"market_cap":{"anyOf":[{"type":"number"},{"type":"null"}]},"change_percent":{"anyOf":[{"type":"number"},{"type":"null"}]},"net_margin_percent":{"anyOf":[{"type":"number"},{"type":"null"}]},"gross_margin_percent":{"anyOf":[{"type":"number"},{"type":"null"}]},"dividend_yield_percent":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false}},"as_of":{"type":"string"},"count":{"type":"number"},"source":{"type":"string","const":"x402stock"},"tickers":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}}}},"responseSchema":{"type":"json","example":{"rows":[{"eps":8.26,"name":"Apple Inc.","price":311.35,"ticker":"AAPL","revenue":451442000000,"pe_ratio":37.69,"available":"ok","market_cap":4589945623560,"change_percent":-0.371,"net_margin_percent":27.15,"gross_margin_percent":47.86,"dividend_yield_percent":0.35},{"eps":11.82,"name":"Microsoft Corporation","price":450.24,"ticker":"MSFT","revenue":270000000000,"pe_ratio":38.1,"available":"ok","market_cap":3346000000000,"change_percent":5.45,"net_margin_percent":36.1,"gross_margin_percent":69.4,"dividend_yield_percent":0.66}],"as_of":"2026-05-30T07:00:00.000Z","count":2,"source":"x402stock","tickers":["AAPL","MSFT"]}},"example":{"request":{"input":{"type":"http","method":"GET","queryParams":{"tickers":"AAPL,MSFT,GOOGL"}}},"response":{"rows":[{"eps":8.26,"name":"Apple Inc.","price":295.84,"ticker":"AAPL","revenue":451442000000,"pe_ratio":35.82,"available":"ok","market_cap":4282539262480,"change_percent":1.461,"net_margin_percent":27.15,"gross_margin_percent":47.86,"dividend_yield_percent":0.37},{"eps":16.79,"name":"Microsoft Corp","price":392.7,"ticker":"MSFT","revenue":318273000000,"pe_ratio":23.39,"available":"ok","market_cap":2951762813981.44,"change_percent":-1.1727,"net_margin_percent":39.34,"gross_margin_percent":68.31,"dividend_yield_percent":0.93},{"eps":10.81,"name":"Alphabet Inc. Class A Common Stock","price":360.17,"ticker":"GOOGL","revenue":402836000000,"pe_ratio":33.32,"available":"ok","market_cap":4346031014772.7397,"change_percent":1.0635,"net_margin_percent":32.81,"gross_margin_percent":59.65,"dividend_yield_percent":0.24}],"as_of":"2026-06-12T04:10:56.383Z","count":3,"source":"x402stock","tickers":["AAPL","MSFT","GOOGL"]}},"exampleRequest":{"tickers":"AAPL,MSFT,GOOGL"},"tags":["x402"],"displayCostAmount":"0.05","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.75","reviews":0,"stars":null,"state":"rated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.05/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_-iLrmEPO8C2u0GhdTlIK7","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.05","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Compare 2–3 US-listed stocks side-by-side, returning price, valuation, profitability, and dividend metrics for each ticker in one call","exampleAgentPrompt":"Compare AAPL, MSFT, and NVDA side by side — I want to see their price and day change, market cap, P/E, EPS, revenue, gross and net margins, and dividend yield all in one shot.","exampleUseCases":null,"resultDescription":"Returns an array of rows, one per ticker, each containing: ticker symbol, company name, current price, day change percent, market cap, P/E ratio, EPS, revenue, gross margin percent, net margin percent, dividend yield percent, and an availability flag. Also includes source identifier and as-of timestamp.","failureModes":["Missing or empty tickers parameter returns 400 error","More than 3 tickers may be unsupported or return partial data","Unknown or delisted ticker returns null values for most fields with available flag indicating unavailability","Payment failure (insufficient USDC balance) blocks the call via x402 protocol","Network timeout if upstream snapshot or fundamentals data is delayed"],"whenToPreferThis":"Use this endpoint when you need a quick multi-metric side-by-side snapshot of 2–3 US stocks in a single API call. Prefer it over fetching individual stock endpoints when the goal is peer comparison, watchlist review, or ranking by fundamentals like margins or P/E. It is more efficient than calling per-ticker endpoints separately and returns a combined view of price, valuation, and profitability metrics together.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":4,"lastUsedAt":"2026-06-10T03:06:16.897Z","lastSuccessfullyRanAt":"2026-06-10T03:06:16.897Z","lastHealthCheckAt":"2026-09-14T00:53:06.383Z","isFirstParty":false}