dune-analytics-api
Dune Analytics API for blockchain data queries. Use for: (1) Discovering tables and inspecting schemas, (2) Executing/refreshing Dune queries, (3) SQL query optimization for Solana/EVM chains, (4) Understanding dex.trades vs dex_aggregator.trades, (5) Working with Solana transactions and log parsing, (6) Managing query parameters and results, (7) Uploading CSV/NDJSON data to Dune tables. Triggers on: Dune query, blockchain data, DEX trades, Solana transactions, on-chain analytics, query optimization, data upload, CSV upload, table discovery, find table, schema inspection.
Why use this skill?
Use the Dune Analytics API skill to query blockchain data, optimize SQL, and analyze on-chain trades directly from your OpenClaw agent.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/lz-web3/dune-analytics-apiWhat This Skill Does
The dune-analytics-api skill integrates OpenClaw directly with Dune Analytics, the industry-standard platform for on-chain data. It provides the capabilities to query, analyze, and manage blockchain data programmatically. By leveraging the dune-client library, this skill allows users to execute complex SQL queries across Ethereum, Solana, and other supported chains, inspect schemas for discovery, and manage query results efficiently. Beyond just pulling data, the skill includes specialized logic for performance optimization, ensuring that costly blockchain queries are written efficiently to maximize performance and minimize credit consumption.
Installation
To integrate this skill, run the following command in your terminal:
clawhub install openclaw/skills/skills/lz-web3/dune-analytics-api
Ensure you have your Dune API key ready. Set it as an environment variable named DUNE_API_KEY or configure it via your agent's settings file. The skill requires the dune-client Python package, which will be installed automatically with the agent's environment setup.
Use Cases
This skill is designed for high-level blockchain analytics and data engineering. Key use cases include: 1) Performing deep-dive audits on decentralized exchanges (DEX) using dex.trades or dex_aggregator.trades data; 2) Analyzing Solana transaction logs to track user behavior or protocol interactions; 3) Managing custom datasets by uploading CSV or NDJSON files directly into Dune; 4) Optimizing complex SQL queries that involve heavy table joins or array manipulations to improve execution time; 5) Automating periodic data retrieval for dashboards or reporting, keeping your local records in sync with the live blockchain state.
Example Prompts
- "Find the table schema for Uniswap v3 trades on Ethereum and help me write a query to calculate daily volume for the last 30 days."
- "I need to upload this CSV file containing my wallet labels to a new Dune table named
user_labelsso I can use it in my join queries." - "My Solana transaction query is timing out. Can you review the SQL for performance optimizations and suggest better indexing or filtering?"
Tips & Limitations
Always consult the internal reference files before writing SQL, as they contain critical performance anti-patterns and specific documentation for common table structures. Always start with private queries (is_private=True) to avoid cluttering public dashboards and to save costs during the development phase. Keep an eye on your credit usage; report credits consumed after every execution to stay within your project's limits. Note that complex aggregations on large datasets may require multi-step query execution or materialized views.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-lz-web3-dune-analytics-api": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: network-access, external-api