blockchain/internal/domain/repository/data_source.go

24 lines
533 B
Go
Raw Normal View History

2025-08-04 08:58:30 +00:00
package repository
import (
"blockchain/internal/domain/entity"
"context"
)
type DataSourceRepository interface {
2025-08-04 14:02:01 +00:00
GetSymbols(ctx context.Context) ([]*entity.Symbol, error)
2025-08-04 17:01:27 +00:00
KlineDownloader
}
type KlineDownloader interface {
// FetchHistoryKline 抓歷史K線資料startMillis=0 表示從最早endMillis=0 表示到最新
2025-08-05 14:11:01 +00:00
FetchHistoryKline(ctx context.Context, param QueryKline) ([]*entity.Kline, error)
}
type QueryKline struct {
Symbol string
Interval string
StartUnixNano int64
EndUnixNano int64
2025-08-04 08:58:30 +00:00
}