# x402stock xStocks On-Chain Price Lookup

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

Returns real-time on-chain price data for a tokenized xStock (e.g. AAPLx) by ticker, decoded from Raydium CLMM pool state on Solana, including underlying equity price, premium, liquidity, and market status.

## Facts

- Endpoint: GET https://x402stock.xyz/api/v1/xstocks/%7Bticker%7D
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-08
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402stock-xstocks-on-chain-price-lookup-52c34667
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Y_Xz6sBLd-5rnEZkEOPoJ

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-lookup-52c34667
```

Example prompt: What's the current on-chain xStock price for AAPL — how does it compare to the real stock price, and is there a significant premium right now?

## When to prefer this

Use this endpoint when you need the live on-chain AMM price of a tokenized US equity (xStock) on Solana, especially to compare it against the real underlying stock price or measure the current premium/discount. Prefer this over traditional stock price APIs when the use case involves DeFi, Solana-native tokenized equities, or Raydium CLMM pool state.

## Known failure modes

- Invalid or unsupported ticker returns an error or empty result
- Ticker format mismatch (e.g. 'AAPLx' vs 'AAPL') may cause lookup failure
- Solana RPC unavailability could cause on-chain data fetch to fail
- Payment failure via x402/USDC on Base blocks the request
- Off-hours prices reflect 24/7 AMM market discovery, not arb-anchored underlying price — may diverge significantly

## How this service works

Pay-per-call market and economic data API for AI agents: US stocks, ETFs and options, forex, crypto and on-chain perps, energy commodities, US and global macro (Fed, CPI, jobs, GDP, Treasury, World Bank), SEC filings, congressional trades, and market sentiment. No API keys, no accounts. Pay per request in USDC via x402 on Base.

## Output

A JSON object with the xStock's on-chain AMM price in USD, the underlying equity's last price, the premium percent, pool liquidity, mint and pool addresses, the current tick, the scaled-UI multiplier, whether the US market is open, and an as-of timestamp. Also includes notes on price source (Raydium CLMM sqrt_price_x64) and data sections status.

## Request schema (JSON Schema)

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

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "item": {
   "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
  },
  "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",
  "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-lookup-52c34667/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)
