|
|
@@ -0,0 +1,361 @@
|
|
|
+// 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) — 주요 사유 (미매칭 시 원문 코드 노출)
|
|
|
+export const LOCKUP_REASON_LABEL: Record<string, string> = {
|
|
|
+ '01': '유상증자',
|
|
|
+ '02': '무상증자',
|
|
|
+ '03': '기업공개(IPO)',
|
|
|
+ '04': '주식분할',
|
|
|
+ '05': '합병',
|
|
|
+ '06': '주식교환',
|
|
|
+ '07': '전환사채',
|
|
|
+ '08': '신주인수권',
|
|
|
+ '09': '스톡옵션',
|
|
|
+ '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) — 71외화주식~78 (합산은 null)
|
|
|
+export const FOREIGN_SECN_TPCD_LABEL: Record<string, string> = {
|
|
|
+ '71': '외화주식',
|
|
|
+ '72': '외화채권',
|
|
|
+ '73': '외화수익증권',
|
|
|
+ '74': '외화ETF',
|
|
|
+ '75': '외화DR',
|
|
|
+ '76': '외화ETN',
|
|
|
+ '77': '외화워런트',
|
|
|
+ '78': '기타 외화증권'
|
|
|
+};
|
|
|
+
|
|
|
+// 국가코드 (NATION_CD) — 주요국 (미매칭 시 원문 코드 노출)
|
|
|
+export const NATION_LABEL: Record<string, string> = {
|
|
|
+ US: '미국',
|
|
|
+ JP: '일본',
|
|
|
+ HK: '홍콩',
|
|
|
+ CN: '중국',
|
|
|
+ GB: '영국',
|
|
|
+ DE: '독일',
|
|
|
+ FR: '프랑스',
|
|
|
+ VN: '베트남',
|
|
|
+ SG: '싱가포르',
|
|
|
+ CH: '스위스',
|
|
|
+ E1: '유럽(유로존)'
|
|
|
+};
|
|
|
+
|
|
|
+// 채권 옵션구분코드 (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;
|
|
|
+}
|