Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DisableLog ¶
func DisableLog()
DisableLog disables all library log output. Logging output is disabled by default until UseLogger is called.
Types ¶
type AggTrade ¶
type AggTrade struct { EventType string `json:"e"` // Event type EventTime uint64 `json:"E"` // Event time Symbol string `json:"s"` // Symbol AggregateTradeID uint64 `json:"a"` // Aggregate trade ID Price string `json:"p"` // Price Quantity string `json:"q"` // Quantity FirstTradeID uint64 `json:"f"` // First trade ID LastTradeID uint64 `json:"l"` // Last trade ID TradeTime uint64 `json:"T"` // Trade time IsBuyer bool `json:"m"` // Is the buyer the market maker? Ignore bool `json:"M"` // Ignore }
func (*AggTrade) GetTradeTime ¶
type BinanceStream ¶
type BinanceStream struct { Pairs []TradingPair // contains filtered or unexported fields }
func NewBinanceStream ¶
func NewBinanceStream(callback func(symbol string, price TradingPrice), pairs ...TradingPair) (*BinanceStream, error)
func (*BinanceStream) GetTrade ¶
func (s *BinanceStream) GetTrade(pair TradingPair) TradingPrice
func (*BinanceStream) GetTradeBySymbol ¶
func (s *BinanceStream) GetTradeBySymbol(symbol string) TradingPrice
func (*BinanceStream) Run ¶
func (s *BinanceStream) Run(ctx context.Context)
type TradingPair ¶
type TradingPrice ¶
Click to show internal directories.
Click to hide internal directories.