nickmccullum / algorithmic-trading-python

The repository for freeCodeCamp's YouTube course, Algorithmic Trading in Python
2.35k stars 2.37k forks source link

Need Help with 003_quantitative_value_strategy #50

Open jeeventh opened 1 year ago

jeeventh commented 1 year ago

`symbol = 'AAPL' batch_api_call_url = f'https://cloud.iexapis.com/stable/stock/market/batch/?symbols={symbol}&types=quote,advanced-stats&token={IEX_CLOUD_API_TOKEN}' data = requests.get(batch_api_call_url).json()

print (data)

P/E Ratio

pe_ratio = data[symbol]['quote']['peRatio']`

I get the following error: JSONDecodeError: Expecting value: line 1 column 1 (char 0)

I'm using the 30 trial from IEX Cloud.