| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- // 종목 도메인 타입 — Backend Application/Features/Api/Stocks/*/Response.cs 대응 (camelCase 직렬화)
- export type StockMarketName = 'KOSPI'|'KOSDAQ'|'KONEX';
- export type TradingStatusName = 'Normal'|'Halted'|'Watch';
- // GET /api/stocks — 목록 행
- export interface StockListRow {
- code: string;
- name: string;
- market: StockMarketName;
- tradingStatus: TradingStatusName;
- lastTradingDate: string|null;
- closePrice: number|null;
- changeRate: number|null;
- marketCap: number|null;
- volume: number|null;
- tradingValue: number|null;
- }
- // 목록 정렬 키 (백엔드 GetList.Query.Sort 와 동일) + 방향
- export type StockSortKey = 'name'|'price'|'change'|'cap'|'value';
- export type StockSortOrder = 'asc'|'desc';
- export interface StockListResponse {
- total: number;
- list: StockListRow[];
- }
- // 일별 시세 행 (GetDetail.RecentPrices / GetHistory 공용 필드)
- export interface StockPriceRow {
- tradingDate: string;
- open: number;
- high: number;
- low: number;
- close: number;
- volume: number;
- tradingValue: number;
- changeAmount: number;
- changeRate: number;
- }
- // GET /api/stocks/{code}
- export interface StockDetailResponse {
- code: string;
- isin: string|null;
- name: string;
- englishName: string|null;
- market: StockMarketName;
- tradingStatus: TradingStatusName;
- sectorName: string|null;
- isActive: boolean;
- listedDate: string;
- delistedDate: string|null;
- lastTradingDate: string|null;
- closePrice: number|null;
- changeRate: number|null;
- marketCap: number|null;
- recentPrices: StockPriceRow[];
- }
- // GET /api/stocks/{code}/history
- export interface StockHistoryRow extends StockPriceRow {
- marketCap: number|null;
- }
- export interface StockHistoryResponse {
- total: number;
- list: StockHistoryRow[];
- }
- // GET /api/stocks/suggest
- export interface StockSuggestItem {
- code: string;
- name: string;
- market: StockMarketName;
- }
- export interface StockSuggestResponse {
- list: StockSuggestItem[];
- }
- // 관심종목 (Watch) — Backend Features/Api/Stocks/Watch/*
- // POST /api/stocks/{code}/watch
- export interface StockWatchToggleResponse {
- isWatched: boolean;
- }
- // GET /api/stocks/watchlist/status?codes=CSV
- export interface StockWatchStatusResponse {
- map: Record<string, boolean>;
- }
- // GET /api/stocks/watchlist — 행
- export interface StockWatchRow {
- code: string;
- name: string;
- market: StockMarketName;
- closePrice: number|null;
- changeRate: number|null;
- }
- export interface StockWatchListResponse {
- list: StockWatchRow[];
- }
|