package usecase import ( "context" "cryptoHermes/internal/entity" ) type MarketDataProvider interface { GetKlines(ctx context.Context, symbol, interval string, limit int) ([]entity.Kline, error) GetKlinesRange(ctx context.Context, symbol, interval string, startMs, endMs int64, limit int) ([]entity.Kline, error) GetTicker24h(ctx context.Context, symbol string) (*entity.Ticker24h, error) } type DerivativesProvider interface { GetCurrentFunding(ctx context.Context, symbol string) (*entity.FundingRate, error) GetFundingHistory(ctx context.Context, symbol string, limit int) ([]entity.FundingRate, error) GetCurrentOpenInterest(ctx context.Context, symbol string) (*entity.OpenInterest, error) GetOpenInterestHistory(ctx context.Context, symbol, period string, limit int) ([]entity.OpenInterest, error) GetGlobalLongShortRatio(ctx context.Context, symbol, period string, limit int) ([]entity.LongShortRatio, error) GetTopTraderPositionRatio(ctx context.Context, symbol, period string, limit int) ([]entity.LongShortRatio, error) GetTakerBuySellVolume(ctx context.Context, symbol, period string, limit int) ([]entity.TakerBuySellVolume, error) } type KlineRepository interface { UpsertMany(ctx context.Context, items []entity.Kline) error FindRecent(ctx context.Context, symbol, interval string, limit int) ([]entity.Kline, error) } type FundingRepository interface { UpsertMany(ctx context.Context, items []entity.FundingRate) error FindRecent(ctx context.Context, symbol string, limit int) ([]entity.FundingRate, error) } type OpenInterestRepository interface { UpsertMany(ctx context.Context, items []entity.OpenInterest) error FindRecent(ctx context.Context, symbol, period string, limit int) ([]entity.OpenInterest, error) } type LongShortRatioRepository interface { UpsertMany(ctx context.Context, items []entity.LongShortRatio) error FindRecent(ctx context.Context, symbol, period, ratioType string, limit int) ([]entity.LongShortRatio, error) } type TakerVolumeRepository interface { UpsertMany(ctx context.Context, items []entity.TakerBuySellVolume) error FindRecent(ctx context.Context, symbol, period string, limit int) ([]entity.TakerBuySellVolume, error) }