/api/meta/coverage — 데이터 커버리지 요약 엔드포인트 #21

Closed
opened 2026-04-22 02:31:42 +09:00 by xhh · 0 comments
Owner

운영 대시보드(#22) 가 심볼별/테이블별 수집 상태를 한 번에 보여줄 수 있도록 구조화된 요약 API 제공.

응답 구조 (제안)

{
  "as_of": "2026-04-22T02:30:00Z",
  "tables": {
    "equity_prices": {
      "total_rows": 74415,
      "unique_symbols": 50,
      "symbols": [
        {"symbol": "SPY", "min_date": "2020-04-20", "max_date": "2026-04-17", "count": 1507}
      ]
    },
    "economic_indicators": { ... },
    "crypto_prices": { ... },
    "insider_trades": { ... },
    "margin_debt": { ... }
  },
  "gaps": {
    "defined_but_missing": ["RRPONTSYD"],
    "stale_over_7d": ["^W5000"]
  }
}

요구사항

  • 각 테이블별 total_rows, 심볼 목록, 각 심볼의 min/max date + count
  • indicators.yaml 에 정의됐으나 DB 에 한 번도 없는 심볼 별도 집계 (defined_but_missing)
  • 최근 N일 (기본 7) 이상 업데이트 없는 심볼 집계 (stale_over_Nd)
  • read 스코프
  • 응답 크기: 심볼 수 많으면 커질 수 있으므로 ?brief=true 옵션으로 심볼 상세 생략하여 테이블 요약만 반환

TDD

  • tests/api/test_coverage.py 필요 (#18 이후)
  • in-memory DB 에 소량 데이터 시드 후 응답 JSON 스키마 검증

의존

  • 없음 (#18 이후 테스트 동반 권고)
운영 대시보드(#22) 가 심볼별/테이블별 수집 상태를 한 번에 보여줄 수 있도록 구조화된 요약 API 제공. ## 응답 구조 (제안) ```json { "as_of": "2026-04-22T02:30:00Z", "tables": { "equity_prices": { "total_rows": 74415, "unique_symbols": 50, "symbols": [ {"symbol": "SPY", "min_date": "2020-04-20", "max_date": "2026-04-17", "count": 1507} ] }, "economic_indicators": { ... }, "crypto_prices": { ... }, "insider_trades": { ... }, "margin_debt": { ... } }, "gaps": { "defined_but_missing": ["RRPONTSYD"], "stale_over_7d": ["^W5000"] } } ``` ## 요구사항 - 각 테이블별 `total_rows`, 심볼 목록, 각 심볼의 min/max date + count - `indicators.yaml` 에 정의됐으나 DB 에 한 번도 없는 심볼 별도 집계 (`defined_but_missing`) - 최근 N일 (기본 7) 이상 업데이트 없는 심볼 집계 (`stale_over_Nd`) - read 스코프 - 응답 크기: 심볼 수 많으면 커질 수 있으므로 `?brief=true` 옵션으로 심볼 상세 생략하여 테이블 요약만 반환 ## TDD - `tests/api/test_coverage.py` 필요 (#18 이후) - in-memory DB 에 소량 데이터 시드 후 응답 JSON 스키마 검증 ## 의존 - 없음 (#18 이후 테스트 동반 권고)
xhh closed this issue 2026-04-22 02:55:41 +09:00
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
xhh/financial-data-platform#21
No description provided.