> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sajuapi.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# 일일 운세

> AI가 생성하는 일일 운세 조회

사주 정보를 기반으로 AI가 생성하는 일일 운세를 조회합니다.

## 요청

<ParamField body="birthDate" type="string" required>
  생년월일 (YYYY-MM-DD 형식)
</ParamField>

<ParamField body="birthTime" type="string">
  태어난 시간 (HH:mm 형식, 선택사항)
</ParamField>

<ParamField body="gender" type="string" default="male">
  성별 (`male` 또는 `female`)
</ParamField>

<ParamField body="model" type="string" default="haiku">
  AI 모델 선택 (`haiku`, `sonnet`, `gpt4o`, `gemini`)
</ParamField>

<ParamField body="date" type="string">
  운세 조회 날짜 (기본값: 오늘)
</ParamField>

<ParamField body="type" type="string">
  부분 조회 (`character`, `tendency`, `fortune`, `radar`)
</ParamField>

## 응답

```json theme={null}
{
  "success": true,
  "data": {
    "character": {
      "title": "물을 머금은 병화 태양",
      "dayMaster": "병화",
      "dayMasterHanja": "丙",
      "emoji": "☀️",
      "identity": "당신은 태양형이지만, 물이 받쳐주는 구조라 무작정 돌진하는 타입은 아닙니다.",
      "investmentIdentity": "혼자 빛나기보다, 시스템·조직 안에서 힘이 커지는 투자자입니다."
    },
    "investmentTendency": {
      "strengths": [
        { "element": "fire", "emoji": "🔥", "trait": "기회 포착, 리더십" },
        { "element": "water", "emoji": "🌊", "trait": "리스크 감지, 타이밍" }
      ],
      "weakness": {
        "element": "metal",
        "emoji": "❌",
        "trait": "손절·규칙 관리 약함"
      },
      "scores": {
        "riskTolerance": 75,
        "longTermAptitude": 85,
        "trendSensitivity": 45
      },
      "summary": "장기 성장주 선호, 변동성에 흔들리지 않는 타입",
      "warning": "단, 손절 타이밍을 놓치기 쉬움"
    },
    "todayFortune": {
      "date": "2026-01-20",
      "formattedDate": "2026년 1월 20일 (월)",
      "deficiency": {
        "element": "금(金)",
        "meaning": "규칙·정리·손절이 약한 구조"
      },
      "compensation": {
        "message": "오늘은 금 기운이 강한 날입니다.",
        "benefit": "결정을 정리하고, 정해둔 기준을 실행하기 좋은 날"
      },
      "actionItems": [
        { "type": "do", "text": "익절 기준을 먼저 정하고 진입" },
        { "type": "do", "text": "분할 진입 → 분할 청산" },
        { "type": "do", "text": "포트폴리오 점검" },
        { "type": "avoid", "text": "충동 매수" },
        { "type": "avoid", "text": "레버리지 거래" },
        { "type": "avoid", "text": "FOMO 매매" }
      ],
      "timing": {
        "best": "14:00-16:00",
        "avoid": "09:00-11:00",
        "reason": "오후에 금 기운이 안정되면서 판단력이 맑아져요"
      }
    },
    "investmentFortune": {
      "shortTerm": {
        "message": "지금처럼 단기 폭등 구간에서는 정면승부보다 2차 눌림에서 들어가는 게 맞는 사주입니다.",
        "warning": "지금 추격매수하면, 사주상 내일 판단이 흔들릴 확률이 높습니다."
      },
      "longTerm": {
        "message": "장기 포지션에서 리더 역할을 할 때 수익률이 누적됩니다.",
        "advice": "단기 변동성에 감정이 흔들리면 손해를 봅니다."
      }
    },
    "whyExplanation": "왜 오늘이 이런 운일까요? 당신의 사주에서 화(火)가 강한 편인데, 오늘의 금(金) 기운이 이를 적절히 제어해줘요."
  },
  "generatedAt": "2026-01-20T10:30:00.000Z",
  "meta": {
    "model": "haiku",
    "requestId": "req_abc123",
    "costPerCall": 0.013,
    "durationMs": 1847,
    "cache": {
      "hits": ["character", "tendency"],
      "misses": ["fortune"]
    }
  }
}
```

## 위젯 매핑

| 응답 필드                      | 위젯                    |
| -------------------------- | --------------------- |
| `character`                | AICharacterCard       |
| `investmentTendency`       | StatsCards            |
| `todayFortune.actionItems` | ActionItems           |
| `investmentFortune`        | InvestmentAdvice      |
| `whyExplanation`           | InvestmentAdvice (하단) |

## 부분 조회

`type` 파라미터로 특정 섹션만 조회할 수 있습니다:

```bash theme={null}
# 캐릭터만 조회 (캐시 가능)
POST /v1/fortunes/daily?type=character

# 투자 성향만 조회 (캐시 가능)
POST /v1/fortunes/daily?type=tendency

# 오늘 운세만 조회 (매일 갱신)
POST /v1/fortunes/daily?type=fortune
```

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.sajuapi.dev/v1/fortunes/daily \
    -H "X-API-Key: your-api-key" \
    -H "Content-Type: application/json" \
    -d '{
      "birthDate": "1994-12-30",
      "birthTime": "17:01",
      "gender": "male",
      "model": "haiku"
    }'
  ```
</RequestExample>
