algorithmic-trading-python
algorithmic-trading-python copied to clipboard
requests.get(api_url) ISSUE
Hi Nick,
I was trying to follow your code under 'Algorithmic Trading Using Python - Full Course'.
However, I came across an error when I was trying to request data from api_url as per the attached screenshot.
Could you pleaes let me know why this happened?

Regards,
Scott
@yylscott usually you want to post the actual text of the error in the issue report. Here is a question while you do that. What happens when you google that "ConnectionError" string?
Also note you use anaconda and I don't think that is mentioned in the code as well as you are getting an SSL error so are you behind a firewall of some kind ?
@yylscott That error is raised because of unnecessary spaces in your url string
api_url = f'https://sandbox.iexapis.com [HERE] /stable/stock/{symbol}/quote/?token [HERE] = [HERE] {IEX_CLOUD_API_TOKEN}'
remove those spaces, and it would work.
api_url = f'https://sandbox.iexapis.com/stable/stock/{symbol}/quote/?token={IEX_CLOUD_API_TOKEN}'