| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363 |
- // SEIBro 데이터 도메인 타입 — Backend Application/Features/Api/Stocks/{GetDividendCalendar,GetStockDividends,
- // GetLendingHistory,GetLockupCalendar,GetMeetingCalendar,GetCbExercises,GetBondDetail,GetElsRiskBoard,
- // GetForeignCustody}/Response.cs 대응.
- // 직렬화 주의: 필드명은 camelCase. Web.Api 는 JsonStringEnumConverter 미등록이나, 아래 응답들의 코드값은
- // 전부 C# string(원문 코드 문자열)이므로 문자열로 옴 → 라벨맵으로 표시.
- // DateOnly 는 "yyyy-MM-dd" 문자열, decimal 은 number 로 직렬화됨.
- // ── 코드 라벨맵 (SEIBro 원문 코드 문자열 → 한글 라벨) ──
- // 배당 세부유형 (SORT_CODE) — 01주식 02현금 03동시 04무배당
- export const DIVIDEND_SORT_LABEL: Record<string, string> = {
- '01': '주식',
- '02': '현금',
- '03': '동시',
- '04': '무배당'
- };
- // 확정구분 (FIX_TYPE / FIX_TPCD) — 1확정 2예고 3미정
- export const DIVIDEND_FIX_LABEL: Record<string, string> = {
- '1': '확정',
- '2': '예고',
- '3': '미정'
- };
- // 결산구분 (SETTLE_TYPE) — 1결산 2반기 3분기
- export const DIVIDEND_SETTLE_LABEL: Record<string, string> = {
- '1': '결산',
- '2': '반기',
- '3': '분기'
- };
- // 락업 업무구분 (OCCR_SEQ) — 1예수 2반환
- export const LOCKUP_OCCR_LABEL: Record<string, string> = {
- '1': '예수',
- '2': '반환'
- };
- // 보호예수 사유코드 (DUTY_SAFEDP_RACD) — SEIBro 원본 전체 코드표 (미매칭 시 원문 코드 노출)
- export const LOCKUP_REASON_LABEL: Record<string, string> = {
- '00': '해당없음', '01': '일반', '02': '모집(전매제한)', '03': '최대주주(상장)', '04': '최대주주(코스닥)',
- '05': '투자회사(상장)', '06': '초과유상증자', '07': '지정취소', '08': '질권담보', '09': '등록주선인',
- '10': '외국인양수(변동제한)', '11': '벤처금융', '12': '기관투자가', '13': '합병(상장)', '14': '합병(코스닥)',
- '15': '부동산(상장)', '16': '부동산(코스닥)', '17': '법원M&A', '18': '주식교환(코스닥)', '19': '벤처금융(주식교환)',
- '20': '벤처금융(합병)', '21': '기관투자가(합병)', '22': '기관투자가(주식교환)', '23': '제3자배정최대주주(코스닥)', '24': '선박(상장)',
- '25': '채권기관협의회', '26': '주식교환(상장)', '27': '영업자산양도&제3자배정(상장)', '28': '영업자산양도&제3자배정(코스닥)', '29': '제3자배정유상증자(상장)',
- '30': '제3자배정유상증자(코스닥)', '31': '최대주주(제3자배정)', '32': 'SPAC(상장)', '33': 'SPAC(코스닥)', '34': 'SPAC 합병(상장)',
- '35': 'SPAC 합병(코스닥)', '36': '명목회사(상장)', '37': '명목회사(코스닥)', '38': '자발적보호예수', '39': '우회상장',
- '40': '상장주선인(국내기업)', '41': '전매제한', '42': '기타(특정금전신탁편입 등)', '43': '최대주주(기술성장기업)', '44': '기관투자가(코넥스)',
- '45': '크라우드펀딩', '46': '크라우드펀딩(최대주주)', '47': '주관회사(금투협)', '48': '상장주선인(외국기업)', '49': '모집(전매제한)-크라우드펀딩전문투자자',
- '50': '상장주선인(50%미만)', '51': '상장주선인(50%이상)', '52': '최대주주변경(법인 또는 조합)', '53': '상장적격성 실질심사', '54': '기타 보호예수 필요 주주',
- '55': '주식매수선택권', '90': '기타의무예수', '99': '기타'
- };
- // 주총 종류코드 (GMET_KACD) — 001정기 002임시 003종류 009기타
- export const MEETING_KIND_LABEL: Record<string, string> = {
- '001': '정기',
- '002': '임시',
- '003': '종류',
- '009': '기타'
- };
- // ELS/DLS 종목구분코드 (SECN_TPCD)
- export const ELS_SECN_TPCD_LABEL: Record<string, string> = {
- '41': 'ELS',
- '43': 'DLS'
- };
- // 외화증권 종목구분코드 (SECN_TPCD) — SEIBro 스펙 코드표 (docs/SEIBro/외화증권.md)
- export const FOREIGN_SECN_TPCD_LABEL: Record<string, string> = {
- '71': '외화주식',
- '72': '외화DR',
- '73': '외화WRTS',
- '74': '외화RGTS',
- '75': '외화채권',
- '76': '외화CD',
- '77': '외화CP',
- '78': '외화수익증권'
- };
- // 국가코드 (NATION_CD) — 주요국 (미매칭 시 원문 코드 노출)
- export const NATION_LABEL: Record<string, string> = {
- US: '미국',
- JP: '일본',
- HK: '홍콩',
- CN: '중국',
- GB: '영국',
- DE: '독일',
- FR: '프랑스',
- VN: '베트남',
- SG: '싱가포르',
- CH: '스위스',
- E1: '유로클리어(ICSD)'
- };
- // 채권 옵션구분코드 (OPTION_TPCD) — 9401CALL 9402PUT 9403CALL+PUT 9404NOTE 0000해당없음
- export const BOND_OPTION_LABEL: Record<string, string> = {
- '9401': 'Call',
- '9402': 'Put',
- '9403': 'Call+Put',
- '9404': 'Note',
- '0000': '해당없음'
- };
- // 채권 금리변동구분코드 (MR_CHG_TPCD) — 1고정 2변동 3고정+변동
- export const BOND_RATE_CHG_LABEL: Record<string, string> = {
- '1': '고정금리',
- '2': '변동금리',
- '3': '고정+변동'
- };
- // 채권 보증구분코드 (GRTY_TPCD) — 1보증 2무보증 3담보부 4일반
- export const BOND_GUARANTEE_LABEL: Record<string, string> = {
- '1': '보증',
- '2': '무보증',
- '3': '담보부',
- '4': '일반'
- };
- // 채권 순위구분코드 (RANK_TPCD) — 1선순위 2후순위 3중순위 9해당없음
- export const BOND_RANK_LABEL: Record<string, string> = {
- '1': '선순위',
- '2': '후순위',
- '3': '중순위',
- '9': '해당없음'
- };
- // 채권 이자지급방법구분코드 (INT_PAY_WAY_TPCD) — 1이표 2할인 3복리 4단리
- export const BOND_INT_PAY_WAY_LABEL: Record<string, string> = {
- '1': '이표채',
- '2': '할인채',
- '3': '복리채',
- '4': '단리채'
- };
- // 채권 이자지급주기구분코드 (INT_PAY_CYCLE_TPCD) — 23개월 24분기 25반기 26년
- export const BOND_INT_CYCLE_LABEL: Record<string, string> = {
- '23': '월',
- '24': '분기',
- '25': '반기',
- '26': '년'
- };
- // 채권 이자지급시기구분코드 (INT_PAY_TIMS_TPCD) — 01후급 02선급
- export const BOND_INT_TIMING_LABEL: Record<string, string> = {
- '01': '후급',
- '02': '선급'
- };
- // 특이채권종류구분코드 (PARTICUL_BOND_KIND_TPCD) — 1전환 2교환 3신주인수권 4분리형신주인수권 6이익참가 9해당없음
- export const BOND_PARTICUL_KIND_LABEL: Record<string, string> = {
- '1': '전환사채(CB)',
- '2': '교환사채(EB)',
- '3': '신주인수권부사채(BW)',
- '4': '분리형 신주인수권부사채',
- '6': '이익참가부사채',
- '9': '해당없음'
- };
- // 종목종류코드 (SECN_KACD) — 대표값 (미매칭 시 원문 코드 노출)
- export const BOND_SECN_KACD_LABEL: Record<string, string> = {
- '1108': '일반회사채',
- '1105': '국채',
- '1106': '지방채',
- '1107': '특수채',
- '1110': '금융채'
- };
- // ── GET /api/market/dividend-calendar ──
- export interface DividendCalendarRow {
- issucoCustno: number;
- name: string;
- rgtStdDt: string;
- xrgtDt: string|null;
- sortCode: string;
- fixType: string|null;
- settleType: string|null;
- }
- export interface DividendCalendarResponse {
- total: number;
- list: DividendCalendarRow[];
- }
- // ── GET /api/market/lockup-calendar ──
- export interface LockupCalendarRow {
- issucoCustno: number;
- shortCode: string;
- name: string;
- occrSeq: string;
- safedpDt: string;
- safedpQty: number|null;
- reasonCode: string;
- returnDt: string|null;
- returnQty: number|null;
- totalStkCnt: number|null;
- }
- export interface LockupCalendarResponse {
- total: number;
- list: LockupCalendarRow[];
- }
- // ── GET /api/market/meeting-calendar ──
- export interface MeetingCalendarRow {
- issucoCustno: number;
- name: string|null;
- code: string|null;
- rgtStdDt: string;
- gmetDt: string|null;
- gmetTtm: string|null;
- meetingKind: string;
- place: string|null;
- evote: boolean|null;
- deferred: boolean|null;
- agendaCount: number;
- }
- export interface MeetingCalendarResponse {
- total: number;
- list: MeetingCalendarRow[];
- }
- // ── GET /api/market/els-risk ──
- export interface ElsRiskPoint {
- stdDt: string;
- unredeemedCount: number|null;
- unredeemedRemaining: number|null;
- }
- export interface ElsRiskSeries {
- bassetCd: string;
- bassetContent: string|null;
- secnTpcd: string;
- points: ElsRiskPoint[];
- }
- export interface ElsRiskResponse {
- assets: ElsRiskSeries[];
- }
- // ── GET /api/market/foreign-custody ──
- export interface ForeignCustodyPoint {
- stdDt: string;
- custodyAmount: number;
- }
- export interface ForeignCustodySeries {
- nationCd: string;
- secnTpcd: string|null;
- points: ForeignCustodyPoint[];
- }
- export interface ForeignCustodyResponse {
- nations: ForeignCustodySeries[];
- }
- // ── GET /api/stocks/{code}/dividends ──
- export interface StockDividendRow {
- rgtStdDt: string;
- name: string;
- securityKind: string|null;
- faceValue: number|null;
- cashPerShare: number|null;
- stockAllocRatio: number|null;
- marketDividendRate: number|null;
- cashPayDate: string|null;
- xrgtDt: string|null;
- fixType: string|null;
- }
- export interface StockDividendsResponse {
- isin: string;
- total: number;
- list: StockDividendRow[];
- }
- // ── GET /api/stocks/{code}/lending ──
- export interface LendingHistoryRow {
- stdDt: string;
- lendingBalanceQty: number|null;
- matchedQty: number|null;
- redeemedQty: number|null;
- tradeQty: number|null;
- foreignLendRatio: number|null;
- nativeLendRatio: number|null;
- foreignBorrowRatio: number|null;
- nativeBorrowRatio: number|null;
- }
- export interface LendingHistoryResponse {
- isin: string;
- total: number;
- list: LendingHistoryRow[];
- }
- // ── GET /api/stocks/{code}/cb-exercises ──
- export interface CbExerciseRow {
- bondIsin: string;
- bondName: string|null;
- bondKind: string|null;
- exerciseStockIsin: string|null;
- exerciseStockName: string|null;
- rgtStdDt: string;
- exercisePrice: number|null;
- exerciseQty: number|null;
- exerciseAmt: number|null;
- listDt: string|null;
- }
- export interface CbExercisesResponse {
- isin: string;
- total: number;
- list: CbExerciseRow[];
- }
- // ── GET /api/stocks/bonds/{isin} ──
- export interface BondDetailMaster {
- name: string|null;
- issucoCustno: number|null;
- secnKacd: string|null;
- issueDate: string|null;
- maturityDate: string|null;
- currency: string|null;
- firstIssueAmount: number|null;
- issueRemaining: number|null;
- couponRate: number|null;
- optionTpcd: string|null;
- forcedEarlyRedemption: boolean|null;
- rateChangeTpcd: string|null;
- guaranteeTpcd: string|null;
- rankTpcd: string|null;
- intPayWayTpcd: string|null;
- particularBondKindTpcd: string|null;
- kisGrade: string|null;
- niceGrade: string|null;
- sciGrade: string|null;
- krGrade: string|null;
- isElectronicSecurity: boolean|null;
- }
- export interface BondDetailInterest {
- couponRate: number|null;
- intPayWayTpcd: string|null;
- cycleTerms: number|null;
- cycleTpcd: string|null;
- payTimingTpcd: string|null;
- beforeCouponDate: string|null;
- afterCouponDate: string|null;
- }
- export interface BondDetailMarket {
- tradeDate: string;
- close: number;
- yieldToMaturity: number|null;
- volume: number;
- }
- export interface BondDetailResponse {
- isin: string;
- master: BondDetailMaster|null;
- interest: BondDetailInterest|null;
- market: BondDetailMarket|null;
- }
|