Versions in this module Expand all Collapse all v1 v1.0.2 May 13, 2021 v1.0.0 Feb 1, 2021 Changes in this version + func EnsureValueOracle() error + func SetRequestValue(id string, at time.Time, info PriceInfo) + type PriceInfo struct + Price float64 + Volume float64 + type PriceStamp struct + Created time.Time + func GetNearestTwoRequestValue(id string, at time.Time) (before, after *PriceStamp) + func GetRequestValuesForTime(id string, at time.Time, delta time.Duration) []*PriceStamp + type Window struct + func NewWindow(keep time.Duration) *Window + func (w *Window) Clear() + func (w *Window) ClosestTwo(at time.Time) (before, after *PriceStamp) + func (w *Window) Insert(x *PriceStamp) + func (w *Window) Latest() *PriceStamp + func (w *Window) Len() int + func (w *Window) MarshalJSON() ([]byte, error) + func (w *Window) Trim() + func (w *Window) UnmarshalJSON(b []byte) error + func (w *Window) WithinRange(at time.Time, delta time.Duration) []*PriceStamp