coingecko

package
v1.38.2 Latest Latest
Warning

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

Go to latest
Published: May 10, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CoingeckoPriceFeed

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

func NewCoingeckoPriceFeed

func NewCoingeckoPriceFeed(interval time.Duration, endpointConfig *Config) *CoingeckoPriceFeed

NewCoingeckoPriceFeed returns price puller for given symbol. The price will be pulled from endpoint and divided by scaleFactor. Symbol name (if reported by endpoint) must match.

func (*CoingeckoPriceFeed) CheckFeeThreshold added in v1.9.0

func (cp *CoingeckoPriceFeed) CheckFeeThreshold(erc20Contract common.Address, totalFee cosmtypes.Int, minFeeInUSD float64) bool

func (*CoingeckoPriceFeed) QueryUSDPrice

func (cp *CoingeckoPriceFeed) QueryUSDPrice(erc20Contract common.Address) (float64, error)

type Config

type Config struct {
	BaseURL string
}

Jump to

Keyboard shortcuts

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