utils

package
v0.1.429-bweng-test-1 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UnitToMultiplier = map[types.Unit]sdk.Dec{
	types.Unit_STANDARD: sdk.OneDec(),
	types.Unit_MILLI:    sdk.NewDec(1_000),
	types.Unit_MICRO:    sdk.NewDec(1_000_000),
	types.Unit_NANO:     sdk.NewDec(1_000_000_000),
}

Functions

func ConvertDecToStandard

func ConvertDecToStandard(unit types.Unit, dec sdk.Dec) sdk.Dec

func GetOrderTypeFromStr

func GetOrderTypeFromStr(str string) (types.OrderType, error)

func GetPositionDirectionFromStr

func GetPositionDirectionFromStr(str string) (types.PositionDirection, error)

func GetPositionEffectFromStr

func GetPositionEffectFromStr(str string) (types.PositionEffect, error)

func GetPriceAssetString

func GetPriceAssetString(pairString PairString) (string, string)

Types

type ContractAddress

type ContractAddress string

type PairString

type PairString string

func GetPairString

func GetPairString(pair *types.Pair) PairString

Jump to

Keyboard shortcuts

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