{"uid":"cap_xyM_qwXhpX35hppbOhnfb","slug":"agent402-tools-onchain-analyst-sql-over-base-d0304476","name":"agent402.tools Onchain Analyst — SQL over Base","description":"Bundled execution of the Onchain analyst (SQL over Base) workflow - Ask Base anything in one paid call: your SQL runs against Coinbase's indexed, DECODED chain data (events with parsed parameters, transactions, blocks, user-ops) with the live schema alongside - no indexer, no RPC archaeology. One x402 payment runs 3 underlying tools (onchain-sql-schema, onchain-sql, stats-summary); partial-success per step.","url":"https://agent402.tools/api/skill/onchain-analyst","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"sql":{"type":"string","description":"Read-only ClickHouse-dialect SQL to run (SELECT/WITH only, time-bounded)"}}},"responseSchema":{"type":"json","example":{"args":{"sql":"SELECT COUNT(*) AS blocks FROM base.blocks WHERE block_number > 32000000"},"pack":"onchain-analyst","steps":[{"ok":true,"slug":"onchain-sql-schema","result":{}},{"ok":true,"slug":"onchain-sql","result":{}},{"ok":true,"slug":"stats-summary","result":{}}],"summary":"3/3 steps succeeded"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.021","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.021/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.021","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.021","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_2PsL7DIDXrjNHRB9LcjET","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.021","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Executes read-only ClickHouse-dialect SQL against Coinbase's fully decoded Base chain data (events, transactions, blocks, user-ops) and returns results in one paid API call","exampleAgentPrompt":"Run this SQL against Base chain data and show me the results: SELECT contract_address, COUNT(*) as event_count FROM decoded_events WHERE block_time > now() - INTERVAL 1 DAY GROUP BY contract_address ORDER BY event_count DESC LIMIT 20","exampleUseCases":null,"resultDescription":"Returns the rows resulting from the SQL query executed against Coinbase's indexed, decoded Base blockchain data — including decoded event parameters, transaction fields, block metadata, and user-op details, formatted as a structured result set","failureModes":["Non-SELECT SQL rejected (INSERT/UPDATE/DELETE not allowed)","Query exceeds time bound or row limit","ClickHouse-dialect incompatibility with submitted SQL","Invalid table or column reference (schema mismatch)","Payment failure or insufficient USDC balance (x402 payment required)","Rate limiting or timeout on large aggregations"],"whenToPreferThis":"Use this endpoint when you need to run arbitrary analytical SQL queries against decoded Base blockchain data — especially when you need access to parsed event parameters, decoded transaction fields, or aggregated onchain metrics. Prefer over raw RPC calls when you want SQL-level filtering, joining, and aggregation over indexed chain data without running your own indexer. Best for analytics, dashboards, and investigative onchain queries on Base L2.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:51:09.494Z","isFirstParty":false}