Public API · free · no key required

Build with the same live data we use.

A small, opinionated, free crypto API that wraps CoinGecko with smart server caching. Plus drop-in embed widgets for your blog or product page. Attribution back to DCA Finance is the only ask.

Endpoints

All endpoints are public and require no authentication. Reasonable use only — please cache aggressively on your side and avoid burst traffic. We log abuse patterns and may rate-limit by IP if needed.

GET/api/crypto/livecache · 60 seconds

Live spot prices and 24h change for a fixed list of CoinGecko coins. Server-cached 60s, falls back to a static price table when upstream rate-limits. Designed for tickers and dashboards.

Parameters
idsstringComma-separated CoinGecko coin ids (e.g. bitcoin,ethereum,solana). Optional — defaults to a 6-coin marquee set.default: bitcoin,ethereum,solana,cardano,polkadot,ripple
Example
curl 'https://dca-finance.com/api/crypto/live?ids=bitcoin,ethereum,solana'
Response
{
  "bitcoin":  { "id": "bitcoin",  "usd": 71420.5, "change24h": 0.42, "lastUpdated": 1733512345000, "source": "live" },
  "ethereum": { "id": "ethereum", "usd": 3812.1,  "change24h": 1.06, "lastUpdated": 1733512345000, "source": "live" },
  "solana":   { "id": "solana",   "usd": 184.2,   "change24h": -0.31, "lastUpdated": 1733512345000, "source": "fallback" }
}
GET/api/crypto/backtestcache · 24 hours (keyed on coin + day)

Historical price series for one CoinGecko coin over a date range. Returns hourly granularity for ≤90-day ranges, daily for longer ranges. Perfect for plugging into a DCA backtest engine.

Parameters
idstringCoinGecko coin id (35 supported, see allowlist below).
fromunix msRange start, in milliseconds since epoch.
tounix msRange end, in milliseconds since epoch. Optional — defaults to now.
Example
curl 'https://dca-finance.com/api/crypto/backtest?id=bitcoin&from=1577836800000&to=1778154469649'
Response
{
  "id": "bitcoin",
  "points": [
    { "ts": 1577836800000, "usd": 7195.16 },
    { "ts": 1577923200000, "usd": 7344.96 },
    ...
  ],
  "source": "live",       // or "fallback" if served from stale cache
  "cachedAt": 1733512345000
}
Supported coins (allowlist)
bitcoinethereumsolanacardanopolkadotripplebinancecoindogecointronavalanche-2chainlinklitecoinmatic-networknearcosmostoncoinshiba-inumonerobitcoin-cashethereum-classicfilecoinaptossuipepeinternet-computerhedera-hashgraphrender-tokenarbitrumoptimismvechaininjective-protocolthe-graphimmutable-xpancakeswap-tokenstellaruniswap

Embed widgets

Drop a calculator into your blog with one iframe tag. The embed reads scenario parameters from the URL so each iframe locks to a specific case study. Attribution footer links back to the full version on DCA Finance.

DCA Backtest

Compact backtest panel with KPIs and a portfolio-vs-cost-basis chart. Query-param driven so each embed locks to a specific scenario.

Live preview
Embed snippet
<iframe src="https://dca-finance.com/embed/dca-backtest?coin=bitcoin&amount=100&freq=weekly&start=2020-01-01"
        width="100%" height="640" frameborder="0" loading="lazy"
        title="DCA Finance — backtest"></iframe>

Attribution & terms

Free for any use including commercial — keep the "Built by DCA Finance →" footer intact on embeds. For the API, link back to dca-finance.com from any public page using the data. No SLA, no warranty, do not redistribute as your own data product.