// Code generated by "callbackgen -type Stream"; DO NOT EDIT.

package bitfinex

import (
	"github.com/c9s/bbgo/pkg/exchange/bitfinex/bfxapi"
)

func (s *Stream) OnResponse(cb func(resp *bfxapi.WebSocketResponse)) {
	s.responseCallbacks = append(s.responseCallbacks, cb)
}

func (s *Stream) EmitResponse(resp *bfxapi.WebSocketResponse) {
	for _, cb := range s.responseCallbacks {
		cb(resp)
	}
}

func (s *Stream) OnHeartBeat(cb func(e *bfxapi.HeartBeatEvent)) {
	s.heartBeatCallbacks = append(s.heartBeatCallbacks, cb)
}

func (s *Stream) EmitHeartBeat(e *bfxapi.HeartBeatEvent) {
	for _, cb := range s.heartBeatCallbacks {
		cb(e)
	}
}

func (s *Stream) OnTickerEvent(cb func(e *bfxapi.TickerEvent)) {
	s.tickerEventCallbacks = append(s.tickerEventCallbacks, cb)
}

func (s *Stream) EmitTickerEvent(e *bfxapi.TickerEvent) {
	for _, cb := range s.tickerEventCallbacks {
		cb(e)
	}
}

func (s *Stream) OnCandleSnapshotEvent(cb func(e *bfxapi.CandleSnapshotEvent)) {
	s.candleSnapshotEventCallbacks = append(s.candleSnapshotEventCallbacks, cb)
}

func (s *Stream) EmitCandleSnapshotEvent(e *bfxapi.CandleSnapshotEvent) {
	for _, cb := range s.candleSnapshotEventCallbacks {
		cb(e)
	}
}

func (s *Stream) OnCandleEvent(cb func(e *bfxapi.CandleEvent)) {
	s.candleEventCallbacks = append(s.candleEventCallbacks, cb)
}

func (s *Stream) EmitCandleEvent(e *bfxapi.CandleEvent) {
	for _, cb := range s.candleEventCallbacks {
		cb(e)
	}
}

func (s *Stream) OnStatusEvent(cb func(e *bfxapi.StatusEvent)) {
	s.statusEventCallbacks = append(s.statusEventCallbacks, cb)
}

func (s *Stream) EmitStatusEvent(e *bfxapi.StatusEvent) {
	for _, cb := range s.statusEventCallbacks {
		cb(e)
	}
}

func (s *Stream) OnPublicTradeEvent(cb func(e *bfxapi.PublicTradeEvent)) {
	s.publicTradeEventCallbacks = append(s.publicTradeEventCallbacks, cb)
}

func (s *Stream) EmitPublicTradeEvent(e *bfxapi.PublicTradeEvent) {
	for _, cb := range s.publicTradeEventCallbacks {
		cb(e)
	}
}

func (s *Stream) OnPublicTradeSnapshotEvent(cb func(e *bfxapi.PublicTradeSnapshotEvent)) {
	s.publicTradeSnapshotEventCallbacks = append(s.publicTradeSnapshotEventCallbacks, cb)
}

func (s *Stream) EmitPublicTradeSnapshotEvent(e *bfxapi.PublicTradeSnapshotEvent) {
	for _, cb := range s.publicTradeSnapshotEventCallbacks {
		cb(e)
	}
}

func (s *Stream) OnPublicFundingTradeEvent(cb func(e *bfxapi.PublicFundingTradeEvent)) {
	s.publicFundingTradeEventCallbacks = append(s.publicFundingTradeEventCallbacks, cb)
}

func (s *Stream) EmitPublicFundingTradeEvent(e *bfxapi.PublicFundingTradeEvent) {
	for _, cb := range s.publicFundingTradeEventCallbacks {
		cb(e)
	}
}

func (s *Stream) OnPublicFundingTradeSnapshotEvent(cb func(e *bfxapi.PublicFundingTradeSnapshotEvent)) {
	s.publicFundingTradeSnapshotEventCallbacks = append(s.publicFundingTradeSnapshotEventCallbacks, cb)
}

func (s *Stream) EmitPublicFundingTradeSnapshotEvent(e *bfxapi.PublicFundingTradeSnapshotEvent) {
	for _, cb := range s.publicFundingTradeSnapshotEventCallbacks {
		cb(e)
	}
}

func (s *Stream) OnBookUpdateEvent(cb func(e *bfxapi.BookUpdateEvent)) {
	s.bookUpdateEventCallbacks = append(s.bookUpdateEventCallbacks, cb)
}

func (s *Stream) EmitBookUpdateEvent(e *bfxapi.BookUpdateEvent) {
	for _, cb := range s.bookUpdateEventCallbacks {
		cb(e)
	}
}

