# Tollkit On-Chain Token Price

> Tollkit On-Chain Token Price is a paid API for AI agents from extract.tollkit.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-10).

Returns the current USD price of an ERC-20 or SPL token by reading live from its deepest Uniswap v3 or Orca Whirlpool on-chain pool on Base, Ethereum, or Solana.

## Facts

- Endpoint: POST https://extract.tollkit.dev/chain/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/tollkit-on-chain-token-price-42640edb
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_6drc-aZ2OWzfWIX9DEhGv

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 tollkit-on-chain-token-price-42640edb -d '<json body>'
```

Example prompt: What's the current on-chain price in USD for the token at 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 on Ethereum — read it straight from its Uniswap v3 pool, not a price feed.

## When to prefer this

Choose this endpoint when you need a trustless, live on-chain price not sourced from a centralized price oracle or aggregator API. Ideal when you want the actual AMM pool price with liquidity context (pool address, depth, thin-liquidity warning) for Base, Ethereum, or Solana tokens. Prefer it over CoinGecko or CoinMarketCap when the token is newly launched, obscure, or when you need to verify the price hasn't diverged from on-chain reality.

## Known failure modes

- Token has no on-chain pool — endpoint returns no price and no charge is made
- Invalid contract address format — rejected by input pattern validation
- Chain not supported — must be 'base', 'ethereum', or 'solana'
- Pool exists but is extremely thin — result is returned with thin-liquidity flag set to true
- Network RPC timeout — live chain read may occasionally fail under congestion

## How this service works

Token price in USD from on-chain pools, on Base, Ethereum or Solana: give a token, get its current price from its deepest Uniswap v3 pool (Orca Whirlpool on Solana) against USDC or WETH/SOL, with the pool and its depth, and a flag when liquidity is thin. Read live from the chain, not a price API. $0.003 per call; a token with no pool is not charged.

## Output

Returns the token's current USD price derived from its deepest Uniswap v3 (or Orca Whirlpool on Solana) pool against USDC or WETH/SOL, along with the pool address, pool liquidity depth, and a boolean flag indicating whether liquidity is thin. No result or charge is returned if the token has no qualifying pool.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "chain": {
   "enum": [
    "base",
    "ethereum",
    "solana"
   ],
   "type": "string",
   "default": "base",
   "description": "Which chain to read: \"base\" (default), \"ethereum\" or \"solana\"."
  },
  "token": {
   "type": "string",
   "pattern": "^(0x[0-9a-fA-F]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$",
   "description": "ERC-20 contract or SPL mint to price."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/tollkit-on-chain-token-price-42640edb/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from extract.tollkit.dev](https://www.zero.xyz/host/extract.tollkit.dev/llms.txt)
