# x402stock xStocks On-Chain Price Feed

> x402stock xStocks On-Chain Price Feed is a paid API for AI agents from x402stock.xyz, paid per call via x402, $0.02/call, status healthy (last checked 2026-09-15, last successful call 2026-08-25).

Returns real-time on-chain price data for tokenized stocks (xStocks) decoded from Raydium CLMM pool state on Solana, including AMM price, underlying equity price, premium/discount, and market status.

## Facts

- Endpoint: GET https://x402stock.xyz/api/v1/xstocks
- Price: $0.02/call
- Payment: x402
- Status: healthy
- Last checked: 2026-09-15
- Last successful call: 2026-08-25
- Success rate: 91% of calls made through Zero
- Rating: 4.0 / 5 from 1 review
- Activations on Zero: 116
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402stock-xstocks-on-chain-price-feed-6ef7437f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_IwncWlqw1zhc4Ff-ALQc1

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-xstocks-on-chain-price-feed-6ef7437f
```

Example prompt: What's the current on-chain price of AAPLx on Solana right now, and how does it compare to the real AAPL price — is it trading at a premium or discount?

## When to prefer this

Use this endpoint when you need the live Raydium AMM price of a tokenized xStock on Solana, including premium/discount versus the underlying equity, liquidity depth, and US market open status — especially when building DeFi agents, arbitrage monitors, or on-chain portfolio trackers that need Solana-native synthetic stock prices without API keys.

## Known failure modes

- Pool state unavailable on Solana — returns sections.onchain error
- Underlying price feed unavailable — returns sections.underlying error
- Invalid or unsupported symbol/mint — empty items array or 404
- Payment not received or insufficient USDC — 402 Payment Required response
- Network congestion on Solana causing stale pool state

## How this service works

Use to monitor tokenized US equities (xStocks) against their real underlyings: every tracked xStock's on-chain price decoded from Raydium CLMM pool state on the public Solana ledger (no Backed/Chainlink/Pyth API), the underlying's live quote, and the premium/discount percent — plus pool liquidity, scaled-UI multiplier, and a us_market_open arb-context flag. From x402stock

## Output

Returns a JSON object with the xStock's on-chain AMM price in USD decoded from Raydium CLMM sqrt_price_x64, the underlying equity's price, premium/discount percentage, liquidity, current tick, Token-2022 scaled-UI multiplier, underlying market open/closed status, and day change percent. Also includes mint address, pool address, venue (Solana), protocol (raydium-clmm), and section health status.

## Example request

```json
{
 "properties": "symbol,price,premium"
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "properties": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "note": "xStock prices decoded from Raydium CLMM pool state (sqrt_price_x64) on the public Solana ledger — not from any Backed/xStocks, Chainlink, or Pyth API. Per-share price accounts for the Token-2022 scaled-UI multiplier. The AMM price is arb-anchored to the underlying only while US markets are open (us_market_open); off-hours it is the market's standing 24/7 price discovery.",
  "as_of": "2026-06-08T13:02:11.000Z",
  "count": 1,
  "items": [
   {
    "mint": "XsbEhLAtcf6HdfpFZ5xEMdqW8nfAvcsP5bdudRLJzJp",
    "pool": "CKwJZwm7oj3nu4653N1EpDrqXbXAYXoPFiPeEnLouF8y",
    "symbol": "AAPLx",
    "liquidity": 8312047113.2,
    "multiplier": 1.000139,
    "underlying": "AAPL",
    "tick_current": 10688,
    "premium_percent": 0.24,
    "xstock_price_usd": 291.12,
    "pool_price_raw_unit": 291.16,
    "underlying_price_usd": 290.43,
    "underlying_market_status": "closed",
    "underlying_change_percent": 0.82
   }
  ],
  "venue": "solana",
  "source": "x402stock",
  "program": "CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK",
  "protocol": "raydium-clmm",
  "sections": {
   "onchain": "ok",
   "underlying": "ok"
  },
  "us_market_open": false
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402stock-xstocks-on-chain-price-feed-6ef7437f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402stock.xyz](https://www.zero.xyz/host/x402stock.xyz/llms.txt)
