Developer docs

Index proxy series

Daily series built from the ETFs that track each index, in price and total-return form — for benchmarks, sector rotation and regime signals.

Available on Starter and Advanced. We don't serve index values themselves: S&P, Nasdaq and Russell index data needs a license from the index provider. Instead we offer index proxy series built from the ETF that tracks each index, e.g. SPY for SPX and QQQ for NDX. ETFs carry fees (0.03%–0.95% a year) and some tracking error, so levels differ slightly from the index, but daily moves line up very closely. Most quant work benchmarks against these ETFs anyway, because they trade, with real volume and spreads.

  • Updates: refreshed automatically after each trading day. The day's bar is available by 21:00 US Eastern. Only completed daily bars are served, no intraday values. updated_through in each response is the latest trading day included
  • History: from 2003-09-10, or from the ETF's launch if later; each proxy's start is in the list endpoint. Starter can query the last 5 years; earlier requests get 403
  • Ticker changes are stitched into one series, e.g. QQQ traded as QQQQ in 2004–2011 and SOXX as IGW before 2010
  • Billing: like any other endpoint, one call per request, and traffic by bytes returned

No code needed? Every index also has its own page with annual returns, a growth chart and a free daily CSV: see US stock market index historical data.

Endpoints

GET/v1/indices

The available proxies: symbol, name, category, ETF, first date and notes.

curl "https://marilux.dev/v1/indices?apiKey=mh_live_your_key"
{
  "status": "OK", "updated_through": "2026-11-20", "count": 41,
  "categories": [ { "id": "broad", "name": "Broad market" }, … ],
  "results": [
    { "symbol": "SPX", "name": "S&P 500", "category": "broad", "proxy": "SPY", "start": "2003-09-10", "note": null },
    { "symbol": "NDX", "name": "Nasdaq-100", "category": "broad", "proxy": "QQQ", "start": "2003-09-10",
      "note": "The ETF traded as QQQQ from 2004-12 to 2011-03; stitched automatically" },
    …
  ]
}
GET/v1/indices/{symbol}/bars

Daily bars for one proxy. {symbol} is a symbol from the list, case-insensitive; I:SPX works too. Parameters:

  • from, to: YYYY-MM-DD, default the last year. A to after updated_through is capped there
  • series: price (default) or total_return; see the next section

The whole history (about 5,800 rows) comes back in one response; there is no paging. Bar fields match the aggregates endpoint plus a US Eastern date: t is a millisecond timestamp at 00:00 US Eastern, o/h/l/c are open, high, low and close, v is volume in today's share count (split-adjusted), vw is the volume-weighted average price and n the number of trades.

curl "https://marilux.dev/v1/indices/SPX/bars?from=2024-12-18&to=2024-12-20&apiKey=mh_live_your_key"
{
  "status": "OK", "symbol": "SPX", "name": "S&P 500", "proxy": "SPY", "series": "price",
  "from": "2024-12-18", "to": "2024-12-20", "updated_through": "2026-11-20", "count": 3,
  "results": [
    { "date": "2024-12-18", "t": 1734498000000, "o": 603.98, "h": 606.405, "l": 585.89, "c": 586.28, "v": 108248729, "vw": 594.9972, "n": 772894 },
    { "date": "2024-12-19", "t": 1734584400000, "o": 591.36, "h": 593, "l": 585.85, "c": 586.1, "v": 85919452, "vw": 588.217, "n": 702101 },
    { "date": "2024-12-20", "t": 1734670800000, "o": 581.77, "h": 595.75, "l": 580.91, "c": 591.15, "v": 125716674, "vw": 589.0173, "n": 772177 }
  ]
}

Price vs total return

  • series=price: split-adjusted only, no dividends. The latest day equals the ETF's real close, the same as adjusted=true on the aggregates endpoint. This matches a "price index" (the S&P 500 level you see quoted). If the ETF splits later, all earlier prices are rescaled
  • series=total_return: splits plus dividends reinvested. It starts at the ETF's close on the first day and reinvests each dividend at the close before the ex-date. Past values never change, since later dividends and splits only affect later values, so you can append one row a day and stitch chunks together. The level isn't a tradable price; use it for returns

