/api/trade/auto 요청 오류 스펙에 맞게 수정

This commit is contained in:
2026-01-27 03:06:59 +09:00
parent e27fbfada1
commit a330a5271c

View File

@@ -124,7 +124,8 @@ def auto_trade():
"""AI 자동 매매 트리거 (Windows AI Server Proxy)"""
print(f"[Proxy] Triggering Auto Trade at {WINDOWS_AI_SERVER_URL}...")
try:
resp = requests.post(f"{WINDOWS_AI_SERVER_URL}/trade/auto", timeout=120)
# 빈 JSON Body를 명시적으로 전송하여 422 에러 방지
resp = requests.post(f"{WINDOWS_AI_SERVER_URL}/trade/auto", json={}, timeout=120)
if resp.status_code != 200:
print(f"[ProxyError] Auto Trade Error: {resp.status_code} {resp.text}")
@@ -144,7 +145,8 @@ def analyze_market():
"""Windows PC를 통한 AI 시장 분석"""
print(f"[Proxy] Analyzing Market at {WINDOWS_AI_SERVER_URL}...")
try:
resp = requests.post(f"{WINDOWS_AI_SERVER_URL}/analyze/portfolio", timeout=120)
# 빈 JSON Body 전송
resp = requests.post(f"{WINDOWS_AI_SERVER_URL}/analyze/portfolio", json={}, timeout=120)
if resp.status_code != 200:
print(f"[ProxyError] Analyze Error: {resp.status_code} {resp.text}")