Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Subscription ¶
Subscription is the struct for a tick subscription.
type Tick ¶
type Tick struct {
Time time.Time `json:"time"`
Pair string `json:"pair"`
Price float64 `json:"price"`
Exchange string `json:"exchange"`
}
Tick is the struct that will handle the ticks.
func FromCandlestick ¶
func FromCandlestick( exchange, pair string, currentPriceType candlestick.PriceType, t time.Time, cs candlestick.Candlestick, ) Tick
FromCandlestick creates a Tick from a candlestick.
func OnlyKeepEarliestSameTime ¶
func OnlyKeepEarliestSameTime(originals []Tick, endTime time.Time) (earliestTime time.Time, filtered []Tick)
OnlyKeepEarliestSameTime returns the earliest time and the ticks that have the same time as the earliest time.
func (Tick) MarshalBinary ¶
MarshalBinary marshals a Tick into a byte slice.
func (*Tick) UnmarshalBinary ¶
UnmarshalBinary unmarshals a byte slice into a Tick.
Click to show internal directories.
Click to hide internal directories.