namespace Application.Abstractions.Crypto; public interface IUpbitClient { // Candle Task> GetSecondCandlesAsync(string market, int count, CancellationToken ct = default); Task> GetMinuteCandlesAsync(string market, int unit, int count, CancellationToken ct = default); Task> GetDayCandlesAsync(string market, int count, CancellationToken ct = default); Task> GetWeekCandlesAsync(string market, int count, CancellationToken ct = default); Task> GetMonthCandlesAsync(string market, int count, CancellationToken ct = default); Task> GetYearCandlesAsync(string market, int count, CancellationToken ct = default); // Market Task> GetMarketsAsync(CancellationToken ct = default); // Ticker (상세) Task> GetTickersAsync(string[] markets, CancellationToken ct = default); // Trade (체결) Task> GetTradesAsync(string market, int count, CancellationToken ct = default); // Orderbook (호가) Task> GetOrderbookAsync(string[] markets, CancellationToken ct = default); } // WebSocket Ticker (SIMPLE 포맷, 기존) public sealed record UpbitTicker( string Market, decimal TradePrice, string Change, decimal SignedChangePrice, decimal SignedChangeRate, decimal AccTradePrice24h ); // Candle public sealed record UpbitCandle( string Market, DateTime CandleDateTimeUtc, decimal OpeningPrice, decimal HighPrice, decimal LowPrice, decimal TradePrice, long Timestamp, decimal CandleAccTradePrice, decimal CandleAccTradeVolume, string? FirstDayOfPeriod ); // 마켓 목록 public sealed record UpbitMarket( string Market, string KorName, string EngName, string? MarketWarning ); // Ticker 상세 (REST) public sealed record UpbitTickerDetail( string Market, decimal TradePrice, string Change, decimal SignedChangePrice, decimal SignedChangeRate, decimal OpeningPrice, decimal HighPrice, decimal LowPrice, decimal PrevClosingPrice, decimal AccTradePrice, decimal AccTradePrice24h, decimal AccTradeVolume, decimal AccTradeVolume24h, decimal Highest52WeekPrice, string Highest52WeekDate, decimal Lowest52WeekPrice, string Lowest52WeekDate, long Timestamp ); // 체결 내역 public sealed record UpbitTrade( string Market, string TradeDate, string TradeTime, long Timestamp, decimal TradePrice, decimal TradeVolume, decimal PrevClosingPrice, string AskBid, long SequentialId ); // 호가 public sealed record UpbitOrderbook( string Market, decimal TotalAskSize, decimal TotalBidSize, IReadOnlyList OrderbookUnits, long Timestamp ); public sealed record UpbitOrderbookUnit( decimal AskPrice, decimal BidPrice, decimal AskSize, decimal BidSize );