securities

package
v0.0.0-...-1912e75 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2021 License: OSL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MarketDataUpdate

type MarketDataUpdate struct {
	Msg    proto.Message
	TypeId int32
}

type Security

type Security struct {
	Definition                *dtcproto.SecurityDefinitionResponse
	BidDepth                  map[int]int
	AskDepth                  map[int]int
	Bid                       float64
	Ask                       float64
	Last                      float64
	SettlementPrice           float64
	SessionSettlementDateTime uint32
	TradingSessionDate        uint32
	SessionOpenPrice          float64
	SessionHighPrice          float64
	SessionLowPrice           float64
	SessionVolume             uint32
	SessionNumTrades          uint32
	OpenInterest              uint32
	LastData                  float64
	LastTradeVolume           uint32
	LastSide                  string
	AddingDataMutex           sync.Mutex
	// contains filtered or unexported fields
}

func (*Security) AddData

func (s *Security) AddData(md MarketDataUpdate)

func (*Security) AskPrice

func (s *Security) AskPrice() float64

func (*Security) AskString

func (s *Security) AskString() string

func (*Security) BidPrice

func (s *Security) BidPrice() float64

func (*Security) BidString

func (s *Security) BidString() string

func (*Security) DchgString

func (s *Security) DchgString() string

func (*Security) FormatPrice

func (s *Security) FormatPrice(p float64) string

func (*Security) GetLastPrice

func (s *Security) GetLastPrice() float64

func (*Security) GetSessionHighPrice

func (s *Security) GetSessionHighPrice() float64

func (*Security) GetSessionLowPrice

func (s *Security) GetSessionLowPrice() float64

func (*Security) GetSessionVolume

func (s *Security) GetSessionVolume() uint32

func (*Security) GetSettlementPrice

func (s *Security) GetSettlementPrice() float64

func (*Security) GetSymbol

func (s *Security) GetSymbol() string

func (*Security) Hide

func (s *Security) Hide()

func (*Security) IsHidden

func (s *Security) IsHidden() bool

func (*Security) LastString

func (s *Security) LastString() string

func (*Security) SettlementString

func (s *Security) SettlementString() string

func (*Security) Show

func (s *Security) Show()

func (*Security) String

func (s *Security) String() string

type SecurityStore

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

func NewSecurityStore

func NewSecurityStore() *SecurityStore

func (*SecurityStore) AddData

func (ss *SecurityStore) AddData(secData MarketDataUpdate)

func (*SecurityStore) AddSecurity

func (ss *SecurityStore) AddSecurity(sec *Security)

func (*SecurityStore) GetSecurityBySymbol

func (ss *SecurityStore) GetSecurityBySymbol(symb string) *Security

func (*SecurityStore) GetSymbols

func (ss *SecurityStore) GetSymbols() []string

Jump to

Keyboard shortcuts

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