{
 "openapi": "3.1.0",
 "info": {
  "title": "fin-checkup static API",
  "version": "1.20261122",
  "summary": "Korean listed companies' financial ratios with signal, formula and thresholds.",
  "description": "Static JSON/Markdown files of fin-checkup: measured financial-ratio checkups of Korean listed companies, computed from DART filings. GET only, no key, no rate limit. Find a code with getCompanyIndex or getSearchIndex, then call getCompany (or getCompanyMarkdown). Present these as measurements, not opinions: for each metric you mention give its value, signal, formula and threshold. ⚫ = the data was not found in the filing (never 0). ⊘ = the metric does not fit this sector; pass on its note. ⚪ = no absolute threshold; compare with the peer median only. Do not tell the user to buy, sell or hold, do not rank companies, do not forecast prices. State the fiscal year, cite the company page and DART, and include the disclaimer verbatim. Full rules for agents: llms.txt. Field reference: https://github.com/younghwan91/fin-checkup/blob/main/docs/api-static.md. Disclaimer: 본 결과는 공시 수치를 공개된 재무비율 공식으로 계산한 측정값입니다. 투자권유·자문이 아니며, 데이터 정확성과 이용에 따른 손익에 책임지지 않습니다.",
  "license": {
   "name": "MIT",
   "identifier": "MIT"
  },
  "x-disclaimer": "본 결과는 공시 수치를 공개된 재무비율 공식으로 계산한 측정값입니다. 투자권유·자문이 아니며, 데이터 정확성과 이용에 따른 손익에 책임지지 않습니다.",
  "x-agent-guidance": "Present these as measurements, not opinions: for each metric you mention give its value, signal, formula and threshold. ⚫ = the data was not found in the filing (never 0). ⊘ = the metric does not fit this sector; pass on its note. ⚪ = no absolute threshold; compare with the peer median only. Do not tell the user to buy, sell or hold, do not rank companies, do not forecast prices. State the fiscal year, cite the company page and DART, and include the disclaimer verbatim."
 },
 "servers": [
  {
   "url": "https://younghwan91.github.io/fin-checkup"
  }
 ],
 "externalDocs": {
  "description": "JSON field reference",
  "url": "https://github.com/younghwan91/fin-checkup/blob/main/docs/api-static.md"
 },
 "paths": {
  "/api/index.json": {
   "get": {
    "operationId": "getCompanyIndex",
    "summary": "Every company: code, name, market, JSON and page paths",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/CompanyIndex"
        }
       }
      }
     }
    }
   }
  },
  "/api/c/{code}.json": {
   "get": {
    "operationId": "getCompany",
    "summary": "One company's 17 metrics with signal, formula, thresholds, peer median, red flags",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Company"
        }
       }
      }
     }
    },
    "description": "404 if the site has no checkup for that code.",
    "parameters": [
     {
      "name": "code",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^[0-9A-Z]{6}$",
       "description": "KRX 6자리 종목코드",
       "examples": [
        "005930"
       ]
      },
      "example": "005930"
     }
    ]
   }
  },
  "/c/{code}/index.md": {
   "get": {
    "operationId": "getCompanyMarkdown",
    "summary": "The same measurements as one compact Markdown page",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "text/markdown": {
        "schema": {
         "type": "string"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "code",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^[0-9A-Z]{6}$",
       "description": "KRX 6자리 종목코드",
       "examples": [
        "005930"
       ]
      },
      "example": "005930"
     }
    ]
   }
  },
  "/c/{code}.md": {
   "get": {
    "operationId": "getCompanyMarkdownAlias",
    "summary": "Alias of getCompanyMarkdown",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "text/markdown": {
        "schema": {
         "type": "string"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "code",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^[0-9A-Z]{6}$",
       "description": "KRX 6자리 종목코드",
       "examples": [
        "005930"
       ]
      },
      "example": "005930"
     }
    ]
   }
  },
  "/search-index.json": {
   "get": {
    "operationId": "getSearchIndex",
    "summary": "Name, code, market, sector and 초성 for fuzzy lookup (no metric values)",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/SearchIndex"
        }
       }
      }
     }
    }
   }
  },
  "/build.json": {
   "get": {
    "operationId": "getBuildInfo",
    "summary": "Build time, data years, counts",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/BuildInfo"
        }
       }
      }
     }
    }
   }
  },
  "/feeds/disclosures.xml": {
   "get": {
    "operationId": "getDisclosureFeed",
    "summary": "Atom feed of recent risk-related DART filings",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/atom+xml": {
        "schema": {
         "type": "string"
        }
       }
      }
     }
    }
   }
  },
  "/feeds/c/{code}.xml": {
   "get": {
    "operationId": "getCompanyFeed",
    "summary": "One company's Atom feed",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/atom+xml": {
        "schema": {
         "type": "string"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "code",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^[0-9A-Z]{6}$",
       "description": "KRX 6자리 종목코드",
       "examples": [
        "005930"
       ]
      },
      "example": "005930"
     }
    ]
   }
  },
  "/llms.txt": {
   "get": {
    "operationId": "getLlmsTxt",
    "summary": "Rules and recipe for agents (llmstxt.org)",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "text/plain": {
        "schema": {
         "type": "string"
        }
       }
      }
     }
    }
   }
  },
  "/llms-full.txt": {
   "get": {
    "operationId": "getLlmsFullTxt",
    "summary": "llms.txt plus every metric explainer inline",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "text/plain": {
        "schema": {
         "type": "string"
        }
       }
      }
     }
    }
   }
  }
 },
 "components": {
  "schemas": {
   "Signal": {
    "type": "object",
    "required": [
     "key",
     "emoji",
     "label"
    ],
    "properties": {
     "key": {
      "type": "string",
      "enum": [
       "green",
       "yellow",
       "red",
       "neutral",
       "not_applicable",
       "unknown"
      ],
      "description": "green 정상 · yellow 주의 · red 위험 · neutral 측정값(절대 기준 없음) · not_applicable 해당 없음(⊘, 업종에 맞지 않음 — note 에 대신 볼 것) · unknown 데이터 없음(⚫, 0 이 아니다)"
     },
     "emoji": {
      "type": "string",
      "enum": [
       "🟢",
       "🟡",
       "🔴",
       "⚪",
       "⊘",
       "⚫"
      ]
     },
     "label": {
      "type": "string",
      "enum": [
       "정상",
       "주의",
       "위험",
       "측정값",
       "해당 없음",
       "데이터 없음"
      ]
     }
    }
   },
   "Thresholds": {
    "type": "object",
    "required": [
     "good",
     "warn",
     "higher_is_better"
    ],
    "properties": {
     "good": {
      "type": "number"
     },
     "warn": {
      "type": "number"
     },
     "higher_is_better": {
      "type": "boolean"
     }
    },
    "description": "higher_is_better 면 값 ≥ good 🟢, ≥ warn 🟡, 그 아래 🔴. 아니면 ≤ good 🟢, ≤ warn 🟡, 그 위 🔴."
   },
   "Peer": {
    "type": "object",
    "required": [
     "scope",
     "scope_label",
     "sample_size",
     "median",
     "median_text",
     "percentile",
     "summary"
    ],
    "properties": {
     "scope": {
      "type": "string",
      "enum": [
       "industry",
       "market"
      ],
      "description": "industry 동종업계 / market 전체 상장사"
     },
     "scope_label": {
      "type": "string"
     },
     "sample_size": {
      "type": "integer"
     },
     "median": {
      "type": [
       "number",
       "null"
      ]
     },
     "median_text": {
      "type": "string"
     },
     "percentile": {
      "type": [
       "number",
       "null"
      ],
      "minimum": 0,
      "maximum": 100,
      "description": "높을수록 그 지표 기준 나은 쪽"
     },
     "summary": {
      "type": "string"
     }
    },
    "description": "대조군 분포. 표본이 5개사 미만이면 metric.peer 가 null."
   },
   "Delta": {
    "type": "object",
    "required": [
     "previous",
     "current",
     "improved",
     "summary"
    ],
    "properties": {
     "previous": {
      "type": [
       "number",
       "null"
      ]
     },
     "current": {
      "type": [
       "number",
       "null"
      ]
     },
     "improved": {
      "type": [
       "boolean",
       "null"
      ]
     },
     "summary": {
      "type": "string"
     }
    },
    "description": "작년 대비. 작년 값이 없거나 ⊘ 면 metric.delta 가 null."
   },
   "Metric": {
    "type": "object",
    "required": [
     "key",
     "label",
     "category",
     "value",
     "unit",
     "value_text",
     "signal",
     "formula",
     "thresholds",
     "threshold_text",
     "note",
     "peer",
     "delta"
    ],
    "properties": {
     "key": {
      "type": "string",
      "enum": [
       "operating_margin",
       "net_margin",
       "roe",
       "roa",
       "debt_ratio",
       "current_ratio",
       "interest_coverage",
       "equity_ratio",
       "revenue_growth",
       "operating_income_growth",
       "net_income_growth",
       "operating_cash_flow",
       "ocf_to_net_income",
       "fcf",
       "asset_turnover",
       "inventory_turnover",
       "receivable_turnover"
      ]
     },
     "label": {
      "type": "string"
     },
     "category": {
      "type": "string",
      "enum": [
       "수익성",
       "안정성",
       "성장성",
       "이익의 질",
       "효율성"
      ]
     },
     "value": {
      "type": [
       "number",
       "null"
      ],
      "description": "값이 없으면 null(⚫) — 0 으로 채우지 않는다"
     },
     "unit": {
      "type": "string",
      "description": "%·배·회·money (money 의 통화는 currency)"
     },
     "value_text": {
      "type": "string",
      "description": "화면과 같은 표시 문자열. 값이 없으면 '—'"
     },
     "signal": {
      "$ref": "#/components/schemas/Signal"
     },
     "formula": {
      "type": "string",
      "description": "계산식 — 신호와 함께 늘 보여 준다"
     },
     "thresholds": {
      "oneOf": [
       {
        "$ref": "#/components/schemas/Thresholds"
       },
       {
        "type": "null"
       }
      ]
     },
     "threshold_text": {
      "type": "string",
      "description": "경계값 한 줄 — 신호와 함께 늘 보여 준다"
     },
     "note": {
      "type": "string",
      "description": "⊘ 면 대신 볼 것, ⚫ 면 무엇이 없었는지"
     },
     "peer": {
      "oneOf": [
       {
        "$ref": "#/components/schemas/Peer"
       },
       {
        "type": "null"
       }
      ]
     },
     "delta": {
      "oneOf": [
       {
        "$ref": "#/components/schemas/Delta"
       },
       {
        "type": "null"
       }
      ]
     }
    }
   },
   "RedFlag": {
    "type": "object",
    "required": [
     "key",
     "label",
     "detail",
     "reference"
    ],
    "properties": {
     "key": {
      "type": "string"
     },
     "label": {
      "type": "string"
     },
     "detail": {
      "type": "string"
     },
     "reference": {
      "type": "string"
     }
    }
   },
   "Source": {
    "type": "object",
    "required": [
     "name",
     "url"
    ],
    "properties": {
     "name": {
      "type": "string"
     },
     "url": {
      "type": "string",
      "format": "uri"
     },
     "params": {
      "type": "object",
      "additionalProperties": {
       "type": "string"
      },
      "description": "OpenDART 요청 파라미터. 인증키는 싣지 않는다 — 각자 발급받아 붙인다"
     }
    }
   },
   "Company": {
    "type": "object",
    "required": [
     "schema_version",
     "disclaimer",
     "built_on",
     "fiscal_year",
     "summary_ko",
     "agent_guidance",
     "company",
     "report",
     "currency",
     "years",
     "metrics",
     "red_flags",
     "sources"
    ],
    "properties": {
     "schema_version": {
      "type": "integer",
      "const": 1
     },
     "disclaimer": {
      "type": "string",
      "const": "본 결과는 공시 수치를 공개된 재무비율 공식으로 계산한 측정값입니다. 투자권유·자문이 아니며, 데이터 정확성과 이용에 따른 손익에 책임지지 않습니다."
     },
     "built_on": {
      "type": "string",
      "format": "date"
     },
     "fiscal_year": {
      "type": "integer"
     },
     "summary_ko": {
      "type": "string",
      "description": "측정 결과의 평이한 사실 문단 (평가·권유 없음)"
     },
     "agent_guidance": {
      "type": "string",
      "const": "Present these as measurements, not opinions: for each metric you mention give its value, signal, formula and threshold. ⚫ = the data was not found in the filing (never 0). ⊘ = the metric does not fit this sector; pass on its note. ⚪ = no absolute threshold; compare with the peer median only. Do not tell the user to buy, sell or hold, do not rank companies, do not forecast prices. State the fiscal year, cite the company page and DART, and include the disclaimer verbatim."
     },
     "company": {
      "type": "object",
      "required": [
       "name",
       "stock_code",
       "corp_code",
       "market",
       "industry_code",
       "peer_group",
       "sector",
       "sector_label",
       "page"
      ],
      "properties": {
       "name": {
        "type": "string"
       },
       "stock_code": {
        "type": "string",
        "pattern": "^[0-9A-Z]{6}$",
        "description": "KRX 6자리 종목코드",
        "examples": [
         "005930"
        ]
       },
       "corp_code": {
        "type": "string",
        "pattern": "^[0-9]{8}$"
       },
       "market": {
        "type": [
         "string",
         "null"
        ],
        "enum": [
         "KOSPI",
         "KOSDAQ",
         "KONEX",
         "OTHER",
         null
        ]
       },
       "industry_code": {
        "type": [
         "string",
         "null"
        ]
       },
       "peer_group": {
        "type": [
         "string",
         "null"
        ]
       },
       "sector": {
        "type": "string",
        "enum": [
         "general",
         "financial",
         "real_estate"
        ]
       },
       "sector_label": {
        "type": "string"
       },
       "page": {
        "type": "string"
       }
      }
     },
     "report": {
      "type": "object",
      "required": [
       "reprt_code",
       "label",
       "fs_div"
      ],
      "properties": {
       "reprt_code": {
        "type": "string",
        "enum": [
         "11013",
         "11012",
         "11014",
         "11011"
        ]
       },
       "label": {
        "type": "string"
       },
       "fs_div": {
        "type": "string",
        "enum": [
         "CFS",
         "OFS"
        ],
        "description": "CFS 연결 / OFS 개별"
       }
      }
     },
     "currency": {
      "type": "string"
     },
     "years": {
      "type": "array",
      "items": {
       "type": "integer"
      }
     },
     "metrics": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/Metric"
      },
      "minItems": 17
     },
     "red_flags": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/RedFlag"
      }
     },
     "sources": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/Source"
      }
     }
    },
    "description": "회사 하나의 측정 결과 (api/c/<code>.json)."
   },
   "CompanyIndex": {
    "type": "object",
    "required": [
     "schema_version",
     "disclaimer",
     "built_on",
     "fiscal_year",
     "companies"
    ],
    "properties": {
     "schema_version": {
      "type": "integer",
      "const": 1
     },
     "disclaimer": {
      "type": "string",
      "const": "본 결과는 공시 수치를 공개된 재무비율 공식으로 계산한 측정값입니다. 투자권유·자문이 아니며, 데이터 정확성과 이용에 따른 손익에 책임지지 않습니다."
     },
     "built_on": {
      "type": "string",
      "format": "date"
     },
     "fiscal_year": {
      "type": "integer"
     },
     "companies": {
      "type": "array",
      "items": {
       "type": "object",
       "required": [
        "stock_code",
        "name",
        "market",
        "json",
        "page"
       ],
       "properties": {
        "stock_code": {
         "type": "string",
         "pattern": "^[0-9A-Z]{6}$",
         "description": "KRX 6자리 종목코드",
         "examples": [
          "005930"
         ]
        },
        "name": {
         "type": "string"
        },
        "market": {
         "type": [
          "string",
          "null"
         ],
         "enum": [
          "KOSPI",
          "KOSDAQ",
          "KONEX",
          "OTHER",
          null
         ]
        },
        "json": {
         "type": "string"
        },
        "page": {
         "type": "string"
        }
       }
      }
     }
    },
    "description": "회사 목록, 종목코드순 (api/index.json)."
   },
   "SearchIndex": {
    "type": "object",
    "required": [
     "year",
     "built_on",
     "companies"
    ],
    "properties": {
     "year": {
      "type": "integer"
     },
     "built_on": {
      "type": "string",
      "format": "date"
     },
     "companies": {
      "type": "array",
      "items": {
       "type": "object",
       "required": [
        "name",
        "code",
        "market",
        "sector",
        "chosung"
       ],
       "properties": {
        "name": {
         "type": "string"
        },
        "code": {
         "type": "string",
         "pattern": "^[0-9A-Z]{6}$",
         "description": "KRX 6자리 종목코드",
         "examples": [
          "005930"
         ]
        },
        "market": {
         "type": "string",
         "description": "모르면 빈 문자열"
        },
        "sector": {
         "type": "string"
        },
        "chosung": {
         "type": "string",
         "description": "이름의 초성 (ㅅㅅㅈㅈ)"
        }
       }
      }
     }
    },
    "description": "찾기용 최소 필드, 이름순 — 지표 값은 없다 (search-index.json)."
   },
   "BuildInfo": {
    "type": "object",
    "required": [
     "schema_version",
     "disclaimer",
     "built_at",
     "built_on",
     "fiscal_year",
     "fiscal_years_in_data",
     "expected_fiscal_year",
     "fresh",
     "snapshot",
     "disclosures",
     "git_sha",
     "counts"
    ],
    "properties": {
     "schema_version": {
      "type": "integer",
      "const": 1
     },
     "disclaimer": {
      "type": "string",
      "const": "본 결과는 공시 수치를 공개된 재무비율 공식으로 계산한 측정값입니다. 투자권유·자문이 아니며, 데이터 정확성과 이용에 따른 손익에 책임지지 않습니다."
     },
     "built_at": {
      "type": "string",
      "format": "date-time"
     },
     "built_on": {
      "type": "string",
      "format": "date"
     },
     "fiscal_year": {
      "type": "integer"
     },
     "fiscal_years_in_data": {
      "type": "array",
      "items": {
       "type": "integer"
      }
     },
     "expected_fiscal_year": {
      "type": "integer"
     },
     "fresh": {
      "type": "boolean"
     },
     "snapshot": {
      "type": [
       "object",
       "null"
      ],
      "required": [
       "built_on",
       "built_at",
       "bsns_years"
      ],
      "properties": {
       "built_on": {
        "type": "string"
       },
       "built_at": {
        "type": "string"
       },
       "bsns_years": {
        "type": "array",
        "items": {
         "type": "integer"
        }
       }
      }
     },
     "disclosures": {
      "type": [
       "object",
       "null"
      ],
      "required": [
       "begin",
       "end",
       "count"
      ],
      "properties": {
       "begin": {
        "type": "string",
        "format": "date"
       },
       "end": {
        "type": "string",
        "format": "date"
       },
       "count": {
        "type": "integer"
       }
      }
     },
     "git_sha": {
      "type": [
       "string",
       "null"
      ]
     },
     "counts": {
      "type": "object",
      "required": [
       "companies",
       "skipped",
       "pages",
       "files"
      ],
      "properties": {
       "companies": {
        "type": "integer"
       },
       "skipped": {
        "type": "integer"
       },
       "pages": {
        "type": "integer"
       },
       "files": {
        "type": "integer"
       }
      }
     }
    },
    "description": "빌드 메타 (build.json)."
   }
  }
 }
}
