prices

package
v0.0.0-...-23a414b Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2024 License: AGPL-3.0, AGPL-3.0-or-later Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateMarketParamPrice

func GenerateMarketParamPrice(optionalModifications ...MarketParamPriceModifierOption) *pricestypes.MarketParamPrice

GenerateMarketParamPrice returns a `MarketParamPrice` object set to default values. Passing in `MarketParamPriceModifierOption` methods alters the value of the `MarketParamPrice` returned. It will start with the default, valid `MarketParamPrice` value defined within the method and make the requested modifications before returning the object.

Example usage: `GenerateMarketParamPrice(WithId(10))` This will start with the default `MarketParamPrice` object defined within the method and return the newly-created object after overriding the values of `Id` to 10.

func MustHumanPriceToMarketPrice

func MustHumanPriceToMarketPrice(
	humanPrice string,
	exponent int32,
) (marketPrice uint64)

Types

type MarketParamPriceModifierOption

type MarketParamPriceModifierOption func(cp *pricestypes.MarketParamPrice)

func WithExchangeConfigJson

func WithExchangeConfigJson(configJson string) MarketParamPriceModifierOption

func WithExponent

func WithExponent(exp int32) MarketParamPriceModifierOption

func WithMinExchanges

func WithMinExchanges(minExchanges uint32) MarketParamPriceModifierOption

func WithMinPriceChangePpm

func WithMinPriceChangePpm(minPriceChangePpm uint32) MarketParamPriceModifierOption

func WithPnlPriceValue

func WithPnlPriceValue(price uint64) MarketParamPriceModifierOption

func WithSpotPriceValue

func WithSpotPriceValue(price uint64) MarketParamPriceModifierOption

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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