Versions in this module Expand all Collapse all v1 v1.1.6 Nov 19, 2026 v1.1.5 Nov 18, 2026 v1.1.4 Nov 16, 2026 v1.1.3 Nov 3, 2026 v1.1.2 Nov 2, 2026 Changes in this version + var ErrUnknownIdentifier = errors.New("unknown identifier") + func ChannelTWAPCalls(optsCache *protocol.OptsCache, cd llotypes.ChannelDefinition, ...) int + type ExpressionPins struct + func NewExpressionPins() *ExpressionPins + func (p *ExpressionPins) Release() + func (p *ExpressionPins) Set(optsCache *protocol.OptsCache, channelDefinitions llotypes.ChannelDefinitions) v1.1.1 Aug 26, 2026 Changes in this version + const HistoryFunctionName + var ErrHistoryExpression = errors.New("invalid History expression") + var ErrInsufficientHistory = protocol.ErrInsufficientStreamHistory + var ErrSeriesAsScalar = errors.New("history window cannot be used as a scalar") + var ErrTWAPConfig = errors.New("invalid TWAP configuration") + var ErrTWAPRejected = errors.New("TWAP window rejected by the acceptance rule") + func AggregatorByStream(cd llotypes.ChannelDefinition) (map[llotypes.StreamID]llotypes.Aggregator, error) + func Count(x any) (decimal.Decimal, error) + func Delta(x any) (decimal.Decimal, error) + func EMA(x any, n any) (decimal.Decimal, error) + func ExpressionStreamIDs(optsCache *protocol.OptsCache, cd llotypes.ChannelDefinition, ...) ([]llotypes.StreamID, error) + func Expressions(optsCache *protocol.OptsCache, cd llotypes.ChannelDefinition, ...) ([]string, error) + func First(x any) (decimal.Decimal, error) + func Last(x any) (decimal.Decimal, error) + func Median(x any) (decimal.Decimal, error) + func PctChange(x any) (decimal.Decimal, error) + func ProcessCalculatedStreamsWithDefinitionAppend(lggr logger.Logger, channelDefinitions llotypes.ChannelDefinitions, ...) + func SMA(x any, n any) (decimal.Decimal, error) + func Spread(x any) (decimal.Decimal, error) + func Stddev(x any) (decimal.Decimal, error) + func Sum(x ...any) (decimal.Decimal, error) + func ValidateChannelExpressions(optsCache *protocol.OptsCache, cd llotypes.ChannelDefinition, ...) error + func ValidateExpression(expression string) error + func Variance(x any) (decimal.Decimal, error) + func WMA(x any, n any) (decimal.Decimal, error) + type Field uint8 + const FieldAsk + const FieldBenchmark + const FieldBid + const FieldValue + func (f Field) String() string + type HistoryReader interface + Series func(streamID llotypes.StreamID, aggregator llotypes.Aggregator, count uint32, ...) (Series, error) + type HistoryRef struct + Count uint32 + Field Field + StreamID llotypes.StreamID + func AnalyzeExpressionHistory(expression string) ([]HistoryRef, error) + func (r HistoryRef) String() string + type Series struct + func NewSeries(values []decimal.Decimal, timestamps []uint64) (Series, error) + func SeriesFromRecords(records []protocol.StreamHistoryRecord, field Field) (Series, error) + func (s Series) Len() int + func (s Series) Newest() (decimal.Decimal, error) + func (s Series) Oldest() (decimal.Decimal, error) + func (s Series) String() string + func (s Series) Timestamps() []uint64 + func (s Series) Values() []decimal.Decimal + type TWAPRejection struct + Ghead int + Gint int + Gtail int + M int + MaxHeadGap int + MaxInteriorGap int + MaxTailGap int + MinSamples int + Reasons []TWAPRejectionReason + Records int + WindowEndSeconds int64 + WindowStartSeconds int64 + func (e *TWAPRejection) Error() string + func (e *TWAPRejection) Is(target error) bool + type TWAPRejectionReason string + const ReasonHeadGapTooLong + const ReasonInsufficientSamples + const ReasonInteriorGapTooLong + const ReasonTailGapTooLong v1.1.0 Aug 7, 2026 Changes in this version + func Abs(x any) (decimal.Decimal, error) + func Add(x, y any) (decimal.Decimal, error) + func Avg(x ...any) (decimal.Decimal, error) + func Ceil(x any) (decimal.Decimal, error) + func Div(x, y any) (decimal.Decimal, error) + func Equal(x, y any) (bool, error) + func Floor(x any) (decimal.Decimal, error) + func GreaterThan(x, y any) (bool, error) + func GreaterThanOrEqual(x, y any) (bool, error) + func IsNegative(x any) (bool, error) + func IsPositive(x any) (bool, error) + func IsZero(x any) (bool, error) + func LessThan(x, y any) (bool, error) + func LessThanOrEqual(x, y any) (bool, error) + func Ln(x any) (decimal.Decimal, error) + func Log(x, y any) (decimal.Decimal, error) + func Max(x ...any) (decimal.Decimal, error) + func Min(x ...any) (decimal.Decimal, error) + func Mul(x, y any) (decimal.Decimal, error) + func NewEnv(observationTimestampNanoseconds uint64) environment + func ParseDuration(x string) (time.Duration, error) + func Pow(x, y any) (decimal.Decimal, error) + func ProcessCalculatedStreams(lggr logger.Logger, channelDefinitions llotypes.ChannelDefinitions, ...) + func ProcessCalculatedStreamsDryRun(expression string) error + func Round(x any, precision int) (decimal.Decimal, error) + func Sqrt(x any) (decimal.Decimal, error) + func Sub(x, y any) (decimal.Decimal, error) + func Truncate(x any, precision int) (decimal.Decimal, error)