Last active
June 14, 2016 06:47
-
-
Save konstantinfarrell/5855403cdf8e5e1e228404ea0164aa17 to your computer and use it in GitHub Desktop.
Query a stock symbol with the python requests library
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
API_URL="http://finance.yahoo.com/d/quotes.csv" | |
symbol="AMZN" | |
params="sopc" | |
querystring = API_URL + "?s=" + symbol + "&f=" + params | |
result = requests.get(querystring) | |
print(result.text) | |
# for more info on params | |
# https://ilmusaham.wordpress.com/tag/stock-yahoo-data/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment