| Crates.io | dnapi |
| lib.rs | dnapi |
| version | 0.1.1 |
| created_at | 2026-01-17 12:47:30.796337+00 |
| updated_at | 2026-01-22 21:40:30.620711+00 |
| description | Unofficial Rust client for the Dune Analytics API (dnapi) |
| homepage | |
| repository | https://github.com/yldfi/yldfi-rs/tree/main/crates/dnapi |
| max_upload_size | |
| id | 2050396 |
| size | 111,286 |
Unofficial Rust client for the Dune Analytics API
[dependencies]
dnapi = "0.1"
tokio = { version = "1", features = ["full"] }
use dnapi::Client;
#[tokio::main]
async fn main() -> Result<(), dnapi::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