1. Sign Up
Create your account at dune.com/auth/register New accounts come with free credits to get you started.2. Generate API Key
- Navigate to API settings page
- Click Create API Key
- Give your key a descriptive name (e.g., “Production API”, “Development”)
- Copy and securely store your API key
- Dune has two types of account: user account and team account. A team can have many users. A user can join many teams.
- Each user or team account has its own context. Queries created under a team account can only be managed within the team account context.
- An API key belongs to a specific context, and is either associated with a user account or a team account.
Keep your API key secure! Treat it like a password. Never commit it to version control or share it publicly. Anyone with your API key can make requests on your behalf and consume your credits.
3. Authenticate
Use your API key to authenticate requests to Dune’s APIs. Include it in your request headers:Initialize the SDK
4. Start Building
Use your API key to make requests to Dune’s APIs. Here’s a simple example to get recent DEX trades:Understanding the Response
The API returns an execution object with your query status:Queries execute asynchronously. Use the
execution_id to check status and retrieve results. Our SDKs handle polling automatically.Getting Results
Once execution completes, fetch the results:Next Steps
Now that you’ve made your first request, explore common use cases:Analyze onchain data
Build custom analytics pipelines and reports
Use connectors
Connect with Trino Connector or DBT Connector for maximum flexibility
Additional Resources
API Reference
Complete endpoint documentation
Rate Limits
Understand API rate limits
Troubleshooting
Common issues and solutions