Skip to content

翻译进行中

在中文翻译完成之前,本页面会自动镜像英文原版。内容暂为英文,但导航和界面已完成翻译。

API keys

Every external service Atlas talks to needs a credential. This page is the concrete checklist — where to sign up, what tier to pick, and the env var to set. For the architectural side (which key gates which feature, how secrets stay server-side), see Data providers and Architecture.

TIP

Set every key as an environment variable on the backend host. Never commit a real key to the repo. Never paste a key into chat, comments, or AI prompts. If a key leaks, rotate it on the provider side immediately.

EODHD — the market-data backbone (required)

What it powers: the primary quote source for the entire app — real-time bulk quotes, end-of-day price history, fundamentals (P/E, EBITDA, ROIC, EPS, …), dividends, splits, FX rates, crypto, the company-events calendar (earnings/IPOs/splits/analyst-estimate trends), per-ticker news, analyst price targets, and most of the Security dashboard. Atlas runs fully on EODHD alone.

  1. Sign up at https://eodhistoricaldata.com.
  2. Pick a plan that includes fundamentals (the cheapest paid tier covers this; the free tier is intentionally limited).
  3. From the dashboard, copy the API token.
  4. Set on the backend:
    EODHD_API_KEY=<your_token>
    EODHD_BASE_URL=https://eodhd.com/api

Free-tier limits:

  • 20 calls/day, US-only, no fundamentals — useful only for evaluating Atlas itself.

When to upgrade: essentially always. The paid tier is what makes the Security dashboard and market panels usable.

Finnhub — optional supplemental quotes

What it powers: an optional supplement to EODHD — US-equity real-time quotes, instrument search, and richer analyst/dividend detail (e.g. high/low/median price targets and analyst counts, which EODHD returns only as a single mean). The app works fully without Finnhub; leave it unset and everything falls back to EODHD.

  1. Sign up at https://finnhub.io/register.
  2. After verifying email, the dashboard shows a free-tier API key.

Free-tier limits:

  • 60 calls/minute.
  • US equities sub-second; some other exchanges 15-min delayed (Atlas surfaces a delayed badge accordingly).

When to add it: if you want US-equity search, sub-second US quotes, or the richer analyst-detail fields on the Security dashboard.

OpenSky — ADS-B aircraft

What it powers: live aircraft positions on the globe.

  1. Register at https://opensky-network.org/login.
  2. Account creation is free.
  3. Set on the backend:
    OPENSKY_USERNAME=<your_username>
    OPENSKY_PASSWORD=<your_password>
  4. Or skip: OpenSky also accepts unauthenticated requests at lower rate limits. Atlas works without these vars but with reduced refresh frequency.

Tier notes:

  • Anonymous: ~10-second polling, capped daily quota.
  • Authenticated: faster polling and higher quota.
  • Coverage gaps over oceans and remote interiors are inherent to ADS-B itself, not OpenSky.

AISstream — AIS vessels

What it powers: live vessel positions on the globe. The AIS layer is off by default and only fetches when a key is configured.

  1. Register at https://aisstream.io.
  2. Generate an API key.
  3. Set AISSTREAM_API_KEY=<your_key> on the backend.

Legacy vars

MARINETRAFFIC_API_KEY and MARINETRAFFIC_ENABLED are legacy and unused — no current code reads them. The real vessel key is AISSTREAM_API_KEY.

If you don't set this:

  • The AIS layer on the globe is empty (default state).
  • Vessel-related How-do-I recipes (e.g., Track a vessel) won't return data.
  • Everything else (markets, news, ADS-B, AI chat) works normally.

Coverage notes: see Data delays & limits.

Cesium Ion — globe rendering

What it powers: the 3D globe itself — terrain, imagery, base tiles.

  1. Sign up at https://ion.cesium.com.
  2. Create a default access token. Restrict its scope to the asset IDs the globe needs — a token with full account access leaks if anyone exfiltrates the frontend bundle.
  3. Set both vars (the same token value in both):
    CESIUM_ION_TOKEN=<your_token>            # backend
    VITE_CESIUM_ION_TOKEN=<your_token>       # frontend (PUBLIC — bundled)
  4. Rebuild the frontend so the new VITE_* value is bundled in.

