My Problem is regarding Algorythmic trading. I hope this is the right site for this kind of Question. In specific I try to connect to the "iex" API via the pandas Data reader to retrieve some historical stock data. After searching around and trying several methods I came up with this code here:

from datetime import datetime
import pandas as pd
pd.core.common.is_list_like = pd.api.types.is_list_like
import pandas_datareader as pdr
import os

#How to get historical Stock data

symbols = "FB" #Stock Kürzel
start = datetime(2018, 9, 1)
end = datetime(2018, 10, 2)

DataframeStock = pdr.DataReader(symbols, data_source = "iex", start = start, end = end, api_key = "pk_1234")


As far as I can tell everything looks fine and like in the tutorials (for example here: https://pandas-datareader.readthedocs.io/en/latest/remote_data.html#remote-data-iex) (I registered on https://iexcloud.io/docs/api/ and Iam using my own public key). Unfortunately I get this error message:

SSLError: HTTPSConnectionPool(host='cloud.iexapis.com', port=443): Max retries exceeded with url: /stable/stock/market/batch?symbols=FB&types=chart&range=2y&token=pk_8dfc5c0ae37940e78a2a0037bed89d5b (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])")))

It sound like I tried to often, but there shouldnt be to much of a restriction and overall I tried it less then 50 times and today stopped at 2 tries.

Thanks alot in advance.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.