← Back to Home

Sparks Fetching Live Data

Sparks run inside a sandbox — a sealed glass box. That sandbox is what keeps AI‑generated software safe: the code inside can't reach your files, your network, or the outside world on its own.

But a sealed box can't show you a live stock price or today's weather. So Sparks can request live data through a vetted broker — a doorkeeper that sits between the Spark and the internet.

How it works (and why it's safe)

A Spark never goes online itself. Instead it passes a note to the broker:

"Please fetch the quote for AAPL."

The broker checks the note against an allowlist:

  1. Is this request type allowed? Only pre‑approved kinds of requests pass.
  2. Are the parameters valid? Anything is validated before it leaves the app.

Only if both checks pass does the broker — not the Spark — make the request and hand the result back. The untrusted Spark code never touches the network directly, and no secret keys are ever placed inside a Spark.

The one rule we never break: untrusted code, secret keys, and an open network connection are never allowed to exist at the same time.

What live data can a Spark access today?

This is the current allowlist, generated directly from the app's broker configuration — so it never drifts out of sync with what's actually permitted.

CapabilitySourceNeeds a key?Example use
Stock quotesYahoo FinanceNoA watchlist Spark showing live prices and daily change
Stock price history (OHLC)Yahoo FinanceNoA candlestick (K-line) chart with selectable time ranges
City geocodingOpen-Meteo GeocodingNoA weather Spark that lets the user search for a city by name
Weather forecastOpen-MeteoNoA dashboard Spark showing current weather and 7-day forecast with icons
Currency exchange ratesFrankfurter (ECB)NoA currency converter Spark with live rates
Historical exchange ratesFrankfurter (ECB)NoA Spark showing USD/CNY exchange rate trend over the past year
Crypto pricesCoinGeckoNoA crypto watchlist Spark showing live prices and 24h change
Crypto price historyCoinGeckoNoA Spark showing Bitcoin price chart with selectable time ranges

If a Spark asks for anything outside this list, the request is simply refused.

What's coming

  • More free public data — exchange rates, weather, reference lookups. Same broker, a few more entries on the allowlist.
  • Richer market data — historical prices for candlestick (K‑line) charts.
  • Authenticated services — paid APIs and your own backends, where the key stays with the broker and never enters the Spark.

The safety model stays the same the whole way. Expanding what Sparks can do means adding entries to the broker's allowlist — never handing the sandbox a blank check.