pricer

package
v1.64.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2026 License: AGPL-3.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CoveredDepth

type CoveredDepth struct {
	// contains filtered or unexported fields
}

func NewCoveredDepth

func NewCoveredDepth(depthBook *types.DepthBook, side types.SideType, initialDepth fixedpoint.Value) *CoveredDepth

func (*CoveredDepth) Cover

func (d *CoveredDepth) Cover(depth fixedpoint.Value)

func (*CoveredDepth) Pricer

func (d *CoveredDepth) Pricer() Pricer

type Pricer

type Pricer func(i int, price fixedpoint.Value) fixedpoint.Value

func AdjustByTick

func AdjustByTick(side types.SideType, pips, tickSize fixedpoint.Value) Pricer

func ApplyFeeRate

func ApplyFeeRate(side types.SideType, feeRate fixedpoint.Value) Pricer

func ApplyMargin

func ApplyMargin(side types.SideType, margin fixedpoint.Value) Pricer

func Compose

func Compose(pricers ...Pricer) Pricer

func FromBestPrice

func FromBestPrice(side types.SideType, book *types.StreamOrderBook) Pricer

func FromDepthBook

func FromDepthBook(side types.SideType, depthBook *types.DepthBook, depth fixedpoint.Value) Pricer

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL