Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- GNU nano 2.9.3 space1.py
- import json
- import requests
- # Get the response from the API endpoint.
- response = requests.get('https://api.iextrading.com/1.0/stock/seed/batch?types=quote,news,chart&range=1m&last=20').json()['quote']['symbol']
- #response = requests.get("https://api.iextrading.com/1.0/stock/seed/batch?types=quote,news,chart&range=1m&last=20")
- data = response.json()
- #if (data["number"]) == 6:
- # print ("ok")
- (data["number"])
- print(data)
- I want to be able to parse through the data this code isn't working can anyone assist
- how can I get the data individual print (data["symbol"] returns no key
- so it's a key within the key I need to print I think
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement