constants

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2023 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NTWO     int64 = 2    // NTWO the number 2
	NFIVE    int64 = 5    // NFIVE the number 5
	NTEN     int64 = 10   // NTEN the number 10
	NHUNDRED int64 = 100  // NHUNDRED the number 100
	N997     int64 = 997  // N997 the number 997
	N1000    int64 = 1000 // N1000 the number 1000
)

Variables

View Source
var (
	TWO     decimal.Decimal = decimal.NewFromInt(NTWO)     // TWO the decimal of 2
	TEN     decimal.Decimal = decimal.NewFromInt(NTEN)     // TEN the decimal of 10
	HUNDRED decimal.Decimal = decimal.NewFromInt(NHUNDRED) // HUNDRED the decimal of 100
)

Functions

func RelevantUSDCoins

func RelevantUSDCoins(chainID ChainID) []string

RelevantUSDCoins returns the USD coins used for price conversion

Types

type ChainID

type ChainID uint

The ChainID of the crypto network

const (
	MAINNET    ChainID = 11111    // MAINNET Tron Mainnet
	NILE       ChainID = 20190292 // NILE Tron Nile testnet
	SHASTA     ChainID = 1        // SHASTA Tron Shasta testnet
	BSCMainnet ChainID = 56       // BSCMainnet Binance Mainnet
	BSCTestnet ChainID = 243      // BSCTestnet Binance Testnet
	BTTMainnet ChainID = 199      // BTTMainnet Bittorrent Mainnet
	BTTTestnet ChainID = 232      // BTTTestnet Bittorrent Testnet
)

type Rounding

type Rounding int

Rounding is the fraction rounding

const (
	RoundDown   Rounding = iota // RoundDown rounding from .5 downwards
	RoundHalfUp                 // RoundHalfUp rounding from .5 upwards
	RoundUp                     // RoundUp rounding from .5 upwards
)

type TradeType

type TradeType int

TradeType is the type of the exchange trade

const (
	ExactInput  TradeType = iota // ExactInput the input trade amount must be exactly this amount
	ExactOutput                  // ExactOutput the output trade amount must be exactly this amount
)

Jump to

Keyboard shortcuts

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