Critical: the VITE_CESIUM_ION_TOKEN ends up world-readable. Treat it as public. Use a token scoped only to the assets the globe needs; never a root-permission token.

Free-tier limits: generous for development; production Atlas instances should monitor Ion usage and scale the token as needed.

Stripe — billing

What it powers: subscription management, paid plan gating, invoice/payment-method UX (entirely on Stripe-hosted pages).

  1. Sign up at https://dashboard.stripe.com/register. Use Test mode for dev, Live mode for prod.
  2. From Developers → API keys, copy the secret key.
  3. Create one Price object per plan tier (free, pro, advisory) at Products. Note each Price ID.
  4. From Developers → Webhooks, add a webhook to https://<your-atlas>/webhooks/stripe listening for: checkout.session.completed, customer.subscription.updated, customer.subscription.deleted, invoice.payment_failed, invoice.payment_succeeded. Copy the signing secret.
  5. Set on the backend:
    STRIPE_SECRET_KEY=<sk_live_… or sk_test_…>
    STRIPE_WEBHOOK_SECRET=<whsec_…>
    STRIPE_PRICE_ID_FREE=<price_…>
    STRIPE_PRICE_ID_PRO=<price_…>
    STRIPE_PRICE_ID_ADVISORY=<price_…>

Skip if: you're running Atlas free of charge or self-hosting for a single team. Without these vars, all users default to free-tier feature flags. See Self-hosting.

AI — chat, news rewrite & analytics (optional)

What it powers: AI chat, AI news rewrite at ingest, and Pro AI news analytics. Atlas uses an OpenAI-compatible API — set AI_API_KEY or OPENAI_API_KEY (default model gpt-4o-mini) — or point at a local Ollama model instead.

No Anthropic

Anthropic/Claude is not integrated. ANTHROPIC_API_KEY is not read by any code — don't set it expecting AI features to work.

  1. Get an API key from your OpenAI-compatible provider.
  2. Set AI_API_KEY=<your_key> (or OPENAI_API_KEY=<your_key>) on the backend.

If you don't set this:

  • AI chat degrades to a scripted assistant (curated intents + canned replies) — no LLM.
  • AI news rewrite silently no-ops.
  • AI news analytics returns 503.

A monthly USD budget guard (default $50) caps AI spend regardless of provider.

Required vs optional summary

ProviderRequired?Without it…
EODHDYesMarket panels, quotes, fundamentals and Security dashboard empty — this is the data backbone
Cesium IonYesGlobe doesn't render
FinnhubOptionalUS-equity search and richer analyst detail unavailable; quotes fall back to EODHD
OpenSkyOptional (recommended)ADS-B layer empty (or anonymous mode at lower limits)
AISstreamOptionalAIS vessel layer empty (off by default)
AI (AI_API_KEY / OPENAI_API_KEY)OptionalAI chat degrades to a scripted assistant; news rewrite and news analytics disabled
StripeOptionalAll users on free tier

Rotation and revocation

  • On schedule: every 90 days for production-critical providers.
  • On suspected leak: immediately. Rotate on the provider, deploy the new value, restart the backend.
  • Atlas's _key() helper (in service modules) re-reads os.environ on every call — no app restart strictly required for backend-only keys, but a restart is the safe default.
  • Cesium Ion frontend token rotation requires a frontend rebuild + redeploy because the token is bundled.

Verifying

After setting keys, restart the backend and hit /health (see backend/routes/health.py) — the response includes per-provider readiness when configured.

For a live test:

  • EODHD: load any popular ticker (e.g., AAPL) in the Market panel and open the Security dashboard on the same ticker — quote and fundamentals should populate.
  • Finnhub (if set): US-equity instrument search and the richer analyst-detail fields should appear.
  • Cesium Ion: load / and confirm the globe renders terrain.
  • OpenSky / AISstream: enable the respective layer and confirm pins appear over a covered region.

Released under the project license. Public sources only — no proprietary or restricted data.