letsplayants / Ants-Auto-Trading-Bot

6 stars 6 forks source link

간헐적으로 오류가 나오고 있습니다. #9

Closed kimgun9631 closed 5 years ago

kimgun9631 commented 5 years ago

이제 막 다운받아 설치하였습니다. 프로그램을 구동하고, 처음 이메일 얼러트를 받았는데 아래와 같은 오류가 나오고 있습니다. 확을을 부탁드립니다.

2019-01-21 19:11:16,331 - antsworker - INFO - doActoin :{'market': 'BTCKRW', 'time': '60M', 'action': 'SELL', 'exchange': 'BITHUMB'} KeyError {'status': '5300', 'message': "Bad Request.(Request Time:reqTime1548065530617/nowTime1548065552260)'"} Traceback (most recent call last): File "./ants/ants.py", line 21, in worker.start() File "C:\Users\k\Desktop\자동매매\Ants-Auto-Trading-Bot-dev\ants\antsworker.py", line 60, in start doAction(ret) File "C:\Users\k\Desktop\자동매매\Ants-Auto-Trading-Bot-dev\ants\antsworker.py", line 93, in doAction sell(coinName) File "C:\Users\k\Desktop\자동매매\Ants-Auto-Trading-Bot-dev\ants\antsworker.py", line 130, in sell orderCnt = balance[0] - balance[1] #코인 전량을 다 팔아버린다. TypeError: 'NoneType' object is not subscriptable

MuYoul commented 5 years ago

음.. 이상하네요? 이런 오류는 나면 안되는 오류인데.. 오류가 얼마나 자주나는 지 알 수 있을까요?

빗썸에서 잔고를 얻어와서 판매량을 결정하는 부분에서 잔고를 체크하는 부분이 서버측에서 리젝이 되는데 오류를 봤을 때 시스템이 너무 느려서 request time out이 발생하면서 서버측이 차단하는 것으로 예상됩니다. 또는 API Key를 발급 받을 때 권한을 주지 않아서 발생한 문제일 수있을 것 같습니다. 이 부분도 확인부탁드립니다.

  1. 구동 시스템 사양 및 환경 ex) 윈도우 7, i3 4세대, 8GB ram,
  2. 빗썸 권한 확인 2-1) 매매 권한 2-2) 잔고 조회 권한
  3. ants 설정 파일
    • api key와 sercurity key는 삭제하시고 올리셔야해요!
MuYoul commented 5 years ago

아.. 오류코드 5300이네요 빗썸 API key 설정을 잘못하신것이네요 :)

빗썸 API Key 설정을 어떻게 했는지 볼 수 있을까요?