Documentation ¶
Index ¶
- type BacktestService
- func (s *BacktestService) Insert(kline types.KLine) error
- func (s *BacktestService) QueryKLinesBackward(exchange types.ExchangeName, symbol string, interval types.Interval, ...) ([]types.KLine, error)
- func (s *BacktestService) QueryKLinesCh(since, until time.Time, exchange types.Exchange, symbols []string, ...) (chan types.KLine, chan error)
- func (s *BacktestService) QueryKLinesForward(exchange types.ExchangeName, symbol string, interval types.Interval, ...) ([]types.KLine, error)
- func (s *BacktestService) QueryLast(ex types.ExchangeName, symbol string, interval types.Interval) (*types.KLine, error)
- func (s *BacktestService) Sync(ctx context.Context, exchange types.Exchange, symbol string, ...) error
- type OrderService
- type SyncService
- type TradeService
- func (s *TradeService) Insert(trade types.Trade) error
- func (s *TradeService) Query(ex types.ExchangeName, symbol string) ([]types.Trade, error)
- func (s *TradeService) QueryForTradingFeeCurrency(ex types.ExchangeName, symbol string, feeCurrency string) ([]types.Trade, error)
- func (s *TradeService) QueryLast(ex types.ExchangeName, symbol string) (*types.Trade, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BacktestService ¶
func (*BacktestService) QueryKLinesBackward ¶
func (*BacktestService) QueryKLinesCh ¶
func (*BacktestService) QueryKLinesForward ¶
type OrderService ¶
func (*OrderService) Query ¶
func (s *OrderService) Query(ex types.ExchangeName, symbol string) ([]types.Order, error)
func (*OrderService) QueryLast ¶
func (s *OrderService) QueryLast(ex types.ExchangeName, symbol string) (*types.Order, error)
QueryLast queries the last order from the database
type SyncService ¶
type SyncService struct { TradeService *TradeService OrderService *OrderService }
func (*SyncService) SyncOrders ¶
type TradeService ¶
func NewTradeService ¶
func NewTradeService(db *sqlx.DB) *TradeService
func (*TradeService) Query ¶
func (s *TradeService) Query(ex types.ExchangeName, symbol string) ([]types.Trade, error)
func (*TradeService) QueryForTradingFeeCurrency ¶
func (s *TradeService) QueryForTradingFeeCurrency(ex types.ExchangeName, symbol string, feeCurrency string) ([]types.Trade, error)
func (*TradeService) QueryLast ¶
func (s *TradeService) QueryLast(ex types.ExchangeName, symbol string) (*types.Trade, error)
QueryLast queries the last trade from the database
Click to show internal directories.
Click to hide internal directories.