velarhelper

package
v1.4.548 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: GPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DeployerAddress  = "SP1Y5YSTAHZ88XYK1VPDH24GY0HPX5J4JECTMY4A1"
	VelarCoreAddress = DeployerAddress + ".univ2-core"
	VelarURL         = "https://api.velar.co"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Fee

type Fee struct {
	Denominator *big.Int
	Numerator   *big.Int
}

type SwapInfo

type SwapInfo struct {
	AmountIn    *big.Int
	AmountOut   *big.Int
	TokenIn     string
	TokenOut    string
	Symbol      string
	LpToken     string
	Token0      string
	Token1      string
	ProtocolFee Fee
	ShareFee    Fee
	SwapFee     Fee
}

func ExtractSwapInfo

func ExtractSwapInfo(response string) SwapInfo

type Ticker

type Ticker struct {
	ID             string  `json:"ticker_id"`
	PoolID         string  `json:"pool_id"`
	BaseCurrency   string  `json:"base_currency"`
	TargetCurrency string  `json:"target_currency"`
	BaseVolume     float64 `json:"base_volume"`
	TargetVolume   float64 `json:"target_volume"`
}

type TokenMetadata

type TokenMetadata struct {
	ContractAddress string `json:"contractAddress"`
	Name            string `json:"name"`
	Symbol          string `json:"symbol"`
	Decimals        string `json:"decimal"`
	DecimalNum      int    `json:"tokenDecimalNum"`
}

type VelarClient

type VelarClient struct {
	// contains filtered or unexported fields
}

func NewVelarClient

func NewVelarClient(logger *logrus.Entry, isDebug bool) *VelarClient

func (*VelarClient) GetAllTickers

func (c *VelarClient) GetAllTickers() ([]Ticker, error)

func (*VelarClient) GetAllTokens

func (c *VelarClient) GetAllTokens() ([]TokenMetadata, error)

Jump to

Keyboard shortcuts

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