Alphanume

Insights

How to Get Point-in-Time Shares Outstanding and Market Cap via API

Alphanume Team · May 18, 2026

Pull lookahead-free market cap and shares outstanding from Alphanume to build clean size factors.

If you have ever seen a small-cap strategy backtest beautifully and then fall apart live, lookahead bias in the market cap filter is a common culprit. The Alphanume Historical Market Cap endpoint gives you the capitalization and share count as they were known on each date, which is what a faithful backtest requires.

The endpoint
GET https://api.alphanume.com/v1/historical-market-cap

Authenticate with ?api_key=alp_your_key or an X-API-Key header (the key is optional for a limited subset). Filter by ticker and date, or use the date range parameters. The dataset is cursor-paginated, returning has_more and next_cursor.

Get one ticker on one date
import requests

r = requests.get(
    "https://api.alphanume.com/v1/historical-market-cap",
    params={"ticker": "AAPL", "date": "2026-02-06", "api_key": "alp_your_key"},
)
row = r.json()["data"][0]
print(row["shares_outstanding"], row["market_cap"])
Build a point-in-time size factor

Pull a date range for your universe and you have a clean panel of market caps you can rank cross-sectionally on each date. Because shares_outstanding is also point-in-time, you can detect issuance and buyback shifts directly, rather than inferring them from price moves.

GET https://api.alphanume.com/v1/historical-market-cap?date_gte=2026-01-01&date_lte=2026-03-31&api_key=alp_your_key
Why it matters for backtests

Using today's share count to reconstruct past market caps overstates or understates size for any name that issued or bought back stock. Point-in-time data removes that distortion, so a capitalization threshold you apply in a backtest matches what you could have applied in real time.

Access and limits

Historical Market Cap is on the free tier as a rolling 30-day delayed window, Pro at 600 requests per minute. Dates use the YYYY-MM-DD format. Start with a free Alphanume API key and the API documentation, or explore it on Alphanume.

Building a clean size factor

A faithful size factor is just a cross-sectional rank of market cap on each date, but it is only faithful if the market caps themselves are point-in-time. Pull a date range for your universe, rank market_cap on each date, and you have a panel free of the lookahead that creeps in when today's share counts are projected backward.

The shares_outstanding field adds a second dimension: because it is also point-in-time, you can see issuance and buybacks as they happened rather than inferring them from price. The endpoint is cursor-paginated, so loop on next_cursor while has_more is true to assemble the full panel for a long backtest window.

Frequently asked questions

What is the market cap endpoint?

GET https://api.alphanume.com/v1/historical-market-cap. Authenticate with ?api_key=alp_your_key or an X-API-Key header; the key is optional for a limited subset.

How do I query one ticker on one date?

Pass ticker and date, then read shares_outstanding and market_cap from the returned row.

How do I build a size factor panel?

Pull a date range for your universe, then rank market_cap cross-sectionally on each date. Because shares_outstanding is point-in-time, issuance and buybacks show up directly.

Why does this matter for backtests?

A capitalization threshold applied with point-in-time data matches what you could have applied in real time, so small-cap and mid-cap filters behave the same live as in the test.

Is the endpoint paginated?

Yes, it is cursor-paginated, returning has_more and next_cursor so you can page through large date-range pulls.