trading

package module
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssetStore added in v0.1.9

type AssetStore struct {
	// contains filtered or unexported fields
}

func NewAssetStore added in v0.1.9

func NewAssetStore(broker types.Broker) *AssetStore

func (*AssetStore) Get added in v0.1.9

func (store *AssetStore) Get(symbol string) (types.Asset, error)

type Core

type Core struct {
	// contains filtered or unexported fields
}

func NewCore

func NewCore(broker types.Broker) *Core

func (*Core) AddStrategy

func (c *Core) AddStrategy(strategies ...types.Strategy) error

func (*Core) Run

func (c *Core) Run() error

type LimitOrderStore

type LimitOrderStore struct {
	// contains filtered or unexported fields
}

func NewLimitOrderStore

func NewLimitOrderStore(broker types.Broker) *LimitOrderStore

func (*LimitOrderStore) Get

func (store *LimitOrderStore) Get(symbol string) []types.Order

func (*LimitOrderStore) WatchChanges

func (store *LimitOrderStore) WatchChanges() error

type MarketDataStore added in v0.0.4

type MarketDataStore struct {
	// contains filtered or unexported fields
}

func NewMarketDataStore added in v0.0.4

func NewMarketDataStore(broker types.Broker, symbols []string) *MarketDataStore

func (*MarketDataStore) OnQuote added in v0.0.7

func (store *MarketDataStore) OnQuote(handler func(types.Quote))

func (*MarketDataStore) WatchChanges added in v0.0.4

func (store *MarketDataStore) WatchChanges() error

type PositionStore

type PositionStore struct {
	// contains filtered or unexported fields
}

func NewPositionStore

func NewPositionStore(broker types.Broker, assetStore *AssetStore) *PositionStore

func (*PositionStore) Get

func (store *PositionStore) Get(symbol string) *types.Position

func (*PositionStore) WatchChanges

func (store *PositionStore) WatchChanges() error

type ScheduleStore

type ScheduleStore struct {
	// contains filtered or unexported fields
}

func NewScheduleStore

func NewScheduleStore(broker types.Broker) *ScheduleStore

func (*ScheduleStore) CurrentSession

func (store *ScheduleStore) CurrentSession(symbol string) (types.Session, error)

type Subscription

type Subscription struct {
	// contains filtered or unexported fields
}

func NewSubscription

func NewSubscription(scheduleStore *ScheduleStore, positionStore *PositionStore, limitOrderStore *LimitOrderStore, assetStore *AssetStore) *Subscription

func (*Subscription) AddStrategy

func (s *Subscription) AddStrategy(strategy types.Strategy) error

func (*Subscription) Broadcast

func (s *Subscription) Broadcast(broker types.Broker, quote types.Quote) error

func (*Subscription) Init

func (s *Subscription) Init(broker types.Broker) error

type SubscriptionStore

type SubscriptionStore struct {
	// contains filtered or unexported fields
}

func NewSubscriptionStore

func NewSubscriptionStore(broker types.Broker) *SubscriptionStore

func (*SubscriptionStore) AddStrategy

func (store *SubscriptionStore) AddStrategy(strategy types.Strategy) error

func (*SubscriptionStore) InitStrategies added in v0.0.4

func (store *SubscriptionStore) InitStrategies() error

func (*SubscriptionStore) SubscribeAndWatch

func (store *SubscriptionStore) SubscribeAndWatch() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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