marketmaking

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MakingFormula

type MakingFormula interface {
	SpotPrice(spotPriceOpts interface{}) (spotPrice decimal.Decimal, err error)
	OutGivenIn(outGivenInOpts interface{}, amountIn decimal.Decimal) (amountOut decimal.Decimal, err error)
	InGivenOut(inGivenOutOpts interface{}, amountOut decimal.Decimal) (amountIn decimal.Decimal, err error)
}

MakingFormula defines the interface for implementing the formula to derive the spot price

func NewBalancedReservedFormula added in v1.0.0

func NewBalancedReservedFormula() MakingFormula

func NewPluggableFormula added in v1.0.0

func NewPluggableFormula() MakingFormula

Directories

Path Synopsis
Package formula defines the formulas that implements the MarketFormula interface
Package formula defines the formulas that implements the MarketFormula interface

Jump to

Keyboard shortcuts

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