liquidity_tier

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: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateLiquidityTier

func GenerateLiquidityTier(optionalModifications ...LtModifierOption) *perptypes.LiquidityTier

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

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

Types

type LtModifierOption

type LtModifierOption func(cp *perptypes.LiquidityTier)

func WithId

func WithId(id uint32) LtModifierOption

func WithImpactNotional

func WithImpactNotional(impactNotional uint64) LtModifierOption

func WithInitialMarginPpm

func WithInitialMarginPpm(initialMarginPpm uint32) LtModifierOption

func WithMaintenanceFractionPpm

func WithMaintenanceFractionPpm(maintenanceFractionPpm uint32) LtModifierOption

func WithName

func WithName(name string) LtModifierOption

Jump to

Keyboard shortcuts

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