Use total return for benchmarks. The price series leaves out dividends and understates the benchmark by 1.3–1.5% a year (the S&P 500's yield), which makes a strategy look better than it is. Dividing the two series on the same day gives the cumulative dividend effect: on 2024-12-18 SPX total return was 867.72 against a price of 586.28, so reinvested dividends since 2003-09 added about 48%.

Available proxies

This table matches the /v1/indices list. Symbols follow common index codes so they're easy to map; the notes flag where a proxy needs care.

SymbolIndexETFNotes
Broad market
SPXS&P 500SPY
NDXNasdaq-100QQQThe ETF traded as QQQQ from 2004-12 to 2011-03; stitched automatically
DJIDow Jones Industrial AverageDIA
RUTRussell 2000IWM
RUIRussell 1000IWB
RUARussell 3000IWV
MIDS&P MidCap 400MDY
SMLS&P SmallCap 600IJR
SPXEWS&P 500 Equal WeightRSP
COMPNasdaq CompositeONEQONEQ samples the index and is small, so tracking error is larger than for the other broad-market proxies
CRSPTM1CRSP US Total MarketVTIVTI tracked the MSCI US Broad Market Index before 2013-06
S&P 500 sectors
S5INFTInformation TechnologyXLK
S5FINLFinancialsXLFIncluded real estate before 2016-09
S5HLTHHealth CareXLV
S5CONDConsumer DiscretionaryXLYSome internet companies moved to Communication Services in the 2018-09 GICS change
S5CONSConsumer StaplesXLP
S5INDUIndustrialsXLI
S5ENRSEnergyXLE
S5MATRMaterialsXLB
S5UTILUtilitiesXLU
S5RLSTReal EstateXLREThe ETF launched in 2015-10
S5TELSCommunication ServicesXLCThe ETF launched in 2018-06
Industries
SOXPHLX SemiconductorSOXXSOXX switched to the NYSE Semiconductor Index in 2021-06; it traded as IGW before 2010-10 (stitched automatically)
NBINasdaq BiotechnologyIBB
BKXKBW BankKBWBThe ETF launched in 2011-11
Style (growth / value)
RLGRussell 1000 GrowthIWF
RLVRussell 1000 ValueIWD
RUORussell 2000 GrowthIWO
RUJRussell 2000 ValueIWN
SGXS&P 500 GrowthIVW
SVXS&P 500 ValueIVE
Factors
MSCI-MOMMSCI USA MomentumMTUMThe ETF launched in 2013-04
MSCI-MINVOLMSCI USA Minimum VolatilityUSMVThe ETF launched in 2011-10
MSCI-QUALMSCI USA QualityQUALThe ETF launched in 2013-07
Bonds, dollar and commodities
UST1-3YUS Treasury 1–3 YearSHYBond prices, not yields
UST7-10YUS Treasury 7–10 YearIEFBond prices, not yields
UST20YUS Treasury 20+ YearTLTBond prices, not yields
DXYUS Dollar IndexUUPUUP holds dollar-index futures, so roll yield makes it drift from the spot index; launched 2007-02
GOLDGoldGLDTracks the LBMA gold price; launched 2004-11
WTIWTI crude oilUSOUSO holds oil futures; roll costs make it drift far from spot over long periods. Launched 2006-04
COMMODITYBroad commoditiesDBCDBC tracks the DBIQ diversified commodity futures index, not the Bloomberg Commodity Index; launched 2006-02

Python example: benchmark returns and beta

import requests, pandas as pd

BASE = "https://marilux.dev"
H = {"Authorization": "Bearer mh_live_your_key"}

def index_bars(symbol, start, end=None, series="total_return"):
    params = {"from": start, "series": series}
    if end:
        params["to"] = end
    r = requests.get(f"{BASE}/v1/indices/{symbol}/bars", headers=H, params=params, timeout=60)
    r.raise_for_status()
    df = pd.DataFrame(r.json()["results"])
    return df.set_index(pd.to_datetime(df["date"]))["c"]

spx = index_bars("SPX", "2015-01-01")
ndx = index_bars("NDX", "2015-01-01")
ret = pd.concat({"SPX": spx, "NDX": ndx}, axis=1).pct_change().dropna()

years = (ret.index[-1] - ret.index[0]).days / 365.25
cagr = (1 + ret).prod() ** (1 / years) - 1
beta = ret["NDX"].cov(ret["SPX"]) / ret["SPX"].var()
print(cagr.round(4), "NDX beta to SPX:", round(beta, 2))

Daily incremental updates: with total return, stored history never needs re-fetching. After 21:00 US Eastern, request from = your last stored day and append. With the price series, history is rescaled when the ETF splits, so compare your last stored close first and re-fetch the range if it no longer matches.

last = local.index[-1].strftime("%Y-%m-%d")          # local is the series you already stored
new = index_bars("SPX", last)
local = pd.concat([local, new[new.index > local.index[-1]]])

Using it in a live trading program

  • Daily bars suit backtests, signals computed after the close and orders placed at the next open
  • For intraday values, use the ETF's own data: snapshots, minute bars or Advanced WebSocket (T.SPY). The price series equals the real ETF price, so intraday data continues straight on from the daily bars
  • You trade the ETF (or futures and options) anyway, so using the ETF as the signal source means your signal and fill prices are the same instrument, with no index-to-ETF basis

Not available

  • VIX and other volatility indices: no ETF can stand in. VIXY and UVXY hold VIX futures and lose to roll costs, so they drift far from the VIX over time. For implied volatility, use implied_volatility from the options chain snapshot
  • Historical index constituents and weights: build your universe from grouped daily bars instead
  • Treasury yields (e.g. the 10-year TNX): the Treasury proxies are ETF prices, not yields
  • Real-time index levels: see above and use the ETF's real-time data
  • Intraday index proxies: only daily bars are offered. For every 1-minute bar of SPY and QQQ since 2003, adjusted for splits and dividends, get the SPY + QQQ bundle ($29, every bar size, CSV) or download any ETF on its own

Index names and symbols are trademarks of their providers (S&P Dow Jones Indices, Nasdaq, FTSE Russell, MSCI and others), which are not affiliated with Marilux. The proxy series are computed by Marilux from ETF trades, splits and dividends and are not official values published by the index providers.