| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- namespace Application.Abstractions.Crypto;
- public interface IUpbitClient
- {
- // Candle
- Task<IReadOnlyList<UpbitCandle>> GetSecondCandlesAsync(string market, int count, CancellationToken ct = default);
- Task<IReadOnlyList<UpbitCandle>> GetMinuteCandlesAsync(string market, int unit, int count, CancellationToken ct = default);
- Task<IReadOnlyList<UpbitCandle>> GetDayCandlesAsync(string market, int count, CancellationToken ct = default);
- Task<IReadOnlyList<UpbitCandle>> GetWeekCandlesAsync(string market, int count, CancellationToken ct = default);
- Task<IReadOnlyList<UpbitCandle>> GetMonthCandlesAsync(string market, int count, CancellationToken ct = default);
- Task<IReadOnlyList<UpbitCandle>> GetYearCandlesAsync(string market, int count, CancellationToken ct = default);
- // Market
- Task<IReadOnlyList<UpbitMarket>> GetMarketsAsync(CancellationToken ct = default);
- // Ticker (상세)
- Task<IReadOnlyList<UpbitTickerDetail>> GetTickersAsync(string[] markets, CancellationToken ct = default);
- // Trade (체결)
- Task<IReadOnlyList<UpbitTrade>> GetTradesAsync(string market, int count, CancellationToken ct = default);
- // Orderbook (호가)
- Task<IReadOnlyList<UpbitOrderbook>> 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<UpbitOrderbookUnit> OrderbookUnits,
- long Timestamp
- );
- public sealed record UpbitOrderbookUnit(
- decimal AskPrice,
- decimal BidPrice,
- decimal AskSize,
- decimal BidSize
- );
|