Nasdaq 100 (NDX) Price Change API
You need to alert on the Nasdaq‑100’s day-over-day move and feed a dashboard sparkline without babysitting CSVs. By the end of this guide you’ll pull the latest NDX print, interpret its units, and wire up code to compute and cache price change—ready for charting and notifications.
What you’re building: reliable NDX price change from API calls
This walkthrough focuses on two tasks:
- Fetch the latest Nasdaq‑100 (NDX) quote and interpret the fields you’ll actually use.
- Compute price change using prior snapshots (or the Fluctuation endpoint) with production details about trading days, weekends, and caching.
If you’re not 100% sure which symbol you need, confirm it on the Indices-API Supported Symbols page. This article uses NDX specifically. For methodology and index composition context, see the Nasdaq-100 overview on Nasdaq.com.
The endpoints we’ll use
We’ll keep it to two endpoints so you can ship fast:
- Latest: get the current NDX value you’ll show to users.
- Time series or Fluctuation: obtain prior values to compute or retrieve absolute/percent change.
All endpoints are documented in the Indices-API Documentation. If you don’t have an API key yet, start a 7‑day trial (PRO $49.99/mo) here: Register.
Understand NDX quoting: base currency and units
Indices-API responses are expressed relative to a base currency, which defaults to USD in the examples below. For NDX you’ll encounter two useful keys in the latest rates map:
- rates.NDX: the amount of NDX per 1 USD (a very small number for a large index).
- rates.USDNDX: the amount of USD per 1 NDX (this is the index level you’ll display).
Practically, you’ll use rates.USDNDX as the current NDX level (USD per index). Keep the base, date, and timestamp for cache control and for joining with time-series rows.
Get the latest NDX reading
The latest endpoint returns a rates object keyed by symbols. You’ll filter for NDX-specific fields in your code.
cURL request
curl -s "https://indices-api.com/api/latest?access_key=YOUR_API_KEY"
Real JSON response
{"data":{"success":true,"timestamp":1793925660,"date":"2026-11-06","base":"USD","rates":{"NDX":3.7551901421753e-5,"USD":1,"USDNDX":26629.80999999967}}}
Fields you’ll actually use:
- data.success: boolean status for quick checks.
- data.timestamp: epoch seconds you can use for caching and scheduling refreshes.
- data.date: the UTC date for this snapshot (useful when comparing to previous closes).
- data.base: base currency; here it’s USD.
- data.rates.NDX: NDX per 1 USD (inverse of index level).
- data.rates.USDNDX: USD per 1 NDX (index level suitable for charts and alerts).
JavaScript example: parse and store the current level
async function fetchLatestNDX() {
const url = "https://indices-api.com/api/latest?access_key=YOUR_API_KEY";
const res = await fetch(url, { headers: { "Accept": "application/json" } });
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const { data } = await res.json();
if (!data?.success) throw new Error("API returned success=false");
const ts = data.timestamp; // epoch seconds, UTC
const asOfDate = data.date; // "YYYY-MM-DD"
const base = data.base; // "USD"
const levelUSD = data.rates.USDNDX; // USD per NDX (index level)
const ndxPerUsd = data.rates.NDX; // NDX per USD (inverse)
// Example: persist latest point for dashboards and downstream change calcs
return { ts, asOfDate, base, levelUSD, ndxPerUsd };
}
fetchLatestNDX().then(console.log).catch(console.error);
Update frequency note: depending on your plan, latest values may update every 60 minutes, every 10 minutes, or faster. Cache the response keyed by timestamp and avoid hammering the endpoint more frequently than your update SLA.
Compute NDX price change: two reliable approaches
You can either compute price change client-side with two snapshots or request it from the Fluctuation endpoint. Both approaches are valid; pick one based on your data freshness and UI needs.
Approach A — Compute using two latest snapshots
Keep a rolling store of the most recent two valid trading-day snapshots and compute:
- abs_change = latest_levelUSD − prior_levelUSD
- pct_change = abs_change / prior_levelUSD
Be careful with weekends and holidays: if today is not a U.S. trading day for the Nasdaq-100, the latest snapshot date can still be today, but the index level may match the last trading session’s close. Always compare against the last available trading day, not “calendar yesterday.”
Approach B — Request change with Fluctuation
When you want the API to compute the delta for a defined window (e.g., prior close to latest), the Fluctuation endpoint is designed for that. Supply a start_date and end_date for your window and read the change and change_pct fields for NDX. Note that the end_date cannot be today; use the most recent completed session in UTC to avoid partial-day ambiguity. For parameters and exact response shape, see the Documentation.
Backfilling: get prior sessions for your sparkline
For a sparkline or to compute rolling statistics, query a time window and read daily rates. You can use the Time-Series endpoint to get one row per day. Ensure your end_date is not today; use the latest completed date to avoid partial candles. If you need per-session OHLC, the OHLC endpoint provides open, high, low, close for a given date.
Tip: backfill first, then run a forward sync on a cron aligned with your plan’s update interval. Respect the timestamp and cache accordingly to reduce redundant work.
Putting it together: lightweight change pipeline
Here’s a minimal pipeline architecture that has shipped well for teams building dashboards and alerts:
- At 15:05 ET (after the U.S. cash close buffer), call Latest and store data.rates.USDNDX with data.date and data.timestamp.
- At the same time, call Time-Series (or Fluctuation) for the last two completed trading days to ensure you have a stable “prior close.”
- Compute abs and pct change relative to the prior close and cache the result under the latest timestamp.
- Expose a single cache key (e.g., ndx:latest) to your frontends; invalidate only when the API timestamp changes.
This keeps your app deterministic around market session boundaries and avoids double-counting intraday updates as “new closes.”
Production details that will save you time
- Base and units: base is USD; use rates.USDNDX as the display-level “USD per index.”
- Trading days vs weekends: U.S. equity indices don’t produce new closes on weekends/holidays; ensure comparisons use the last completed trading date.
- Update frequency: the latest endpoint refresh cadence depends on plan. Don’t poll faster than your plan interval; prefer timestamp-based cache invalidation.
- Caching: cache by data.timestamp; treat identical timestamp responses as the same logical snapshot.
- end_date cannot be today: when calling time-bound endpoints (e.g., time series or fluctuation), use the latest completed date, not the current calendar date.
- Symbol hygiene: use NDX for Nasdaq‑100. If in doubt, confirm on the Symbols page.
- Environment separation: store your access_key in env vars and never ship it to the client-side.
Why real-time NDX matters for smart markets and analytics
The Nasdaq-100 is a proxy for large-cap technology and innovation exposure, and its price dynamics often lead risk sentiment across global markets. Programmatic access lets you feed models that react to macro catalysts, quantify sector rotation, and benchmark portfolios without manual intervention.
Tying these insights into your stack—via streaming dashboards, IoT-enabled terminals, or research pipelines—hinges on consistent data semantics: a stable base currency, explicit timestamps, and reliable endpoint behavior. That’s why we always read base, timestamp, and USDNDX, then compute change off confirmed trading days.
For additional indices and cross-market analysis, browse the full catalog on indices-api.com and the endpoint details in the Documentation.
Add NDX change to your UI
Once you have latest_levelUSD and prior_levelUSD:
- abs_change = latest_levelUSD − prior_levelUSD
- pct_change = abs_change / prior_levelUSD
Display fmt examples:
- Price: format rates.USDNDX with no currency symbol (it’s an index level in USD).
- Change: prefix +/− and color by sign; compute from completed-session values to avoid flicker.
- Sparkline: query a rolling 30 sessions via Time-Series and plot rates.USDNDX by date.
If you prefer server-computed change for an exact window, use Fluctuation for NDX and read change and change_pct for your chosen start_date and end_date. Remember end_date should be the last completed date.
Security, pricing, and rollout
- Keep your access_key server-side. Have your backend call Indices-API and forward only the normalized fields your UI needs.
- Plan: PRO $49.99/mo; 7‑day trial available. Register here to get an API key: Register.
- If you need to integrate with a managed compute or control plane, explore MCP.
You can always start from the quickstart snippets and refine your scheduling and caching strategy as you observe your production latency and throughput. For broader coverage beyond NDX, see indices-api.com and verify symbols before expanding features.
FAQ
Q: Which field is the NDX level I should display?
A: Use data.rates.USDNDX (USD per 1 NDX). That’s the index level suitable for charts and UI. data.rates.NDX is the inverse (NDX per USD) and is mainly useful for conversions.
Q: How do I avoid showing incomplete intraday changes as “daily change”?
A: Compare latest to the prior completed session. Use Time-Series or Fluctuation with end_date set to the most recent completed date; don’t use today as end_date. Cache and label snapshots by data.date.
Q: What timezone are dates and timestamps in?
A: The date is in UTC (YYYY‑MM‑DD), and timestamp is epoch seconds (UTC). Align your scheduler to account for U.S. market close time and any post-close refresh buffer you adopt.
Q: Can I limit Latest to only NDX to reduce payload?
A: Use the fields you need from the returned rates map. For symbol filtering and advanced query parameters, refer to the Documentation.
Q: What happens on weekends and U.S. holidays?
A: You’ll typically see no new completed session. Reuse the last completed trading day for change calculations and schedule refreshes to reflect that behavior.
Get your key and ship your NDX price-change feature today. Start your 7‑day trial here: Register. Then use the Documentation and the Symbols reference to finalize parameters and expand beyond NDX as needed.