Back | Blog
Tudor M

Tudor M β€’ β€’ Discord

Get on-chain data from Dune and let your bots do the rest 😎

Cover Image for Get on-chain data from Dune and let your bots do the rest 😎

Crypto data by and for the community

This is a core value that and Boto share, so it's only natural for the two to collaborate. We're thrilled to announce a new block available on Dune Query API.

A while ago we tested the waters with the Dune Charts block. Now it's time for the next step: actually obtain dynamic crypto data and run bots and logic based on it. How powerful is that? Well, let me try to explain.

First, some fundamentals.

Dune is a community and platform for building and sharing dashboards for the web3 world: NFTs, DeFi and everything inbetween. They have a few core elements: dashboard, queries, visualisations and an all-mighty leaderboard. is the logic layer that connects multiple web3 and web2 sources of data. Creative folks can create bots and share them. Bots are made of multiple blocks and can run on a certain interval or can be triggered by market events.

Get notified when an NFT collection hits a milestone πŸŽ‰

Your NFT project is growing and you're proud of the nifty dashboard you created to keep track of the buzz. Why not pop some champagne with your community when the next milestone is reached? Post a pumping GIF on Discord when the total sales passed 100 ETH with this recipe: LFG! New Volume Milestone in MAYC hit!

Act fast based on crypto metrics ⚑

One of the most powerful features of is composability. We're often surprised by some bots with >20 blocks!

Why not monitor 2, 8, 20 Dune queries and use their aggregated data as a decision point to trigger on-chain actions?

For example, this clever dashboard tracks DeFi loans across AAVE, MakerDAO and Compound Finance, while this one tracks AAVE treasury analytics. When you spot a good opportunity, use the AAVE Loan Repayment block to liquidate your existing loan and get a Discord notification when this happens.

Keep your Dune dashboard fresh 🌸

An alternative use case for this newly launched block is to trigger the refresh of your Dune queries. This functionality is referred to as "execute queries". Normally, queries are executed automatically or interactively when a user initiates them. However, if you have a dashboard that is not regularly accessed, the data shown on the dashboard may become outdated, and the queries will only be executed when a user actually views the dashboard. This can cause significant delays in loading times, especially for dashboards that include queries that require a lot of resources.

To use this feature, select "Trigger execution" from the Run Mode dropdown on the block:

[object Object]

This feature is a programatic alternative to the "Scheduling Queries" feature. Read more about that here.

Is the sky the limit?

Mostly yes, but like all valuable things in life, there are certain boundries. The most important one is the credit limit, that comes with all Dune plans. Read more about this here. This essentially means you should be careful about the number of rows the query returns. Don't go trigger happy and dump millions of rows.

In conclusion, get data from, strap it to a rocket (Starship wen?), lite the fuse and watch it fly to Mars! πŸ§¨πŸš€ LπŸ“ˆFπŸ“ˆGπŸ“ˆ






Tudor MAbout Tudor

Head of Engineering at

Holistic and deterministic views of tech. Hobby investor. Python is cool. Big fan of open-source and love contributing to the community, as well as leading by example. Bought my first crypto on MtGox.

Related Articles