Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/#253 - 가격 상승률 및 하락률 데이터 수집 #260

Merged
merged 20 commits into from
Nov 27, 2024

Conversation

xjfcnfw3
Copy link
Collaborator

@xjfcnfw3 xjfcnfw3 commented Nov 26, 2024

close #253 #263 #264

✅ 작업 내용

  • 가격 상승률 데이터 수집
  • 가격 하락률 데이터 수집

📌 이슈 사항

  • 1분 주기로 데이터를 모두 삭제한 후 받는 형식으로 업데이트를 진행합니다.

✍ 궁금한 점

  • 상승률, 하락률 엔드포인트의 경우 stockDetail과 stockLiveData가 필요합니다. 필요한 칼럼은 다음과 같습니다.
    • stockDetail - marketCap
    • stockLiveData - volume, currentPrice
  • changeRate도 stockLiveData에 포함되지만, api 데이터 칼럼으로 대체했습니다.
  • stockDetail은 상관없지만, stockLiveData가 없을 때 어떻게 받을지 고민입니다.

😎 체크 사항

  • label 설정 확인
  • 브랜치 방향 확인

@xjfcnfw3 xjfcnfw3 added ✨feature 기능 개발 BE labels Nov 26, 2024
@xjfcnfw3 xjfcnfw3 requested a review from a team November 26, 2024 13:43
# Conflicts:
#	packages/backend/src/scraper/openapi/openapi-scraper.module.ts
#	packages/backend/src/scraper/openapi/type/openapiUtil.type.ts
setTimeout(() => this.getFluctuationRankStocks(), 1000);
}

@Cron('*/1 9-16 * * 1-5')
Copy link
Collaborator

@swkim12345 swkim12345 Nov 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/1는 안 써도 될거 같아요!
https://docs.nestjs.com/techniques/task-scheduling

Comment on lines +181 to +189
return this.getStocksQuery()
.innerJoinAndSelect('stock.fluctuationRankStocks', 'FluctuationRankStock')
.addSelect([
'fluctuationRankStock.rank AS stockRank',
'fluctuationRankStock.isRising AS isRising',
'fluctuationRankStock.fluctuation_rate AS fluctuationRate',
])
.where('FluctuationRankStock.isRising = :isRising', { isRising });
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ㅗㅜㅑ; typeorm의 경지는 멀고 험난하군요..

Copy link
Collaborator

@baegyeong baegyeong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다!!!

Copy link
Collaborator

@swkim12345 swkim12345 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

리뷰 남기고 approve를 깜박했네요;

@xjfcnfw3 xjfcnfw3 merged commit ec540c4 into dev-be Nov 27, 2024
@xjfcnfw3 xjfcnfw3 deleted the feature/#253 branch December 3, 2024 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BE ✨feature 기능 개발
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants