Stock Price API Finnhub

How to fetch current Stock Prices or the historical dividend of companies for free? Finnhub code examples in python.

Stock Price

Finnhub is a API where you can request for example stock prices:

With the quote command you get the open / high / low / current and previous close price.

Historical Dividend

Here it is possible to define a start and end date for a specified stock symbol.


You have to replace your own API token.

import requests
from pprint import pprint
import json

stockSymbol = "APC.F"
stockPriceRequest = requests.get('' % stockSymbol)
stockPriceJson = stockPriceRequest.json()


dividendRequest = requests.get('' % stockSymbol)
dividendJson = dividendRequest.json()


for i in dividendJson:


Stock Price API Finnhub

And yeah, Apple paid 3 dollars. 2014 was a 7 for 1 stock split as you can see on the Apple website:

Kommentar verfassen

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

Nach oben scrollen