123456789101112131415161718192021222324252627282930 |
- package sentio
- type Position interface {
- // GetSize returns the total size of the position
- GetSize() float64
- // GetAvgPrice returns the average cost of each share in the position when purchased
- GetAvgPrice() float64
- // GetSymbol returns the ticker symbol of the traded contract
- GetSymbol() string
- }
- type PositionStub struct {
- Symbol string
- Size float64
- Price float64
- }
- func (p PositionStub) GetSize() float64 {
- return p.Size
- }
- func (p PositionStub) GetAvgPrice() float64 {
- return p.Price
- }
- func (p PositionStub) GetSymbol() string {
- return p.Symbol
- }
|