I want to create list for symbols as below:
output = ['A','AA','AABA'...'ZYNE']
The current output is
[
{u'name': u'Agilent Technologies Inc.',
u'symbol': u'A',
u'iexId': u'2',
u'date': u'2018-02-12',
u'type': u'cs',
u'isEnabled': True},
{u'name': u'Alcoa Corporation',
u'symbol': u'AA',
u'iexId': u'12042',
u'date': u'2018-02-12',
u'type': u'cs',
u'isEnabled': True},
{u'name': u'Altaba Inc.',
u'symbol': u'AABA',
u'iexId': u'7653',
u'date': u'2018-02-12',
u'type': u'cs',
u'isEnabled': True},
I want to eliminate the unicode and just extract symbols out from the current list.
My code is as below
import urllib, json
url = "https://api.iextrading.com/1.0/ref-data/symbols"
response = urllib.urlopen(url)
data = json.loads(response.read())
I only manage to get one output as data[0]["symbol"]
which returns 'u'A'
but not in a complete list I want