Documentation ¶
Index ¶
- type MarketDataUpdate
- type Security
- func (s *Security) AddData(md MarketDataUpdate)
- func (s *Security) AskPrice() float64
- func (s *Security) AskString() string
- func (s *Security) BidPrice() float64
- func (s *Security) BidString() string
- func (s *Security) DchgString() string
- func (s *Security) FormatPrice(p float64) string
- func (s *Security) GetLastPrice() float64
- func (s *Security) GetSessionHighPrice() float64
- func (s *Security) GetSessionLowPrice() float64
- func (s *Security) GetSessionVolume() uint32
- func (s *Security) GetSettlementPrice() float64
- func (s *Security) GetSymbol() string
- func (s *Security) Hide()
- func (s *Security) IsHidden() bool
- func (s *Security) LastString() string
- func (s *Security) SettlementString() string
- func (s *Security) Show()
- func (s *Security) String() string
- type SecurityStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MarketDataUpdate ¶
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 FromDef ¶
func FromDef(def *dtcproto.SecurityDefinitionResponse) *Security
func (*Security) AddData ¶
func (s *Security) AddData(md MarketDataUpdate)
func (*Security) DchgString ¶
func (*Security) FormatPrice ¶
func (*Security) GetLastPrice ¶
func (*Security) GetSessionHighPrice ¶
func (*Security) GetSessionLowPrice ¶
func (*Security) GetSessionVolume ¶
func (*Security) GetSettlementPrice ¶
func (*Security) LastString ¶
func (*Security) SettlementString ¶
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
Click to show internal directories.
Click to hide internal directories.