-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ feat: 오늘의 상/하위 종목 조회에 사용할 DTO 구현#12
오늘의 상/하위 종목 조회를 위해 필요한 DTO 구현
- Loading branch information
Showing
3 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { ApiProperty } from '@nestjs/swagger'; | ||
|
||
/** | ||
* 등락률 API 요청 후 받은 응답값 정제용 DTO | ||
*/ | ||
export class StockRankingDataDto { | ||
@ApiProperty({ description: 'HTS 한글 종목명' }) | ||
hts_kor_isnm: string; | ||
|
||
@ApiProperty({ description: '주식 현재가' }) | ||
stck_prpr: string; | ||
|
||
@ApiProperty({ description: '전일 대비' }) | ||
prdy_vrss: string; | ||
|
||
@ApiProperty({ description: '전일 대비 부호' }) | ||
prdy_vrss_sign: string; | ||
|
||
@ApiProperty({ description: '전일 대비율' }) | ||
prdy_ctrt: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/** | ||
* 등락률 API를 사용할 때 쿼리 파라미터로 사용할 요청값 DTO | ||
*/ | ||
export class StockRankigRequestDto { | ||
/** | ||
* 조건 시장 분류 코드 | ||
* 'J' 주식 | ||
*/ | ||
fid_cond_mrkt_div_code: string; | ||
|
||
/** | ||
* 입력 종목 코드 | ||
* '0000' 전체 / '0001' 코스피 | ||
* '1001' 코스닥 / '2001' 코스피200 | ||
*/ | ||
fid_input_iscd: string; | ||
|
||
/** | ||
* 순위 정렬 구분 코드 | ||
* '0' 상승률 / '1' 하락률 | ||
*/ | ||
fid_rank_sort_cls_code: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { ApiProperty } from '@nestjs/swagger'; | ||
import { StockRankingDataDto } from './stock-ranking-data.dto'; | ||
|
||
/** | ||
* 순위 정렬 후 FE에 보낼 DTO | ||
*/ | ||
export class StockRankingResponseDto { | ||
@ApiProperty({ type: [StockRankingDataDto], description: '상승률 순위' }) | ||
high: StockRankingDataDto[]; | ||
|
||
@ApiProperty({ type: [StockRankingDataDto], description: '하락률 순위' }) | ||
low: StockRankingDataDto[]; | ||
} |