Blockchain Structured Query
/onchain/queryQuery on-chain tables with structured JSON filters — no SQL text.
What to tell it
Say these in your message. Your AI agent fills them in when it runs the tool.
- SourceNeededFully-qualified table name. Discover tables with /onchain/schema. Example: agent.ethereum_dex_trades.
- FieldsOptionalColumns to return. Omit to return all columns. Example: ["block_time", "amount_usd"].
- FiltersOptionalWHERE conditions, ANDed together. ALWAYS include a block_date bound on large tables — without it the query times out. Example: [{"field": "block_date", "op": "…
- SortOptionalORDER BY clauses. Example: [{"field": "amount_usd", "order": "desc"}].
- LimitOptionalMax rows to return. Example: 20. Defaults to 20 (server-side), capped at 10000.
- OffsetOptionalRows to skip for pagination. Example: 0. Defaults to 0.
Use it in chat
Paste this in chat with what you need, or type @ and pick it. Your AI agents also use it on their own when the work needs it.
@surf:/onchain/queryTopics
On-chain DataMore from Surf
All 105Bridge Protocol RankingList bridge protocols ranked by USD volume over a time range.2 credits a callToken DEX Trade HistoryReturns recent DEX swap events for a token contract address.4 credits a callKalshi TradesReturns individual trade records for a Kalshi market.4 credits a callClosed TradesReturns a wallet's closed round-trip trades — one row per open→close position lifecycle, with realized per-trade P&L (gross, net = gross −…4 credits a callExchange Trading PairsReturns trading pairs available on an exchange.1 credit a callToken Unlock ScheduleReturns token unlock time-series with cumulative amounts, allocation breakdowns, total supply denominator, and unlocked-supply percentage.2 credits a call