Guide
Market dataOn-chainCrypto API key

Dune API guide

If a signal can be written as SQL over on-chain data, Dune can compute it and the API can feed it to your strategy.

Last verified · Also known as Dune API, Dune Analytics API

Quick answer

Dune indexes major blockchains into SQL tables. Its API executes a saved query (by id, with parameters), polls for completion and returns the result rows, or simply returns the latest cached results. Requests carry the X-Dune-API-Key header and consume credits.

Dune API at a glance

Pricing
Free credits; paid plans
Availability
Worldwide
Paper trading
Not applicable (data only)
Integration type
REST + API key
In AlgoGP
Design and backtest in AlgoGP, connect the exported code
Header
X-Dune-API-Key
Flow
Execute query → poll status → get results
Python
dune-client

Build a Dune strategy with AlgoGP

AlgoGP does not connect to Dune natively yet. Dune uses plain HTTPS with an API key, so it is a good candidate for a native adapter; it is not built in yet.

  1. 1

    Design and backtest in AlgoGP

    Describe the strategy to the copilot and backtest it on years of normalized history. The result does not depend on any vendor.

  2. 2

    Export the Python project

    Every project exports strategy.py, market_data.py, brokers.py and live.py. The strategy only sees bars, cash, positions and orders, never a vendor’s wire format.

  3. 3

    Plug in Dune

    Implement the four adapter methods (account, positions, submit_market_order and a candle fetcher) with Dune’s SDK, or keep a built-in platform for paper trading and add Dune when you go live.

Built-in data sources for the same markets: Alpaca, Binance, Coinbase Exchange, Yahoo Finance.

Dune API: frequently asked questions

Is the Dune API free?

The free plan includes monthly credits; heavier use needs a paid plan.

Design and backtest your Dune strategy first

AlgoGP turns an idea into Python and tests it on years of history before you connect it to Dune. The exported code keeps the broker behind four small adapter methods.

  • AI copilot writes and revises the rules
  • Backtests with realistic costs
  • Exported Python ready to wire to Dune

Free plan, no card required.

Dune alternatives

Independent guide. AlgoGP is not affiliated with Dune. Limits, prices and availability change; confirm them in the official documentation. Nothing here is investment advice.

Build a strategy