Closed aosmsgs closed 4 years ago
@finnhubio can you have a look?
The issue should be fixed now. Can you plz try again ?
Has this error crept back up for anyone? since 08/04/2021 @finnhubio
_LookBack_Price = finnhub_client.stock_candles(_Ticker, 'D', _From - 86500,_From)
File "C:\Users\Aakas\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\finnhub\client.py", line 206, in stock_candles return self._get("/stock/candle", params=params) File "C:\Users\Aakas\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\finnhub\client.py", line 69, in _get return self._request("get", path, kwargs) File "C:\Users\Aakas\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\finnhub\client.py", line 38, in _request response = getattr(self._session, method)(uri, kwargs) File "C:\Users\Aakas\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\requests\sessions.py", line 543, in get return self.request('GET', url, kwargs) File "C:\Users\Aakas\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\requests\sessions.py", line 530, in request resp = self.send(prep, send_kwargs) File "C:\Users\Aakas\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\requests\sessions.py", line 643, in send r = adapter.send(request, **kwargs) File "C:\Users\Aakas\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\requests\adapters.py", line 529, in send raise ReadTimeout(e, request=request) requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='finnhub.io', port=443): Read timed out. (read timeout=10)
Running python 2.7.18 64 bit. installed finnhub-python 2.2.0 via pip copied and saved github finnhub-python getting started code example ran it. with my API-key Got:
{u'c': [80.834999084473, 81.279998779297, 80.580001831055, 82.875, 83.36499786377, 85.997497558594, 88.209999084473, 83.974998474121], u'h': [80.860000610352, 81.550003051758, 81.404998779297, 82.9375, 83.400001525879, 86.402496337891, 88.692497253418, 87.764999389648], u'l': [79.732498168945, 80.574996948242, 80.194999694824, 80.807502746582, 81.830001831055, 83.002502441406, 86.522499084473, 83.870002746582], u'o': [80.186248779297, 81.165000915527, 81.097503662109, 80.837501525879, 82.5625, 83.035003662109, 86.974998474121, 87.327499389648], u's': u'ok', u't': [1591056000, 1591142400, 1591228800, 1591315200, 1591574400, 1591660800, 1591747200, 1591833600], u'v': [87643000, 104491000, 87560000, 137250000, 95655000, 147712000, 166652000, 201662000]} c h l o s t v 0 80.834999 80.860001 79.732498 80.186249 ok 1591056000 87643000 1 81.279999 81.550003 80.574997 81.165001 ok 1591142400 104491000 2 80.580002 81.404999 80.195000 81.097504 ok 1591228800 87560000 3 82.875000 82.937500 80.807503 80.837502 ok 1591315200 137250000 4 83.364998 83.400002 81.830002 82.562500 ok 1591574400 95655000 5 85.997498 86.402496 83.002502 83.035004 ok 1591660800 147712000 6 88.209999 88.692497 86.522499 86.974998 ok 1591747200 166652000 7 83.974998 87.764999 83.870003 87.327499 ok 1591833600 201662000 Traceback (most recent call last): File "C:\Users\admin\Documents\fh-examle1.py", line 15, in
print(finnhub_client.aggregate_indicator('AAPL', 'D'))
File "C:\Python27\lib\site-packages\finnhub\client.py", line 89, in aggregate_indicator
"resolution": resolution,
File "C:\Python27\lib\site-packages\finnhub\client.py", line 67, in _get
return self._request("get", path, kwargs)
File "C:\Python27\lib\site-packages\finnhub\client.py", line 38, in _request
response = getattr(self._session, method)(uri, kwargs)
File "C:\Python27\lib\site-packages\requests\sessions.py", line 543, in get
return self.request('GET', url, kwargs)
File "C:\Python27\lib\site-packages\requests\sessions.py", line 530, in request
resp = self.send(prep, send_kwargs)
File "C:\Python27\lib\site-packages\requests\sessions.py", line 643, in send
r = adapter.send(request, **kwargs)
File "C:\Python27\lib\site-packages\requests\adapters.py", line 529, in send
raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='finnhub.io', port=443): Read timed out. (read timeout=10)
Advise?