npx skills add duneanalytics/skills --skill dune
termix-official/cryptoclaw
dune
Execute and query Dune Analytics dashboards for on-chain data and custom SQL analytics.
Installation
npx skills add termix-official/cryptoclaw --skill dune
Similar popular skills
Related neighbors and high-traction skills in the same topics — useful to compare before installing.
Azure Storage Services including Blob Storage, File Shares, Queue Storage, Table Storage, and D…
567.1K installsQuery and analyze data in Azure Data Explorer (Kusto/ADX) using KQL for log analytics, telemetr…
566.2K installsPostgres best practices maintained by Supabase, for Postgres running anywhere. Load this skill …
391.6K installsGuides for configuring Prisma with different database providers (PostgreSQL, MySQL, SQLite, Mon…
269.8K installsPrisma Client API reference covering model queries, filters, operators, and client methods. Use…
269.3K installsPrisma ORM CLI commands reference covering init, generate, migrate, db, dev, complete, studio, …
267K installsAlso in this package
Other skills from termix-official/cryptoclaw · top by installs.
npx skills add termix-official/cryptoclaw
More details
Agent compatibility
Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.
Also listed on
Alternate registries and mirrors of this skill.
Repository health
main
Package contents
Files included with this skill beyond the listing page.
-
skill md
SKILL.md5,365 B -
docs
SUMMARY.md99 B
History
- First seen on skills.sh
- First recorded snapshot · 17 installs
SKILL.md
Dune Analytics API
Execute SQL queries on blockchain data, fetch dashboard results, and access curated datasets via the Dune API.
Base URL
https://api.dune.com/api/v1
Requires API key: set DUNEAPIKEY. Free tier available at https://dune.com/settings/api
Pass via header: X-Dune-API-Key: {key}
Core Workflow
1. Execute a Query
POST /query/{query_id}/execute
Body (optional filters):
{
"query_parameters": {
"wallet_address": "0x...",
"token_address": "0x..."
}
}
Returns execution_id for polling.
2. Check Execution Status
GET /execution/{execution_id}/status
States: QUERYSTATEPENDING, QUERYSTATEEXECUTING, QUERYSTATECOMPLETED, QUERYSTATEFAILED
Poll every 2-3 seconds until completed.
3. Get Results
GET /execution/{execution_id}/results
Returns rows as JSON with column metadata. Use ?limit=100&offset=0 for pagination.
Shortcut: Get Latest Results
GET /query/{query_id}/results
Returns cached results from the last execution without re-running. Fast and free of execution credits.
Useful Public Query IDs
| Query ID | Description |
|---|---|
3237721 |
Top DEX traders by volume (7d) |
3105506 |
Whale token transfers (24h) |
2030664 |
Stablecoin flows by chain |
1847958 |
NFT marketplace volume comparison |
3532352 |
Bridge volume across chains |
2474310 |
Gas spent by protocol (Ethereum) |
Note: Public query IDs may change or become unavailable. Verify before relying on them.
Writing Custom Queries
Create a Query
POST /query
Body:
{
"name": "My Query",
"query_sql": "SELECT * FROM ethereum.transactions WHERE \"from\" = {{wallet_address}} ORDER BY block_time DESC LIMIT 100",
"is_private": false
}
Key Tables
| Table | Chain | Description |
|---|---|---|
ethereum.transactions |
ETH | All transactions |
bnb.transactions |
BSC | BSC transactions |
polygon.transactions |
Polygon | Polygon transactions |
arbitrum.transactions |
Arbitrum | Arbitrum transactions |
erc20ethereum.evtTransfer |
ETH | ERC-20 transfer events |
erc20bnb.evtTransfer |
BSC | BEP-20 transfer events |
dex.trades |
Multi | Aggregated DEX trades |
nft.trades |
Multi | Aggregated NFT trades |
prices.usd |
Multi | Token prices (hourly) |
tokens.erc20 |
Multi | Token metadata |
DuneSQL Syntax Notes
- DuneSQL is based on Trino (Presto fork)
- Use double quotes for column names with special chars:
"from","to" - Byte arrays (addresses):
0xprefix works, useLOWER()for case-insensitive matching - Timestamps:
block_timeis TIMESTAMP type, useNOW() - INTERVAL '7' DAYfor ranges - Aggregations: standard SQL —
SUM(),COUNT(),AVG(),GROUP BY - Use
LIMITalways — avoid unbounded queries
Example Custom Queries
Wallet transaction count (last 30 days):
SELECT COUNT(*) as tx_count, SUM(value / 1e18) as total_eth
FROM ethereum.transactions
WHERE "from" = {{wallet_address}}
AND block_time > NOW() - INTERVAL '30' DAY
Top tokens by transfer volume (24h):
SELECT t.symbol, COUNT(*) as transfers, SUM(evt.value / POW(10, t.decimals)) as volume
FROM erc20_ethereum.evt_Transfer evt
JOIN tokens.erc20 t ON t.contract_address = evt.contract_address AND t.blockchain = 'ethereum'
WHERE evt.evt_block_time > NOW() - INTERVAL '1' DAY
GROUP BY t.symbol
ORDER BY transfers DESC
LIMIT 20
API Limits (Free Tier)
- 10 query executions per day (re-execute)
- 250 datapoints per result
- Cached results (
/query/{id}/results) do not count against execution limits - Prefer cached results when freshness is not critical
Usage Notes
- Prefer cached results (
GET /query/{id}/results) over re-executing queries to conserve credits - For wallet-specific analysis, pass the address as a
query_parameterrather than hardcoding - Always use
LIMITin custom SQL to avoid timeouts and large payloads - Combine with
debankfor real-time portfolio data anddefillamafor protocol-level TVL - When building custom queries, test with small limits first
- Present results in tables or summaries — raw Dune output can be verbose
Example Interactions
User: "Show top DEX traders this week" → Fetch cached results from query 3237721, present top 10 by volume
User: "How many transactions has my wallet done?" → Execute custom query with wallet_address parameter, report count and total value
User: "What are the biggest token transfers today?" → Fetch cached whale transfer query, present top movers
User: "Write a query to find all USDT transfers over $100k on BSC" → Create custom SQL on erc20bnb.evtTransfer, filter by USDT address and amount threshold