This document defines the dashboard-facing API contract for the Research-Only GUI.
- Header:
x-api-token: <API_TOKEN>(레거시DEEPSTOCK_API_TOKEN도 호환) - Protected endpoints: all
/api/agent/*
- Success:
{
"ok": true,
"data": {}
}- Error:
{
"ok": false,
"error": "human_readable_message",
"code": "unauthorized | invalid_request | missing_env | forbidden_env | db_error | quote_unavailable | symbol_not_found | unknown_error"
}- Auth: none
- Response:
{
"status": "ok",
"time": "2026-02-11T09:18:34.000Z"
}- Auth: required
- Request body (optional):
{
"marketScope": "US | KR | ALL",
"strategyKey": "us_default | kr_default | all_default"
}- Response:
{
"ok": true,
"data": {
"runId": "sha256...",
"marketScope": "US",
"strategyKey": "us_default",
"status": "success | partial | failed",
"errorSummary": null,
"rawCount": 40,
"scoredCount": 20,
"decidedCount": 10,
"reportId": "2"
}
}- Auth: required
- Response: cockpit aggregate payload (
kpi에usDecisions,krDecisions포함)
- Auth: required
- Response:
{
"ok": true,
"data": {
"items": [],
"meta": {
"total": 10,
"limit": 50,
"offset": 0,
"count": 10
}
}
}- Auth: required
- Response:
items + meta(total, limit, offset, count)
- Auth: required
- Response:
items + meta(total, limit, offset, count)
- Auth: required
- Response:
items + meta(total, limit, offset, count)
- Auth: required
- Response:
items + meta(total, limit, offset, count)
- Auth: required
- Purpose: KR 종목코드 -> 한글 종목명 매핑
- Response:
{
"ok": true,
"data": {
"names": {
"005930": "삼성전자",
"000660": "SK하이닉스"
}
}
}- Auth: required
- Purpose: KR/US 심볼 자동완성
- Cache: 5분
- Response:
{
"ok": true,
"data": {
"items": [
{
"symbol": "005930",
"name": "삼성전자",
"display": "005930 삼성전자",
"marketScope": "KR"
}
]
}
}- Auth: required
- Purpose: 엔트리 트리거 도달률 계산용 현재가 조회
- Source:
- KR:
polling.finance.naver.com(지연 시세) - US:
stooq.com(지연 시세)
- KR:
- Cache: 45초
- Response:
{
"ok": true,
"data": {
"items": [
{
"symbol": "005930",
"marketScope": "KR",
"price": 167800,
"currency": "KRW",
"asOf": "2026-02-11T20:00:00.000000+09:00",
"source": "naver"
},
{
"symbol": "AAPL",
"marketScope": "US",
"price": 273.68,
"currency": "USD",
"asOf": "2026-02-10T22:00:18Z",
"source": "stooq"
}
],
"unavailable": []
}
}