{"uid":"cap_aVYZiyrDmGAoWJgz992Nj","slug":"token-price-lookup-base-erc-20-6f17ef58","name":"Token Price Lookup (Base ERC-20)","description":"41 pay-per-call JSON APIs for AI agents. No account or API key: an unpaid POST returns HTTP 402, pay in USDC on Base with x402 v2, retry. Prices from $0.001 per call.","url":"https://x402-micro-pay.com/api/skills/token-price?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"chain":{"enum":["base"],"type":"string","default":"base"},"token":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Base ERC-20 contract address"},"request_id":{"type":"string","pattern":"^[A-Za-z0-9._:-]+$","maxLength":64,"minLength":1,"description":"Optional idempotency key. Echoed back; a credit-pack redemption with the same request_id and body is charged once."}}},"responseSchema":{"type":"json","example":{"ok":true,"data":{"agree":true,"chain":"base","token":"0x4200000000000000000000000000000000000006","symbol":"WETH","decimals":18,"by_source":{"onchain":{"pool":{"dex":"uniswap_v3","quote":"USDC","address":"0x6c561b446416e1a00e8e93e221854d6ea4171372","variant":"fee 3000","quote_side_usd":60045166.09},"block":52723111,"price_usd":"2431.203","weth_usd_onchain":2431.202812620857},"defillama":{"as_of":"2026-10-17T11:11:51Z","price_usd":"2434.91","confidence":0.99,"staleness_s":58}},"price_usd":"2433.056","disclaimer":"Data only, not investment advice. Spot prices from public sources at one point in time; they can be stale, manipulated in thin pools, or wrong. No buy/sell signal is given or implied.","spread_pct":0.1524,"sources_agree_within_pct":2.5},"next":["token_risk"],"skill":"token_price","charged":true,"service":"token_price","sources":[{"url":"https://coins.llama.fi/prices/current/base:0x4200000000000000000000000000000000000006","name":"DeFiLlama coins API","fetched_at":"2026-10-17T11:12:48Z"},{"url":"https://basescan.org/address/0x6c561b446416e1a00e8e93e221854d6ea4171372","name":"Base on-chain pool (public RPC)","block":52723111,"fetched_at":"2026-10-17T11:12:48Z"}],"summary":"WETH $2433.056 (2 sources, spread 0.15%) - data only, not advice","version":"1.0.0","warnings":[],"confidence":0.975,"data_as_of":"2026-10-17T11:11:51Z","disclaimer":"Data only, not investment advice. Spot prices from public sources at one point in time; they can be stale, manipulated in thin pools, or wrong. No buy/sell signal is given or implied.","generated_at":"2026-10-17T11:12:49Z"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_hSKW75w3ln8-2TRBlLyMM","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns the current USD spot price of any ERC-20 token on Base, aggregated from on-chain Uniswap V3 pools and DeFiLlama, with spread and confidence metrics.","exampleAgentPrompt":"What's the current USD spot price of WETH on Base — the contract is 0x4200000000000000000000000000000000000006 — and do the on-chain and DeFiLlama sources agree?","exampleUseCases":[{"title":"DeFi portfolio valuation","prompt":"I need the current USD price of the token at 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913 on Base so I can calculate my portfolio value — give me the on-chain price, the DeFiLlama price, and how much they differ."},{"title":"Arbitrage spread monitoring","prompt":"Check the price spread between on-chain and DeFiLlama for the Base token 0x4200000000000000000000000000000000000006 and tell me if the sources agree within 1% — I want to know if there's a pricing discrepancy worth acting on."},{"title":"Smart contract price sanity check","prompt":"Before my contract executes a swap, can you verify the current USD price of the token at 0x2ae3f1ec7f1f5012cfeab0185bfc7aa3cf0dec22 on Base and flag any staleness or low-confidence warnings?"}],"resultDescription":"A JSON object containing the token's symbol, decimals, aggregated USD spot price, a per-source breakdown (on-chain Uniswap V3 pool details including DEX, quote token, pool address, block number, and price; DeFiLlama price with confidence and staleness), spread percentage between sources, an overall confidence score, data freshness timestamps, any warnings, a disclaimer, and a suggested next skill ('token_risk').","failureModes":["Invalid or non-ERC-20 contract address returns an error or empty data","Token with no Uniswap V3 pool on Base may return only one source or fail","Very thin pools can return manipulated or unreliable prices (flagged in warnings)","Stale DeFiLlama data if the token is infrequently priced (staleness_s will be high)","Payment not sent results in HTTP 402 response requiring x402 USDC payment on Base","Mismatched request_id with different body may cause unexpected deduplication behavior"],"whenToPreferThis":"Choose this endpoint when you need a dual-source (on-chain + DeFiLlama) USD price for any ERC-20 token on Base, with explicit spread and confidence signals. Prefer it over raw oracle calls when you want built-in source agreement validation, no API key setup, and pay-per-call pricing at $0.002 USDC. Ideal for agents that need trustworthy spot prices without maintaining API credentials or subscriptions.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-20T12:37:13.155Z","isFirstParty":false,"canonicalSlug":"token-price-lookup-base-erc-20-6f17ef58"}