obtest

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OBTest

type OBTest struct {
	strategy.StrategyActorBase // Embed StrategyBase for Actor + StrategyCommon
	// contains filtered or unexported fields
}

OBTest is a debugging strategy that subscribes to one orderbook and prints debug messages.

func NewOBTest

func NewOBTest(cat *catalog.Catalog, cache *cache.Cache, msgbus *msgbus.MsgBus) *OBTest

NewOBTest creates a new OBTest strategy.

func (*OBTest) Handle

func (o *OBTest) Handle(ev msgbus.Event, bus *msgbus.MsgBus)

Handle overrides StrategyBase.Handle to dispatch events to OBTest's typed callbacks. This is necessary because Go doesn't have virtual method dispatch.

func (*OBTest) OnDepthSnapshot

func (o *OBTest) OnDepthSnapshot(snapshot event.DepthSnapshot)

OnDepthSnapshot processes depth snapshots.

func (*OBTest) OnDepthUpdate

func (o *OBTest) OnDepthUpdate(update event.DepthUpdate)

OnDepthUpdate processes depth updates. Note: Snapshot requests are now handled automatically by DataEngine.

func (*OBTest) OnInit

func (o *OBTest) OnInit(config map[string]any)

OnInit initializes the strategy with configuration.

func (*OBTest) OnRespDepthSnapshot

func (o *OBTest) OnRespDepthSnapshot(snapshot event.RespDepthSnapshot)

OnReqDepthSnapshot processes the response to a depth snapshot request.

func (*OBTest) OnStart

func (o *OBTest) OnStart()

OnStart is called when the strategy starts. Note: Data subscriptions are now handled by the config - no manual Subscribe/Connect needed.

func (*OBTest) OnStop

func (o *OBTest) OnStop()

OnStop is called when the strategy stops.

type OBTestConfig

type OBTestConfig struct {
	SymbolUniversalTicker string `yaml:"symbol_universal_ticker"`
}

OBTestConfig is the configuration for the OBTest strategy.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL