Skip to content

Instantly share code, notes, and snippets.

@alexanu
Created February 2, 2020 15:58
Show Gist options
  • Save alexanu/23ec64ffac43e612afbd4b1f5c06e816 to your computer and use it in GitHub Desktop.
Save alexanu/23ec64ffac43e612afbd4b1f5c06e816 to your computer and use it in GitHub Desktop.
Finnhub stock market api example
import requests
#OHLC data
r = requests.get('https://finnhub.io/api/v1/stock/candle?symbol=AAPL&resolution=1&from=1572651390&to=1572910590')
print(r.json())
#Tick data
r = requests.get('https://finnhub.io/api/v1/stock/tick?symbol=AAPL&from=1575968404&to=1575968424')
print(r.json())
# Quote data
r = requests.get('https://finnhub.io/api/v1/quote?symbol=AAPL')
print(r.json())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment