Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DistributionStats ¶
type DistributionStats struct { PriceLevels []string `json:"priceLevels"` TotalQuantity fixedpoint.Value `json:"totalQuantity"` Quantities map[string]fixedpoint.Value `json:"quantities"` Stocks map[string]StockSlice `json:"stocks"` }
type Stock ¶
func (*Stock) Consume ¶
func (stock *Stock) Consume(quantity fixedpoint.Value) fixedpoint.Value
type StockDistribution ¶
type StockDistribution struct { Symbol string TradingFeeCurrency string Stocks StockSlice PendingSells StockSlice // contains filtered or unexported fields }
func (*StockDistribution) AddTrades ¶
func (m *StockDistribution) AddTrades(trades []types.Trade) (checkpoints []int, err error)
func (*StockDistribution) DistributionStats ¶
func (m *StockDistribution) DistributionStats(level int) *DistributionStats
type StockSlice ¶
type StockSlice []Stock
func (StockSlice) Quantity ¶
func (slice StockSlice) Quantity() (total fixedpoint.Value)
func (StockSlice) QuantityBelowPrice ¶
func (slice StockSlice) QuantityBelowPrice(price fixedpoint.Value) (quantity fixedpoint.Value)
Click to show internal directories.
Click to hide internal directories.