Documentation ¶
Index ¶
- type CandleStickService
- func (s *CandleStickService) Do(ctx context.Context) ([]models.CandleStick, error)
- func (s *CandleStickService) EndTime(endTime time.Time) CandleStickServiceInterface
- func (s *CandleStickService) Limit(limit int) CandleStickServiceInterface
- func (s *CandleStickService) Period(period int64) CandleStickServiceInterface
- func (s *CandleStickService) Symbol(symbol string) CandleStickServiceInterface
- type CandleStickServiceInterface
- type Service
- type ServiceInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CandleStickService ¶
type CandleStickService struct {
// contains filtered or unexported fields
}
CandleStickService is the real service for candlesticks
func (*CandleStickService) Do ¶
func (s *CandleStickService) Do(ctx context.Context) ([]models.CandleStick, error)
Do will execute a request for candlesticks
func (*CandleStickService) EndTime ¶
func (s *CandleStickService) EndTime(endTime time.Time) CandleStickServiceInterface
EndTime will specify the time where the list ends (earliest time) for next candlesticks request
func (*CandleStickService) Limit ¶
func (s *CandleStickService) Limit(limit int) CandleStickServiceInterface
Limit will specify the number of candlesticks the list should have at its maximum If the limit is higher than the default limit, it will be limited to this one
func (*CandleStickService) Period ¶
func (s *CandleStickService) Period(period int64) CandleStickServiceInterface
Period will specify a period for next candlesticks request
func (*CandleStickService) Symbol ¶
func (s *CandleStickService) Symbol(symbol string) CandleStickServiceInterface
Symbol will specify a symbol for next candlesticks request
type CandleStickServiceInterface ¶
type CandleStickServiceInterface interface { Do(ctx context.Context) ([]models.CandleStick, error) Symbol(symbol string) CandleStickServiceInterface Period(period int64) CandleStickServiceInterface EndTime(endTime time.Time) CandleStickServiceInterface Limit(limit int) CandleStickServiceInterface }
CandleStickServiceInterface is the interface for candle stick services
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service represents the real Binance service
func (*Service) NewCandleStickService ¶
func (s *Service) NewCandleStickService() CandleStickServiceInterface
NewCandleStickService will create a new real candlestick service
type ServiceInterface ¶
type ServiceInterface interface {
NewCandleStickService() CandleStickServiceInterface
}
Interface is an interface for service
func New ¶
func New(apiKey, secretKey string) ServiceInterface
New will create a new real binance service