Documentation Index
Fetch the complete documentation index at: https://docs.dune.com/llms.txt
Use this file to discover all available pages before exploring further.
We have a Go client available at github.com/duneanalytics/duneapi-client-go.
Installation
To install the SDK, run the following command:
go get github.com/duneanalytics/duneapi-client-go
Quick Start
Initialize the client and execute a query:
package main
import (
"fmt"
"os"
"github.com/duneanalytics/duneapi-client-go"
)
func main() {
// Initialize client with API key
client := duneapi.New(os.Getenv("DUNE_API_KEY"))
// Execute a query
queryID := 1215383
results, err := client.ExecuteQuery(queryID)
if err != nil {
panic(err)
}
// Process results
fmt.Printf("Got %d rows\n", len(results.Rows))
for _, row := range results.Rows {
fmt.Printf("%+v\n", row)
}
}
Error Handling
The Go client follows idiomatic Go error handling patterns:
results, err := client.ExecuteQuery(queryID)
if err != nil {
// Handle error
log.Printf("Error executing query: %v", err)
return
}
// Use results
fmt.Println(results)
Additional Resources
GitHub Repository
View source code and documentation
Go Package
View on pkg.go.dev
Report Issues
Report bugs or request features
API Reference
View full API documentation