Showing
13 changed files
with
93 additions
and
1 deletions
proj/data_collector.py
0 → 100644
proj/library/.idea/.gitignore
0 → 100644
proj/library/.idea/library.iml
0 → 100644
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<module type="PYTHON_MODULE" version="4"> | ||
3 | + <component name="NewModuleRootManager"> | ||
4 | + <content url="file://$MODULE_DIR$" /> | ||
5 | + <orderEntry type="inheritedJdk" /> | ||
6 | + <orderEntry type="sourceFolder" forTests="false" /> | ||
7 | + </component> | ||
8 | + <component name="TestRunnerService"> | ||
9 | + <option name="PROJECT_TEST_RUNNER" value="pytest" /> | ||
10 | + </component> | ||
11 | +</module> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
proj/library/.idea/misc.xml
0 → 100644
proj/library/.idea/modules.xml
0 → 100644
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<project version="4"> | ||
3 | + <component name="ProjectModuleManager"> | ||
4 | + <modules> | ||
5 | + <module fileurl="file://$PROJECT_DIR$/.idea/library.iml" filepath="$PROJECT_DIR$/.idea/library.iml" /> | ||
6 | + </modules> | ||
7 | + </component> | ||
8 | +</project> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
proj/library/.idea/vcs.xml
0 → 100644
No preview for this file type
No preview for this file type
proj/library/collector_api.py
0 → 100644
... | @@ -2,6 +2,12 @@ | ... | @@ -2,6 +2,12 @@ |
2 | db_id="user" | 2 | db_id="user" |
3 | db_pw="password" | 3 | db_pw="password" |
4 | db_port="3306" | 4 | db_port="3306" |
5 | +db_ip="localhost" | ||
5 | 6 | ||
6 | # 모의투자 계좌번호 | 7 | # 모의투자 계좌번호 |
7 | -account_no="8147766711" | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
8 | +test_account_no="8147766711" | ||
9 | + | ||
10 | +# 시뮬레이션을 돌리기 시작할 날짜 | ||
11 | +start_buying='20190101' | ||
12 | +simul_num1=1 | ||
13 | +simul_name1="AutoBot"+str(simul_num1)+"_Test" | ... | ... |
proj/library/error_code.py
0 → 100644
1 | +def errors(err_code): | ||
2 | + err_dict={0:('OP_ERR_NONE','정상처리'), | ||
3 | + -10:('OP_ERR_FAIL','실패'), | ||
4 | + -100:('OP_ERR_LOGIN','사용자정보교환실패'), | ||
5 | + -101:('OP_ERR_CONNECT','서버접속실패'), | ||
6 | + -102:('OP_ERR_VERSION','버전처리실패'), | ||
7 | + -103:('OP_ERR_FAIRWALL','개인방화벽실패'), | ||
8 | + -104:('OP_ERR_MEMORY','메모리보호실패'), | ||
9 | + -105:('OP_ERR_INPUT','함수입력값오류'), | ||
10 | + -106:('OP_ERR_SOCKET_CLOSED','통신연결종료'), | ||
11 | + -200:('OP_ERR_SISE_OVERFLOW','시세조회과부화'), | ||
12 | + -201:('OP_ERR_RQ_STRUCT_FAIL','전문작성초기화실패'), | ||
13 | + -202:('OP_ERR_RQ_STRING_FAIL','전문작성입력값오류'), | ||
14 | + -203:('OP_ERR_NO_DATA','데이터없음'), | ||
15 | + -204:('OP_ERR_OVER_MAX_DATA','조회가능한종목수초과'), | ||
16 | + -205:('OP_ERR_DATA_RCV_FAIL','데이터수신실패'), | ||
17 | + -206:('OP_ERR_OVER_MAX_FID','조회가능한FID수초과'), | ||
18 | + -207:('OP_ERR_REAL_CANCEL','실시간해제오류'), | ||
19 | + -300:('OP_ERR_ORD_WRONG_INPUT','입력값오류'), | ||
20 | + -301:('OP_ERR_ORD_WRONG_ACCNO','계좌비밀번호없음'), | ||
21 | + -302:('OP_ERR_OTHER_ACC_USE','타인계좌사용오류'), | ||
22 | + -303:('OP_ERR_MIS_2BILL_EXC','주문가격이20억원을초과'), | ||
23 | + -304:('OP_ERR_MIS_5BILL_EXC','주문가격이50억원을초과'), | ||
24 | + -305:('OP_ERR_MIS_1PER_EXC','주문수량이총발행주수의1 % 초과오류'), | ||
25 | + -306:('OP_ERR_MIS_3PER_EXC','주문수량이총발행주수의3 % 초과오류'), | ||
26 | + -307:('OP_ERR_SEND_FAIL','주문전송실패'), | ||
27 | + -308:('OP_ERR_ORD_OVERFLOW','주문전송과부화'), | ||
28 | + -309:('OP_ERR_MIS_300CNT_EXC','주문수량300계약초과'), | ||
29 | + -310:('OP_ERR_MIS_500CNT_EXC','주문수량500계약초과'), | ||
30 | + -340:('OP_ERR_ORD_WRONG_ACCINFO','계좌정보없음'), | ||
31 | + -500:('OP_ERR_ORD_SYMCODE_EMPTY','종목코드없음') | ||
32 | + } | ||
33 | + | ||
34 | + result=err_dict[err_code] | ||
35 | + return result | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
proj/library/open_api.py
0 → 100644
This diff is collapsed. Click to expand it.
-
Please register or login to post a comment