mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 17:13:51 +00:00
56 lines
1.3 KiB
Go
56 lines
1.3 KiB
Go
// Code generated by "callbackgen -type Stream"; DO NOT EDIT.
|
|
|
|
package bitget
|
|
|
|
import ()
|
|
|
|
func (s *Stream) OnBookEvent(cb func(o BookEvent)) {
|
|
s.bookEventCallbacks = append(s.bookEventCallbacks, cb)
|
|
}
|
|
|
|
func (s *Stream) EmitBookEvent(o BookEvent) {
|
|
for _, cb := range s.bookEventCallbacks {
|
|
cb(o)
|
|
}
|
|
}
|
|
|
|
func (s *Stream) OnMarketTradeEvent(cb func(o MarketTradeEvent)) {
|
|
s.marketTradeEventCallbacks = append(s.marketTradeEventCallbacks, cb)
|
|
}
|
|
|
|
func (s *Stream) EmitMarketTradeEvent(o MarketTradeEvent) {
|
|
for _, cb := range s.marketTradeEventCallbacks {
|
|
cb(o)
|
|
}
|
|
}
|
|
|
|
func (s *Stream) OnKLineEvent(cb func(o KLineEvent)) {
|
|
s.KLineEventCallbacks = append(s.KLineEventCallbacks, cb)
|
|
}
|
|
|
|
func (s *Stream) EmitKLineEvent(o KLineEvent) {
|
|
for _, cb := range s.KLineEventCallbacks {
|
|
cb(o)
|
|
}
|
|
}
|
|
|
|
func (s *Stream) OnAccountEvent(cb func(e AccountEvent)) {
|
|
s.accountEventCallbacks = append(s.accountEventCallbacks, cb)
|
|
}
|
|
|
|
func (s *Stream) EmitAccountEvent(e AccountEvent) {
|
|
for _, cb := range s.accountEventCallbacks {
|
|
cb(e)
|
|
}
|
|
}
|
|
|
|
func (s *Stream) OnOrderTradeEvent(cb func(e OrderTradeEvent)) {
|
|
s.orderTradeEventCallbacks = append(s.orderTradeEventCallbacks, cb)
|
|
}
|
|
|
|
func (s *Stream) EmitOrderTradeEvent(e OrderTradeEvent) {
|
|
for _, cb := range s.orderTradeEventCallbacks {
|
|
cb(e)
|
|
}
|
|
}
|