The part worth understanding is which share count goes into the number, because the Massive ticker details endpoint returns two of them and they mean different things. Market cap uses weighted_shares_outstanding, not share_class_shares_outstanding, and for a company with more than one share class those are not close to each other. Everything else is one multiplication you can check yourself.
Applies to
- Plans: reference data is included with every plan, including the free Basic tier.
- Endpoints: /v3/reference/tickers/{ticker} for market cap and both share counts.
- Asset classes: US stocks and ETFs.
How to check it
curl -X GET "https://api.massive.com/v3/reference/tickers/AAPL?apiKey=YOUR_API_KEY"
Response
{
"results": {
"ticker": "AAPL",
"name": "Apple Inc.",
"market_cap": 4602128721200,
"weighted_shares_outstanding": 14594180000,
"share_class_shares_outstanding": 14594180000,
"type": "CS"
},
"status": "OK"
}
For a company with one share class the two counts are the same, which is why the distinction only shows up on the companies where it matters.
The two share counts
The two share counts answer different questions, and using the wrong one is the usual cause of a market cap that looks wrong:
| Field | What it counts |
|---|---|
| weighted_shares_outstanding | The company's whole equity, expressed in the units of this share class |
| share_class_shares_outstanding | Only the shares in this class |
Berkshire Hathaway shows this exactly. BRK.A reports 1,427,140 weighted shares and BRK.B reports 2,140,709,794. The ratio between them is 1,500, which is the A-to-B conversion ratio, because both numbers describe the same company measured in different units. Their implied prices, 759,141 and 506.72, stand in the same ratio.
Alphabet shows the other half. GOOGL and GOOG both report 12,229,934,831 weighted shares, while their share-class counts are 5,868,000,000 and 5,527,000,000. Their market caps differ slightly, 4,043,827,951,870 and 4,016,065,999,803, because each is priced with its own class's price for the same underlying company.
Why the weighted count rather than the class count
The weighted count is used because market cap is meant to value the company, not one class of its shares. Multiplying a class's own share count by that class's price would value only part of the company, and adding those partial figures across classes double counts nothing but misses any class you did not fetch. Expressing the whole equity in each class's units means one multiplication answers the question from whichever ticker you happen to be holding.
The consequence to design for: a multi-class company appears more than once in your data with a slightly different market cap each time. Pick one class as canonical rather than summing them.
If you see an error
A market cap that differs from another vendor's is usually a different share count or a different price timestamp. Divide their figure by ours to see whether it is a share-count question or a price one.
A market cap that looks like it values one class only means you multiplied share_class_shares_outstanding by the price. Use the weighted field.
A null market_cap happens on tickers where we have no current share count, such as some ETFs and newly listed companies. The concept does not apply to a fund in the same way.

