Hi, I'm trying to pull some data with the following:
screener_tsvx = "SCREEN(U(IN(Equity(active,public,primary))/*UNV:Public*/), IN(TR.ExchangeMarketIdCode,""TSXV"",""XTNX"",""XTSE"",""XTSX""), TR.AvgDailyValTraded20D>=GMEDIAN(ZAV(TR.AvgDailyValTraded20D),universe=""univ""), CURN=CAD)" ek.get_data([screener_tsvx],["TR.CommonName"]) # ek.get_data([screener_tsx],["TR.CommonName;TR.InstrumentType;TR.CompanyMarketCap"])
It works in excel, but in my jupyter notebook I get the following HTTPError:
--------------------------------------------------------------------------- HTTPError Traceback (most recent call last) <ipython-input-100-fa4ae8947122> in <module>() 1 screener_tsvx = "SCREEN(U(IN(Equity(active,public,primary))/*UNV:Public*/), IN(TR.ExchangeMarketIdCode,""TSXV"",""XTNX"",""XTSE"",""XTSX""), TR.AvgDailyValTraded20D>=GMEDIAN(ZAV(TR.AvgDailyValTraded20D),universe=""univ""), CURN=CAD)" ----> 2 ek.get_data([screener_tsvx],["TR.CommonName"]) 3 # ek.get_data([screener_tsx],["TR.CommonName;TR.InstrumentType;TR.CompanyMarketCap"]) ~\Anaconda3\lib\site-packages\eikon\data_grid.py in get_data(instruments, fields, parameters, field_name, raw_output, debug) 149 payload = {'instruments': instruments,'fields': fields_for_request} 150 if parameters: payload.update({'parameters': parameters}) --> 151 result = eikon.json_requests.send_json_request(DataGrid_UDF_endpoint, payload, debug=debug) 152 153 if raw_output: ~\Anaconda3\lib\site-packages\eikon\json_requests.py in send_json_request(entity, payload, ID, debug) 85 if response.status_code == 200: 86 result = response.json() ---> 87 check_server_error(result) 88 return result 89 if response.status_code == 401: ~\Anaconda3\lib\site-packages\eikon\json_requests.py in check_server_error(server_response) 133 else: 134 status_code = server_response['ErrorCode'] --> 135 raise requests.HTTPError(error_message, response=server_response) 136 137 # check DataGrid error HTTPError: Backend error. 400 Bad Request
I've seen some suggestions of queries timing out, but I'm not sure if this is the case. I've also been unable to find a detailed documentation on how the `instruments` field for the get_data function can be specified. I've been trying to use the Screener function as a work around, and now I've run into the HTTP Backend error. Not entirely sure what my options are now. Any suggestions, advice would be nice.
Thank you!