Skip to content

Conversation

@sgh002400
Copy link
Contributor

@sgh002400 sgh002400 commented Jan 12, 2025

변경사항

  • 전략별 매매내역 조회 API 개발

상세내용

  • 조회기간, 트레이딩 타입 (롱, 숏, 둘다)로 매매내역을 조회할 수 있는 API 개발
  • 서비스 레이어에 비즈니스 로직만 남기기 위해 구현 레이어를 추가하였습니다.
  • 빈번히 조회되는 매매내역을 캐시하여 조회 성능을 향상했습니다.
    • Sorted Set 자료구조를 활용하였으며 Key는 전략의 Id, Score는 포지션 진입 날짜로 설정했습니다.
    • 캐시가 존재하지 않을 경우 DB에서 해당 전략 Id에 해당하는 매매내역을 전체 조회한 뒤, 조회 조건에 맞도록 필터링 한 값을 응답합니다.
      • 조회한 전체 매매내역은 비동기적으로 캐시에 추가합니다.
    • 캐시가 존재할 경우 캐시에서 이를 조회하여 응답합니다.

연관 이슈

@sgh002400 sgh002400 self-assigned this Jan 12, 2025
@sgh002400 sgh002400 marked this pull request as ready for review January 13, 2025 14:19
@sgh002400 sgh002400 merged commit 8551973 into dev Jan 13, 2025
1 check failed
@sgh002400 sgh002400 deleted the feat/#7-strategy-detail branch January 13, 2025 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] 전략 상세 조회 API

2 participants