Closed JKeerthi-21 closed 4 years ago
Can someone please help me with this...
@JKeerthi-21 you havent put anything in your dictionary..its empty..
it should look like this
if name == "main":
for _ in iter(range(N)):
quotes = json.loads(urllib.request.urlopen(QUERY.format(random.random())).read())
prices = {}
for quote in quotes:
stock, bid_price, ask_price, price = getDataPoint(quote)
prices[stock] = price
print ("Quoted %s at (bid:%s, ask:%s, price:%s)" % (stock, bid_price, ask_price, price))
print("Ratio %s" % getRatio(prices["ABC"], prices["DEF"]) )
Okay, thank you...