# ERC-20 Token USD Spot Price (Onchain)

> ERC-20 Token USD Spot Price (Onchain) is a paid API for AI agents from x402-seller-pmlm.onrender.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-10).

Returns the current USD spot price of any ERC-20 token (by symbol or contract address) using Uniswap v3 pools on Ethereum, Base, Arbitrum, or Polygon, along with pool depth, spread, and confidence.

## Facts

- Endpoint: GET https://x402-seller-pmlm.onrender.com/price?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/erc-20-token-usd-spot-price-onchain-8b4f34fb
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ZRedkKFY-_AFY_LH5-E8t

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 erc-20-token-usd-spot-price-onchain-8b4f34fb
```

Example prompt: What's the current onchain USD price of LINK on Arbitrum? I need the Uniswap v3 spot price with confidence level and pool depth.

## When to prefer this

Choose this endpoint when an agent needs a verifiable, onchain-sourced USD price for any ERC-20 token — especially when trust and auditability matter (block number and pool data are returned). Prefer this over centralized exchange price feeds when the token is DeFi-native, not listed on major CEXes, or when the agent needs pool depth and spread data for trading decisions. Ideal for DeFi agents, arbitrage bots, portfolio valuations, and trade pre-checks on Ethereum, Base, Arbitrum, or Polygon.

## Known failure modes

- 400 Bad Request — invalid or malformed token symbol/address input
- 422 Unprocessable Entity — token not found on specified chain or no Uniswap v3 pool exists for it
- 503 Service Unavailable — upstream node or pricing service temporarily busy; not charged
- Token with very low liquidity may return 'low' confidence and wide pool spread
- Providing an address on the wrong chain returns 422 or incorrect pricing

## How this service works

Crypto token price: live USD price, 24h change, total supply and FDV for any token, read onchain from DEX pools (Uniswap v3 on Ethereum, Base, Arbitrum, Polygon; Orca, Raydium, PumpSwap on Solana), so every number is verifiable. Pass token (ETH, BTC, SOL, PEPE... or contract/mint address), optional chain. Returns price, change, pools, depth, spread, confidence, block. 0.002 USDC/call; failed calls are free.

## Output

Returns a JSON object with: token metadata (name, symbol, address, chain, decimals), current USD price (priceUsd as a number), array of Uniswap v3 pools used for pricing, total liquidity depth in USD (totalDepthUsd), cross-pool spread percentage (poolSpreadPct), a confidence rating ('high', 'medium', or 'low'), the pricing method used, block number and timestamp at which the price was captured, and a generatedAt timestamp.

## 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"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "token"
     ],
     "properties": {
      "chain": {
       "enum": [
        "ethereum",
        "base",
        "arbitrum",
        "polygon",
        "solana"
       ],
       "type": "string",
       "description": "Chain for an address (default ethereum); symbols use their deepest chain"
      },
      "token": {
       "type": "string",
       "maxLength": 42,
       "minLength": 1,
       "description": "Symbol (ETH, WETH, BTC, WBTC, CBBTC, USDC, USDT, DAI, LINK, UNI, AAVE, PEPE, ...) or ERC-20 contract address"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "token",
      "priceUsd",
      "pools",
      "block"
     ],
     "properties": {
      "block": {
       "type": "object",
       "properties": {
        "number": {
         "type": "integer"
        },
        "timestamp": {
         "type": "string"
        }
       }
      },
      "pools": {
       "type": "array",
       "items": {
        "type": "object"
       }
      },
      "token": {
       "type": "object",
       "properties": {
        "name": {
         "type": [
          "string",
          "null"
         ]
        },
        "chain": {
         "type": "string"
        },
        "symbol": {
         "type": [
          "string",
          "null"
         ]
        },
        "address": {
         "type": "string"
        },
        "decimals": {
         "type": "integer"
        }
       }
      },
      "fdvUsd": {
       "type": "number",
       "description": "Fully diluted valuation = price x total supply (not circulating market cap)"
      },
      "method": {
       "type": "string"
      },
      "priceUsd": {
       "type": "number"
      },
      "confidence": {
       "enum": [
        "high",
        "medium",
        "low"
       ],
       "type": "string"
      },
      "generatedAt": {
       "type": "string"
 
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/erc-20-token-usd-spot-price-onchain-8b4f34fb/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-seller-pmlm.onrender.com](https://www.zero.xyz/host/x402-seller-pmlm.onrender.com/llms.txt)
