0
집중하다
0
수행원

로봇 자동 시작 및 정지 문제

만든 날짜: 2020-10-30 15:12:13, 업데이트 날짜:
comments   4
hits   1153

저는 국내의 미래에셋자산의 자동시동을 제어하는 데 사용되고 있으며, 하루 동안 정상적으로 작동할 수 있지만, 가끔 다음과 같은 문제가 발생합니다.

Traceback (most recent call last): File “”, line 982, in init_ctx File “”, line 119, in File “”, line 65, in main File “”, line 27, in api URLError:

부분 코드는 다음과 같다: if currentime (() >0.2100 and currentime (() <0.2359 and currentwday (()!=6 and currentwday (()!=0 and status==False:# 주말이 아닌 매일 8시 55분부터 3시 01분까지 로봇을 켜 status=True LogStatus(“0.2100–0.2359,Restart”) robotftrade=api(‘RestartRobot’,RobotFTrade) 로그 ((robotftrade 실행 시작,api==“,robotftrade) swtradetrade=api(‘RestartRobot’,swTrade) Log ((“swtradetrade 실행 시작,api==”,swtradetrade) Sleep(10000) if currentime() <0.0855 or currentwday() == 6 or currentwday==) == 0 and status==True: # 8시 55분 미만 또는 토요일 또는 일요일 로봇을 중지 status=False LogStatus(“0.0000–0.900 or weekend,StopRobot”) robotftrade=api(‘StopRobot’,RobotFTrade) 로그 ((robotftrade 실행 중지,api==“,robotftrade) swtradetrade=api(‘StopRobot’,swTrade) Log ((“swtradetrade 실행 중지,api==”,swtradetrade) Sleep(10000)