Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Aggregator ¶
type Aggregator struct {
// contains filtered or unexported fields
}
func NewAggregator ¶
func NewAggregator(options Options, formatter Formatter) *Aggregator
NewAggregator creates a new default clients
func (*Aggregator) Close ¶
func (c *Aggregator) Close() error
func (*Aggregator) Register ¶
func (c *Aggregator) Register(format ...string) error
Register adds a new markets. The format is exchange:marketname
func (*Aggregator) SetFormatter ¶
func (c *Aggregator) SetFormatter(formatter Formatter)
func (*Aggregator) Start ¶
func (c *Aggregator) Start()
type Exchange ¶
type Exchange interface { // Register a market to listen for price changes Register(base string, quote string) error // Start listening for price changes in the registered markets Start(ctx context.Context, update chan<- Market) error }
Exchange listens for price changes in realtime
func NewBinance ¶
func NewBinance() Exchange
Click to show internal directories.
Click to hide internal directories.