You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Перестал работать метод apimoex.get_board_candles
При вызове
data = apimoex.get_board_candles(session, 'SNGSP', 1, '2022-04-28') # Statistics by intervals 1 minute
TimeoutError: [Errno 110] Connection timed out
During handling of the above exception, another exception occurred:
NewConnectionError Traceback (most recent call last)
NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7fabb815de90>: Failed to establish a new connection: [Errno 110] Connection timed out
During handling of the above exception, another exception occurred:
MaxRetryError Traceback (most recent call last)
MaxRetryError: HTTPSConnectionPool(host='iss.moex.com', port=443): Max retries exceeded with url: /iss/engines/stock/markets/shares/boards/TQBR/securities/SNGSP/candles.json?iss.json=extended&iss.meta=off&interval=1&from=2022-04-28&iss.only=candles%2Chistory.cursor&candles.columns=begin%2Copen%2Cclose%2Chigh%2Clow%2Cvalue (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fabb815de90>: Failed to establish a new connection: [Errno 110] Connection timed out'))
The text was updated successfully, but these errors were encountered:
import requests
import apimoex
import pandas as pd
with requests.Session() as session:
data = apimoex.get_board_candles(session, 'SNGSP', 1, '2022-04-28')
df = pd.DataFrame(data)
print(df.head(), '\n')
print(df.tail(), '\n')
У меня такой код отработал без проблем. Судя по всему у вас какая-то проблема с интернетом или с вашим конкретным IP.
MOEX в последнее время часто подвергается атакам и блокирует доступ ко многим IP. Тут кроме рекомендации подождать в надежде, что все наладится, или запустить код на компьютере с другим IP помочь сложно.
На collab недавно жаловались - судя по всему он глухо заблокирован. Так как много кто там крутит ноутбуки и часто скачивает большие объемы, а так как исходящих IP не так много, то это в целом все напоминает DDoS атаки.
Перестал работать метод apimoex.get_board_candles
При вызове
data = apimoex.get_board_candles(session, 'SNGSP', 1, '2022-04-28') # Statistics by intervals 1 minute
TimeoutError: [Errno 110] Connection timed out
During handling of the above exception, another exception occurred:
NewConnectionError Traceback (most recent call last)
NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7fabb815de90>: Failed to establish a new connection: [Errno 110] Connection timed out
During handling of the above exception, another exception occurred:
MaxRetryError Traceback (most recent call last)
MaxRetryError: HTTPSConnectionPool(host='iss.moex.com', port=443): Max retries exceeded with url: /iss/engines/stock/markets/shares/boards/TQBR/securities/SNGSP/candles.json?iss.json=extended&iss.meta=off&interval=1&from=2022-04-28&iss.only=candles%2Chistory.cursor&candles.columns=begin%2Copen%2Cclose%2Chigh%2Clow%2Cvalue (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fabb815de90>: Failed to establish a new connection: [Errno 110] Connection timed out'))
The text was updated successfully, but these errors were encountered: