binance

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 13, 2021 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

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

EndTime will specify the time where the list ends (earliest time) for next candlesticks request

func (*CandleStickService) Limit

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

Period will specify a period for next candlesticks request

func (*CandleStickService) Symbol

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL