Developer docs

Stocks endpoints

Bars, snapshots, reference data and corporate actions for US stocks and ETFs; Advanced adds trades, quotes, financials and short data.

Core endpoints

Available on both Starter and Advanced: aggregates, historical bars and reference data for US stocks and ETFs. Trades, quotes and financials are Advanced only — see Advanced-only endpoints below. Real-time streaming is covered in WebSocket streaming; options data needs an Options plan (see Options data). Indices, forex and futures are not available.

GET/v2/aggs/ticker/{ticker}/range/{multiplier}/{timespan}/{from}/{to}

Historical aggregate bars for any timespan and date range.

curl "https://marilux.dev/v2/aggs/ticker/AAPL/range/1/day/2024-01-01/2024-01-05?adjusted=true" \
  -H "Authorization: Bearer mh_live_your_key"
{
  "ticker": "AAPL",
  "adjusted": true,
  "queryCount": 4,
  "resultsCount": 4,
  "results": [
    { "t": 1704171600000, "o": 187.15, "h": 188.44, "l": 183.885, "c": 185.64, "v": 82488674, "vw": 185.9374, "n": 1008875 },
    ...
  ],
  "status": "OK",
  "count": 4
}

For daily bars, t is midnight US Eastern time of that trading day, in milliseconds.

Upstream parameter reference →

GET/v2/aggs/ticker/{ticker}/prev

The previous trading day's bar.

Upstream parameter reference →

GET/v2/aggs/grouped/locale/us/market/stocks/{date}

Daily bars for every US stock on one trading day — the usual starting point for backtests.

Upstream parameter reference →

GET/v1/open-close/{ticker}/{date}

Open, high, low and close for one ticker on one day.

Upstream parameter reference →

GET/v3/reference/tickers

Search stocks and ETFs, filtered by ticker, exchange or status.

{
  "results": [
    { "ticker": "AAPL", "name": "Apple Inc.", "market": "stocks", "locale": "us", "primary_exchange": "XNAS", "type": "CS", "active": true, "currency_name": "usd" }
  ],
  "status": "OK",
  "count": 1,
  "next_url": "https://marilux.dev/v3/reference/tickers?cursor=..."
}

next_url is rewritten to our domain, so you can follow it directly; it never exposes upstream hosts or credentials.

Upstream parameter reference →

GET/v3/reference/tickers/{ticker}

Company details: CIK, composite and share-class FIGI, market cap, SIC classification, list date and more. Branding images (logo_url / icon_url) are not downloadable yet; every other field works.

Upstream parameter reference →

GET/v3/reference/splits

Split history. Use it together with dividends when you adjust prices.

Upstream parameter reference →

GET/v3/reference/dividends

Dividend history.

Upstream parameter reference →

GET/stocks/v1/splits

Newer splits endpoint with adjustment_type (forward/reverse split) and historical_adjustment_factor, which you can multiply straight into historical prices. Parameters: ticker, execution_date (supports .gte/.lte); newest first with sort=execution_date.desc.

curl "https://marilux.dev/stocks/v1/splits?ticker=AAPL&sort=execution_date.desc&apiKey=mh_live_your_key"
GET/stocks/v1/dividends

Newer dividends endpoint with historical_adjustment_factor and split_adjusted_cash_amount. Parameters: ticker, ex_dividend_date (supports .gte/.lte); newest first with sort=ex_dividend_date.desc.

GET/v1/adj-factor/{ticker}

Daily adjustment factors (a Marilux extension) with splits and dividends already combined, one row per trading day. Parameters from and to (YYYY-MM-DD, default: the last year). close is the unadjusted close; back-adjusted price = close × qfq_factor (1 on the latest day), forward-adjusted price = close × hfq_factor (1 before the first corporate action, independent of the query range, so chunks can be stitched together). Both give identical returns. events lists splits and ex-dividend dates in the range. Note that adjusted=true on the bars endpoint only adjusts for splits, not dividends — use this endpoint for total-return calculations. Starter can query the last 5 years.

curl "https://marilux.dev/v1/adj-factor/AAPL?from=2020-08-27&to=2020-08-31&apiKey=mh_live_your_key"
{
  "status": "OK", "ticker": "AAPL", "from": "2020-08-27", "to": "2020-08-31", "count": 3,
  "results": [
    { "date": "2020-08-27", "close": 500.04, "qfq_factor": 0.2422845, "hfq_factor": 64.80446202 },
    { "date": "2020-08-28", "close": 499.23, "qfq_factor": 0.2422845, "hfq_factor": 64.80446202 },
    { "date": "2020-08-31", "close": 129.04, "qfq_factor": 0.969138, "hfq_factor": 259.2178481 }
  ],
  "events": [ { "date": "2020-08-31", "type": "split", "split_from": 1, "split_to": 4 } ]
}
GET/vX/reference/tickers/{id}/events

Ticker change history. {id} can be a ticker, CUSIP or composite FIGI — useful for mapping old symbols to today's company in backtests, e.g. FB → META.

GET/vX/reference/ipos

IPO calendar: upcoming, pending and completed listings with price range, final price, shares offered and listing date. Filter by ticker, ipo_status (pending, new, history, rumor, withdrawn…) and listing_date.gte / listing_date.lte. Updated daily.

Upstream parameter reference →

GET/v3/reference/exchanges

Exchanges and their details.

GET/v1/marketstatus/now

Whether the market is open right now.

GET/v1/marketstatus/upcoming

Upcoming market holidays.

GET/v2/snapshot/locale/us/markets/stocks/tickers

Snapshot of the whole market, or of the tickers you pass in tickers=. Starter snapshots are delayed like the rest of Starter data.

Upstream parameter reference →

GET/v2/snapshot/locale/us/markets/stocks/tickers/{ticker}

Snapshot of a single ticker.

GET/v2/snapshot/locale/us/markets/stocks/gainers

Today's top gainers (/losers for top losers).

Advanced-only endpoints

These endpoints need an Advanced key; Starter keys get a 404.

GET/v3/trades/{ticker}Advanced only

Tick-level trades for a ticker over a time range.

curl "https://marilux.dev/v3/trades/AAPL?limit=1&apiKey=mh_live_your_key"

Upstream parameter reference →

GET/v3/quotes/{ticker}Advanced only

Tick-level NBBO quotes for a ticker over a time range.

Upstream parameter reference →

GET/stocks/financials/v1/ratiosAdvanced only

Financial ratios (valuation, profitability, leverage). The same /stocks/financials/v1/ prefix also serves income-statements, balance-sheets and cash-flow-statements. Watch the parameter name: ratios takes ticker, while the three statements take tickers (with an s), plus optional fiscal_year, fiscal_quarter and timeframe. A misspelled parameter isn't an error — you'll get unfiltered, market-wide results.

curl "https://marilux.dev/stocks/financials/v1/ratios?ticker=AAPL&apiKey=mh_live_your_key"
curl "https://marilux.dev/stocks/financials/v1/income-statements?tickers=AAPL&fiscal_year=2024&apiKey=mh_live_your_key"

Upstream parameter reference →

GET/stocks/v1/short-interestAdvanced only

Short interest, settled twice a month: shares sold short, average daily volume and days to cover. Parameter ticker; newest first with sort=settlement_date.desc.

GET/stocks/v1/short-volumeAdvanced only

Daily short volume with short_volume_ratio and per-venue breakdown. Parameter ticker; newest first with sort=date.desc.

GET/stocks/vX/floatAdvanced only

Free float shares and percentage. Parameter ticker.