0

I'm trying to display stock prices in an iOS client app, similar to the built-in Stocks app for iOS. So far I haven't encountered any API that allows you to easily access close to real-time stock price data. A 15 minute delay would be acceptable to me.

Several other SO posts either link to Yahoo Finance (does not allow 3rd party applications to scrape data), Google Finance (deprecated) or http://dev.markitondemand.com/MODApis/#termsofuse (not for commercial use).

Apollo
  • 8,874
  • 32
  • 104
  • 192
  • Yahoo's newest API is about 15min delayed. The feed will tell you exactly how delayed (in Epoch). Check out my answer over here: https://stackoverflow.com/a/40243903/933972 – dmayo Oct 25 '16 at 15:35
  • Try with IEX api, it's free, and it provides very complete data, a very simple implementation and a very neat documentation They have real-time for all US stocks, fundamental data, historical data and much more https://iextrading.com/developer/docs – Juan Pablo Pisano Feb 13 '19 at 00:02

1 Answers1

1

You are correct that Yahoo doesn't allow redistribution. Intrinio's API gives startups free data while they build, and has easy to use syntax for end of day as well as real time data. For example, if you want to pull the EOD price history for Apple, it would look like this:

curl "https://api.intrinio.com/prices?ticker=AAPL" -u "API_Password:API_Username"

That would give you the price history for Apple, including high, low, open, close, volume, and adjustments for splits/dividends, going back to the start of the company. You just change the ticker for other US securities. Alternatively, you can get the live price:

 curl "https://api.intrinio.com/data_point?ticker=AAPL&item=last_price" -u "API_Password:API_Username"

You can get more details in this article. If you want an easy, affordable API solution for stock prices that you can redistribute, this is a good way to go.