feat: 자동매매 신뢰성 개선 — 시세 실서버 라우팅·일일 한도 전역화·수동 매수 API
- korea_investment_api: KIS_QUOTES_VIA_REAL — 모의투자 모드에서 시세/차트/호가 조회를 실계좌 시세 서버(20/s)로 위임, 주문·잔고는 모의서버 유지 (EGW00201 대응) - recommendations: execute_auto_trade_background asyncio.Lock 중복 실행 방지 + MAX_DAILY_TRADES를 당일 BUY 건수 차감 전역 기준으로 적용 (11종목 동시 매수 재발 방지) - manual_buy.py 신규: POST /api/v1/portfolio/buy (리스크 가드 + safe_place_order + db_worker) - mcp-server: claude_code_client(claude -p 헤드리스 모드) 추가, trade_monitor 부분매도 시 active 유지·remaining_pct 갱신, API 키 헤더·/api/v1 경로 수정, ODNO 주문ID 수정 - config: MCP_REQUEST_TIMEOUT, MCP_RISK_CACHE_TTL, BATCH_ANALYSIS_INTERVAL, SWING_INDEX_BREAKER_ENABLED(OFF), API_TRIGGERED_AUTO_TRADE(OFF) 추가 - docker-compose: 포트 충돌 해소 (postgres 15433, frontend 3001) - frontend: 추천 패널 매수 버튼, 차트/호가/저널 패널 개선 - CLAUDE.md 압축 최적화 (규칙 변경 없음), _sweep_single_axis.py 백테스트 단일축 스윕 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -62,16 +62,123 @@
|
||||
"Bash(echo \"$f OK\")",
|
||||
"Bash(done)",
|
||||
"Bash(find /Users/commylife/myproject/java/workspace/auto-stock -type f \\\\\\(-name *.tmp -o -name *.bak -o -name *.swap \\\\\\))",
|
||||
"Bash(source /Users/commylife/myproject/java/workspace/auto-stock/.venv/bin/activate)",
|
||||
"Bash(source /Users/commylife/myproject/java/workspace/auto-stock/.venv/bin/activate:*)",
|
||||
"Bash(/Users/commylife/myproject/java/workspace/auto-stock/.venv/bin/python:*)",
|
||||
"Bash(/Users/commylife/myproject/java/workspace/auto-stock/.venv/bin/python3:*)",
|
||||
"Bash(/Users/commylife/myproject/java/workspace/auto-stock/.venv/bin/pip:*)",
|
||||
"Bash(/Users/commylife/myproject/java/workspace/auto-stock/.venv/bin/pytest:*)",
|
||||
"Bash(.venv/bin/python:*)",
|
||||
"Bash(.venv/bin/python3:*)",
|
||||
"Bash(.venv/bin/pip:*)",
|
||||
"Bash(.venv/bin/pytest:*)",
|
||||
"Bash(ssh:*)",
|
||||
"Bash(find /Users/commylife/myproject/java/workspace/auto-stock/frontend/src -type f \\\\\\(-name *.tsx -o -name *.ts \\\\\\))",
|
||||
"Bash(git push:*)",
|
||||
"Bash(git fetch:*)",
|
||||
"Bash(sqlite3 /Users/commylife/myproject/java/workspace/auto-stock/data/trading_db.sqlite \"SELECT sql FROM sqlite_master WHERE type=''table'' AND name=''trade_history'';\")"
|
||||
"Bash(sqlite3 /Users/commylife/myproject/java/workspace/auto-stock/data/trading_db.sqlite \"SELECT sql FROM sqlite_master WHERE type=''table'' AND name=''trade_history'';\")",
|
||||
"Bash(git rev-list *)",
|
||||
"Bash(/usr/sbin/ab -n 100 -c 10 -k -s 20 \"https://dev-fo.wegolpg.com/login.do\")",
|
||||
"Bash(echo *)",
|
||||
"Bash(mkdir -p /tmp/scan)",
|
||||
"Bash(nohup nikto -h https://dev-fo.wegolpg.com -maxtime 300 -Tuning 123457890abc -o /tmp/scan/nikto.txt -Format txt)",
|
||||
"Bash(nmap -Pn -T4 --host-timeout 120s -p 80,443,8011,8080,8443,22,3306,5432,6379,5672 -sV dev-fo.wegolpg.com)",
|
||||
"Bash(sslscan --no-colour dev-fo.wegolpg.com)",
|
||||
"Bash(ab -n 10000 -c 50 -k -s 30 \"https://dev-fo.wegolpg.com/login.do\")",
|
||||
"Bash(ab -n 10000 -c 50 -s 30 \"https://dev-fo.wegolpg.com/login.do\")",
|
||||
"Bash(break)",
|
||||
"Bash(/usr/bin/curl -sS -c cookies.txt --max-time 15 \"https://dev-fo.wegolpg.com/login.do\")",
|
||||
"Bash(awk '{print $6, $7}')",
|
||||
"Bash(/usr/bin/curl -sS --max-time 15 \"https://dev-fo.wegolpg.com/resources/js/sas-981bf3b8ad0f002d8bb7b6c6ac55a5b2.js\")",
|
||||
"Bash(docker info *)",
|
||||
"Bash(.venv/bin/pip list *)",
|
||||
"Bash(open -a Docker)",
|
||||
"Bash(awk 'NR>=1')",
|
||||
"Bash(awk 'NR>=340 && NR<=430 { print NR\": \"$0 }' app/main.py)",
|
||||
"Bash(timeout 75 docker logs -f --since 1s autostock-backend)",
|
||||
"Bash(wait)",
|
||||
"Bash(xargs -I{} sh -c 'sed -n \"$\\(\\({}-20\\)\\),$\\(\\({}+5\\)\\)p\" app/services/trade_executor.py')",
|
||||
"Bash(ping -c 3 -b 192.168.50.255)",
|
||||
"Bash(ping -c 3 192.168.50.255)",
|
||||
"Bash(arp -an)",
|
||||
"Bash(sort -t. -k4 -n)",
|
||||
"Bash(command -v curl)",
|
||||
"Bash(command -v head)",
|
||||
"Bash(nmap -Pn -p- -T4 --max-retries 1 --host-timeout 300s 192.168.50.1)",
|
||||
"Bash(/usr/bin/head -20)",
|
||||
"Bash(/usr/bin/curl -sk -D - -o /tmp/b188.html --max-time 10 \"https://192.168.50.188:15023/\")",
|
||||
"Bash(/usr/bin/head -12)",
|
||||
"Bash(/usr/bin/head -c 600 /tmp/b188.html)",
|
||||
"Bash(/usr/bin/grep -ioE \"location\\\\.href[^;]*|block|denied|forbidden|not allow|WAN|Main_Login|cloud_sync\" /tmp/b188.html)",
|
||||
"Bash(/usr/bin/head -10)",
|
||||
"Bash(/usr/bin/curl -sk --max-time 10 \"https://192.168.50.188:15023/message.htm\" -o /tmp/msg188.html)",
|
||||
"Bash(/usr/bin/sed -e 's/<[^>]*>//g' /tmp/msg188.html)",
|
||||
"Bash(/usr/bin/grep -vE \"^\\\\s*$\")",
|
||||
"Bash(/usr/bin/grep -oE \"desc[^;]{0,200}|You have no .{0,120}|not authorized.{0,80}|LAN.{0,80}\" /tmp/msg188.html)",
|
||||
"Bash(/usr/bin/head -6)",
|
||||
"Bash(bash -n /private/tmp/claude-501/-Users-commylife-myproject-java-workspace-auto-stock/93c4883b-04d6-4a82-ab88-849275eb0a32/scratchpad/sniff-nas.sh)",
|
||||
"Bash(/usr/bin/head -4)",
|
||||
"Bash(/usr/bin/head -8 /tmp/nas-sniff.txt)",
|
||||
"Bash(/usr/bin/awk '{print $2}' /tmp/nas-sniff.txt)",
|
||||
"Bash(/usr/bin/head -25)",
|
||||
"Bash(networksetup -listallhardwareports)",
|
||||
"Bash(/usr/bin/grep -A1 \"Hardware Port\")",
|
||||
"Bash(/usr/bin/grep -vE \"^--\")",
|
||||
"Bash(/usr/bin/xargs echo \" 고유 MAC 수:\")",
|
||||
"Bash(/usr/bin/grep -v \"^192\\\\.168\\\\.50\\\\.\")",
|
||||
"Bash(/usr/bin/head)",
|
||||
"Bash(/usr/bin/head -5)",
|
||||
"Bash(/usr/bin/curl -sI --max-time 8 http://192.168.50.197:5000/)",
|
||||
"Bash(/usr/bin/grep -i \"^date:\")",
|
||||
"Bash(openssl s_client -connect 192.168.50.197:5001 -servername nas.shium.net)",
|
||||
"Bash(openssl s_client -connect 192.168.50.197:443 -servername nas.shium.net)",
|
||||
"Bash(openssl x509 *)",
|
||||
"Bash(/usr/bin/curl -skI --max-time 8 https://192.168.50.197/)",
|
||||
"Bash(/usr/bin/curl -sI --max-time 8 http://192.168.50.197/)",
|
||||
"Bash(openssl s_client -connect 192.168.50.197:6082 -servername nas.shium.net)",
|
||||
"Bash(/usr/bin/curl -o /dev/null -w \" 검증 결과: %{http_code}\\\\n\" --max-time 8 https://192.168.50.197:6082/)",
|
||||
"Bash(/usr/bin/head -3)",
|
||||
"Bash(openssl s_client -connect 192.168.50.197:6082)",
|
||||
"Bash(/usr/bin/curl -sk -o /dev/null -w \" https → HTTP %{http_code}\\\\n\" --max-time 8 https://192.168.50.197:6082/)",
|
||||
"Bash(/usr/bin/curl -s -o /dev/null -w \" http → HTTP %{http_code}\\\\n\" --max-time 8 http://192.168.50.197:6082/)",
|
||||
"Bash(openssl s_client -connect 192.168.50.198:443)",
|
||||
"Bash(traceroute -I -m 5 -w 2 -q 3 8.8.8.8)",
|
||||
"Bash(/usr/bin/head -8)",
|
||||
"Bash(traceroute -m 5 -w 2 -q 3 1.1.1.1)",
|
||||
"Bash(/usr/bin/curl -s --max-time 8 https://api.ipify.org)",
|
||||
"Bash(/usr/bin/curl -s --max-time 8 http://192.168.75.1/dzs/login.asp)",
|
||||
"Read(//tmp/**)",
|
||||
"Bash(/usr/bin/grep -ioE \"model[^<>\\\\\"]{0,40}|DASAN[^<>\\\\\"]{0,30}|SK[ _-]?\\(broadband|telecom\\)[^<>\\\\\"]{0,20}|H[0-9]{3}[A-Z]?|GW-[A-Z0-9-]+|<title>[^<]*</title>\" /tmp/dzs.html)",
|
||||
"Bash(/usr/bin/head -15)",
|
||||
"Bash(/usr/bin/sed -e 's/<[^>]*>/ /g' /tmp/dzs.html)",
|
||||
"Bash(/usr/bin/tr -s ' \\\\n' ' \\\\n')",
|
||||
"Bash(/usr/bin/curl -s --max-time 8 http://192.168.50.1:55522/rootDesc.xml)",
|
||||
"Bash(/usr/bin/grep -oE \"<\\(UDN|serialNumber|modelName|friendlyName\\)>[^<]*</[a-zA-Z]+>\" /tmp/root.xml)",
|
||||
"Bash(/usr/bin/grep -oiE \"\\([0-9a-f]{2}[:-]\\){5}[0-9a-f]{2}|[0-9a-f]{12}\" /tmp/root.xml)",
|
||||
"Bash(/usr/bin/grep \"192.168.50.1\\)\")",
|
||||
"Bash(dig +short A nas.shium.net @1.1.1.1)",
|
||||
"Bash(/usr/bin/tail -1)",
|
||||
"Bash(/usr/bin/grep -nE \"^ [a-z0-9_-]+:\" docker-compose.yml)",
|
||||
"Bash(/usr/bin/grep -nE \"^#{1,3} \" deploy/NAS-SETUP-GUIDE.md)",
|
||||
"Bash(/usr/bin/head -30)",
|
||||
"Bash(/usr/bin/grep -nE \"stage\\\\\\(|DEPLOY_DIR|sh '|sh \\\\\"\" Jenkinsfile)"
|
||||
]
|
||||
},
|
||||
"enableAllProjectMcpServers": true,
|
||||
"enabledMcpjsonServers": [
|
||||
"auto-stock"
|
||||
]
|
||||
],
|
||||
"hooks": {
|
||||
"UserPromptSubmit": [
|
||||
{
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "python3 \"$CLAUDE_PROJECT_DIR/.claude/hooks/auto-orchestrate.py\"",
|
||||
"timeout": 10,
|
||||
"statusMessage": "오케스트레이션 모드 판정 중..."
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user