Documentation ¶
Index ¶
- Variables
- func NewSymbolInterval(class Class, symbol, interval string) *symbolInterval
- func RateWait(ctx context.Context, class Class, method, path string, query url.Values)
- type BookTicker
- type Class
- type Depth
- type DepthSrv
- type ExchangeInfoSrv
- type Kline
- type KlinesSrv
- type Service
- type Ticker24hr
- type TickerSrv
Constants ¶
This section is empty.
Variables ¶
View Source
var ( SpotLimiter = rate.NewLimiter(20, 1200) FuturesLimiter = rate.NewLimiter(40, 2400) )
View Source
var INTERVAL_2_DURATION = map[string]time.Duration{ "1m": 1 * time.Minute, "3m": 3 * time.Minute, "5m": 5 * time.Minute, "15m": 15 * time.Minute, "30m": 30 * time.Minute, "1h": 1 * time.Hour, "2h": 2 * time.Hour, "4h": 4 * time.Hour, "6h": 6 * time.Hour, "8h": 8 * time.Hour, "12h": 12 * time.Hour, "1d": 1 * 24 * time.Hour, "3d": 3 * 24 * time.Hour, "1w": 7 * 24 * time.Hour, "1M": 31 * 24 * time.Hour, }
Functions ¶
func NewSymbolInterval ¶
Types ¶
type BookTicker ¶
type DepthSrv ¶
type DepthSrv struct {
// contains filtered or unexported fields
}
func NewDepthSrv ¶
type ExchangeInfoSrv ¶
type ExchangeInfoSrv struct {
// contains filtered or unexported fields
}
func NewExchangeInfoSrv ¶
func NewExchangeInfoSrv(ctx context.Context, si *symbolInterval) *ExchangeInfoSrv
func (*ExchangeInfoSrv) GetExchangeInfo ¶
func (s *ExchangeInfoSrv) GetExchangeInfo() []byte
func (*ExchangeInfoSrv) Start ¶
func (s *ExchangeInfoSrv) Start()
type KlinesSrv ¶
type KlinesSrv struct {
// contains filtered or unexported fields
}
func NewKlinesSrv ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) ExchangeInfo ¶
func (*Service) Ticker ¶
func (s *Service) Ticker(symbol string) *Ticker24hr
type Ticker24hr ¶
type Ticker24hr struct { Symbol string `json:"symbol"` PriceChange string `json:"priceChange"` PriceChangePercent string `json:"priceChangePercent"` WeightedAvgPrice string `json:"weightedAvgPrice"` PrevClosePrice string `json:"prevClosePrice"` LastPrice string `json:"lastPrice"` LastQty string `json:"lastQty"` BidPrice string `json:"bidPrice"` AskPrice string `json:"askPrice"` OpenPrice string `json:"openPrice"` HighPrice string `json:"highPrice"` LowPrice string `json:"lowPrice"` Volume string `json:"volume"` QuoteVolume string `json:"quoteVolume"` OpenTime int64 `json:"openTime"` CloseTime int64 `json:"closeTime"` FirstID int64 `json:"firstId"` LastID int64 `json:"lastId"` Count int64 `json:"count"` }
type TickerSrv ¶
type TickerSrv struct {
// contains filtered or unexported fields
}
func NewTickerSrv ¶
func (*TickerSrv) GetTicker ¶
func (s *TickerSrv) GetTicker() *Ticker24hr
Click to show internal directories.
Click to hide internal directories.