Skip to content

Commit

Permalink
feat: 트레이드 생성시 레디스db에 동시 생성
Browse files Browse the repository at this point in the history
  • Loading branch information
SeongHyeon0409 committed Nov 27, 2024
1 parent e37858e commit a5fcb06
Show file tree
Hide file tree
Showing 2 changed files with 301 additions and 282 deletions.
2 changes: 2 additions & 0 deletions packages/server/src/trade/trade-ask-bid.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { TradeHistoryRepository } from '@src/trade-history/trade-history.reposit
import { CoinDataUpdaterService } from '@src/upbit/coin-data-updater.service';
import { CoinPriceDto, TradeData } from './dtos/trade.interface';
import { formatQuantity, isMinimumQuantity } from './helpers/trade.helper';
import { RedisRepository } from '@src/redis/redis.repository';

@Injectable()
export class TradeAskBidService {
Expand All @@ -20,6 +21,7 @@ export class TradeAskBidService {
protected readonly userRepository: UserRepository,
protected readonly tradeHistoryRepository: TradeHistoryRepository,
protected readonly coinDataUpdaterService: CoinDataUpdaterService,
protected readonly redisRepository: RedisRepository
) {}
protected async processPendingTrades(
tradeType: 'BUY' | 'SELL',
Expand Down
Loading

0 comments on commit a5fcb06

Please sign in to comment.