Take the 2-minute tour ×
Quantitative Finance Stack Exchange is a question and answer site for finance professionals and academics. It's 100% free, no registration required.

I'm wondering what API methods there are to determine a company's market cap, i.e. (number of shares issued) * (price per share).

I know IQfeed and perhaps Yahoo will do this - does anyone know of any other API's that will do the job?

share|improve this question
add comment

3 Answers

up vote 4 down vote accepted

See Yahoo Query Language (YQL) blog: Getting stock information with YQL and open data tables.

Go to the YQL console, and use the following query:

select MarketCapitalization from yahoo.finance.quotes where symbol in ("YHOO","AAPL")

Here is key part of the result:

<results>
    <quote>
        <MarketCapitalization>20.508B</MarketCapitalization>
    </quote>
    <quote>
        <MarketCapitalization>317.5B</MarketCapitalization>
    </quote>
</results>

Once you have the result in .xml, its easy to query it using LINQ in C#.

share|improve this answer
add comment

The Zacks API should have this data, see http://www.zacksdata.com/zacks-data-api

(Disclosure: The API is managed by my company)

share|improve this answer
add comment

I know you mentioned that you already know about Yahoo's ability to do this. However, I thought I'd add the following snippet on how to do this with Yahoo. It's a trivial HTTP Get, and is likely the quickest and easiest way to get the information you're after:

> curl "http://download.finance.yahoo.com/d/quotes.csv?s=CSCO&f=j1"
86.991B

That will return a single result with one entry, which is the market cap of the stock you supplied. You can also supply more than one stock:

> curl "http://download.finance.yahoo.com/d/quotes.csv?s=CSCO,AAPL&f=j1"
86.991B
355.9B
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.