func (s *Stream) OnBookSnapshotEvent(cb func(e *bfxapi.BookSnapshotEvent)) {
	s.bookSnapshotEventCallbacks = append(s.bookSnapshotEventCallbacks, cb)
}

func (s *Stream) EmitBookSnapshotEvent(e *bfxapi.BookSnapshotEvent) {
	for _, cb := range s.bookSnapshotEventCallbacks {
		cb(e)
	}
}

func (s *Stream) OnFundingBookEvent(cb func(e *bfxapi.FundingBookUpdateEvent)) {
	s.fundingBookEventCallbacks = append(s.fundingBookEventCallbacks, cb)
}

func (s *Stream) EmitFundingBookEvent(e *bfxapi.FundingBookUpdateEvent) {
	for _, cb := range s.fundingBookEventCallbacks {
		cb(e)
	}
}

func (s *Stream) OnFundingBookSnapshotEvent(cb func(e *bfxapi.FundingBookSnapshotEvent)) {
	s.fundingBookSnapshotEventCallbacks = append(s.fundingBookSnapshotEventCallbacks, cb)
}

func (s *Stream) EmitFundingBookSnapshotEvent(e *bfxapi.FundingBookSnapshotEvent) {
	for _, cb := range s.fundingBookSnapshotEventCallbacks {
		cb(e)
	}
}

func (s *Stream) OnWalletSnapshotEvent(cb func(e *bfxapi.WalletSnapshotEvent)) {
	s.walletSnapshotEventCallbacks = append(s.walletSnapshotEventCallbacks, cb)
}

func (s *Stream) EmitWalletSnapshotEvent(e *bfxapi.WalletSnapshotEvent) {
	for _, cb := range s.walletSnapshotEventCallbacks {
		cb(e)
	}
}

func (s *Stream) OnWalletUpdateEvent(cb func(e *bfxapi.Wallet)) {
	s.walletUpdateEventCallbacks = append(s.walletUpdateEventCallbacks, cb)
}

func (s *Stream) EmitWalletUpdateEvent(e *bfxapi.Wallet) {
	for _, cb := range s.walletUpdateEventCallbacks {
		cb(e)
	}
}

func (s *Stream) OnPositionSnapshotEvent(cb func(e *bfxapi.UserPositionSnapshotEvent)) {
	s.positionSnapshotEventCallbacks = append(s.positionSnapshotEventCallbacks, cb)
}

func (s *Stream) EmitPositionSnapshotEvent(e *bfxapi.UserPositionSnapshotEvent) {
	for _, cb := range s.positionSnapshotEventCallbacks {
		cb(e)
	}
}

func (s *Stream) OnPositionUpdateEvent(cb func(e *bfxapi.UserPosition)) {
	s.positionUpdateEventCallbacks = append(s.positionUpdateEventCallbacks, cb)
}

func (s *Stream) EmitPositionUpdateEvent(e *bfxapi.UserPosition) {
	for _, cb := range s.positionUpdateEventCallbacks {
		cb(e)
	}
}

func (s *Stream) OnOrderSnapshotEvent(cb func(e *bfxapi.UserOrderSnapshotEvent)) {
	s.orderSnapshotEventCallbacks = append(s.orderSnapshotEventCallbacks, cb)
}

func (s *Stream) EmitOrderSnapshotEvent(e *bfxapi.UserOrderSnapshotEvent) {
	for _, cb := range s.orderSnapshotEventCallbacks {
		cb(e)
	}
}

func (s *Stream) OnOrderUpdateEvent(cb func(e *bfxapi.UserOrder)) {
	s.orderUpdateEventCallbacks = append(s.orderUpdateEventCallbacks, cb)
}

func (s *Stream) EmitOrderUpdateEvent(e *bfxapi.UserOrder) {
	for _, cb := range s.orderUpdateEventCallbacks {
		cb(e)
	}
}

func (s *Stream) OnTradeUpdateEvent(cb func(e *bfxapi.TradeUpdateEvent)) {
	s.tradeUpdateEventCallbacks = append(s.tradeUpdateEventCallbacks, cb)
}

func (s *Stream) EmitTradeUpdateEvent(e *bfxapi.TradeUpdateEvent) {
	for _, cb := range s.tradeUpdateEventCallbacks {
		cb(e)
	}
}

func (s *Stream) OnBalanceUpdateEvent(cb func(e *bfxapi.BalanceUpdateEvent)) {
	s.balanceUpdateEventCallbacks = append(s.balanceUpdateEventCallbacks, cb)
}

func (s *Stream) EmitBalanceUpdateEvent(e *bfxapi.BalanceUpdateEvent) {
	for _, cb := range s.balanceUpdateEventCallbacks {
		cb(e)
	}
}
