Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 17 lines (14 sloc) 553 Bytes
"""Stock Data provided for free by IEX. View IEX's Terms of Use:"""
import requests
import json
from sys import argv
def getquote(ticker):
ticker = ticker.upper()
response = requests.get('' + ticker + '&types=quote&range=1m')
return response.json()[ticker]["quote"]["latestPrice"]
def main():
print getquote(str(argv[1]))
if __name__ == "__main__":
""" This is executed when run from the command line """
You can’t perform that action at this time.