mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-15 03:23:52 +00:00
36 lines
769 B
Go
36 lines
769 B
Go
// Code generated by "callbackgen -type Stream"; DO NOT EDIT.
|
|
|
|
package bybit
|
|
|
|
import ()
|
|
|
|
func (s *Stream) OnBookEvent(cb func(e BookEvent)) {
|
|
s.bookEventCallbacks = append(s.bookEventCallbacks, cb)
|
|
}
|
|
|
|
func (s *Stream) EmitBookEvent(e BookEvent) {
|
|
for _, cb := range s.bookEventCallbacks {
|
|
cb(e)
|
|
}
|
|
}
|
|
|
|
func (s *Stream) OnWalletEvent(cb func(e []*WalletEvent)) {
|
|
s.walletEventCallbacks = append(s.walletEventCallbacks, cb)
|
|
}
|
|
|
|
func (s *Stream) EmitWalletEvent(e []*WalletEvent) {
|
|
for _, cb := range s.walletEventCallbacks {
|
|
cb(e)
|
|
}
|
|
}
|
|
|
|
func (s *Stream) OnOrderEvent(cb func(e []*OrderEvent)) {
|
|
s.orderEventCallbacks = append(s.orderEventCallbacks, cb)
|
|
}
|
|
|
|
func (s *Stream) EmitOrderEvent(e []*OrderEvent) {
|
|
for _, cb := range s.orderEventCallbacks {
|
|
cb(e)
|
|
}
|
|
}
|