| Crates.io | dune-api |
| lib.rs | dune-api |
| version | 0.1.0 |
| created_at | 2026-01-17 09:02:50.865412+00 |
| updated_at | 2026-01-17 09:02:50.865412+00 |
| description | Unofficial Rust client for the Dune Analytics API |
| homepage | |
| repository | https://github.com/yldfi/yldfi-rs |
| max_upload_size | |
| id | 2050165 |
| size | 111,000 |
Unofficial Rust client for the Dune Analytics API
[dependencies]
dune-api = "0.1"
tokio = { version = "1", features = ["full"] }
use dune_api::Client;
#[tokio::main]
async fn main() -> Result<(), dune_api::Error> {
let client = Client::new("your-api-key")?;
// Execute a query and wait for results
let result = client.executions().run_query(1234, None).await?;
for row in result.result.unwrap().rows {
println!("{:?}", row);
}
// Execute raw SQL
let result = client.executions().run_sql("SELECT 1 as value", None).await?;
println!("{:?}", result.result);
// Get cached results for a query
let result = client.executions().query_results(1234).await?;
println!("{:?}", result.result);
Ok(())
}
DUNE_API_KEY - Your Dune API key (required)MIT