Free stock api with Finnhub.io - Alternative for Yahoo finance

free realtime api for stock

Finance data is 1 of the most important thing you need for research, backtest your strategy or create a hobby website. However finding a free and reliable data provider is almost impossible after both yahoo finance and google finance have shut down in the past years. Here at Columbia, I and many students, faculty in quant field have found and been using Finnhub for a few months. That's why I want to write this blog to introduce this invaluable resource for everyone who need a FREE and reliable realtime stock api.

US equity and International stock API

Finnhub, as an alternative for yahoo finance, provides realtime equity price for US stocks and 60+ international stock exchanges. The data goes back for years even on 1 minute bar. We have backtested the data against multiple source and find it extremely high quality and reliable (always in 0.5% range with best bid/ask in the market)

Check out these examples (You can click on them to see the result):

Get 500 Daily candles for AAPL

https://finnhub.io/api/v1/stock/candle?symbol=AAPL&resolution=D&count=500

Get 2000 candles on 1 minute timeframe

https://finnhub.io/api/v1/stock/candle?symbol=AAPL&resolution=1&count=2000

Company News

Want to get news specific to a company ? Finnhub has already done the heave lyfting for you.

With a simple call to https://finnhub.io/api/v1/news/AAPL . You will get the latest news for AAPL.

On top of that, you can retrieve News sentiment and news statistics for each company by accessing this endpoint https://finnhub.io/api/v1/news-sentiment?symbol=AAPL

Analyst's target and recommendation

Want to automate your strategy with analyst' recommendation trend and price target ? Finnhub has sourced that information for you.

Price target endpoint for Netflix

https://finnhub.io/api/v1/stock/price-target?symbol=NFLX

Recommendation trend endpoint

https://finnhub.io/api/v1/stock/recommendation?symbol=MSFT

You can check out the link to API Documentation for Stock API.

Finnhub is featured as the best stock API on Medium best stock market API guide