marketcap

package
v0.0.0-...-491e088 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2019 License: Apache-2.0 Imports: 14 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CapProvider_CoinMarketCap

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

func NewMarketCapProvider

func NewMarketCapProvider(options config.MarketCapOptions) *CapProvider_CoinMarketCap

func (*CapProvider_CoinMarketCap) GetEthCap

func (p *CapProvider_CoinMarketCap) GetEthCap() (*big.Rat, error)

func (*CapProvider_CoinMarketCap) GetMarketCap

func (p *CapProvider_CoinMarketCap) GetMarketCap(tokenAddress common.Address) (*big.Rat, error)

func (*CapProvider_CoinMarketCap) GetMarketCapByCurrency

func (p *CapProvider_CoinMarketCap) GetMarketCapByCurrency(tokenAddress common.Address, currencyStr string) (*big.Rat, error)

func (*CapProvider_CoinMarketCap) LegalCurrencyValue

func (p *CapProvider_CoinMarketCap) LegalCurrencyValue(tokenAddress common.Address, amount *big.Rat) (*big.Rat, error)

func (*CapProvider_CoinMarketCap) LegalCurrencyValueByCurrency

func (p *CapProvider_CoinMarketCap) LegalCurrencyValueByCurrency(tokenAddress common.Address, amount *big.Rat, currencyStr string) (*big.Rat, error)

func (*CapProvider_CoinMarketCap) LegalCurrencyValueOfEth

func (p *CapProvider_CoinMarketCap) LegalCurrencyValueOfEth(amount *big.Rat) (*big.Rat, error)

func (*CapProvider_CoinMarketCap) Start

func (p *CapProvider_CoinMarketCap) Start()

func (*CapProvider_CoinMarketCap) Stop

func (p *CapProvider_CoinMarketCap) Stop()

type CapProvider_LocalCap

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

func NewLocalCap

func NewLocalCap() *CapProvider_LocalCap

todo:

func (*CapProvider_LocalCap) Start

func (cap *CapProvider_LocalCap) Start()

func (*CapProvider_LocalCap) Stop

func (cap *CapProvider_LocalCap) Stop()

type LegalCurrency

type LegalCurrency int
const (
	CNY LegalCurrency = iota
	USD
	EUR
	BTC
)

func StringToLegalCurrency

func StringToLegalCurrency(currency string) LegalCurrency

type MarketCapProvider

type MarketCapProvider interface {
	Start()
	Stop()

	LegalCurrencyValue(tokenAddress common.Address, amount *big.Rat) (*big.Rat, error)
	LegalCurrencyValueOfEth(amount *big.Rat) (*big.Rat, error)
	LegalCurrencyValueByCurrency(tokenAddress common.Address, amount *big.Rat, currencyStr string) (*big.Rat, error)
	GetMarketCap(tokenAddress common.Address) (*big.Rat, error)
	GetEthCap() (*big.Rat, error)
	GetMarketCapByCurrency(tokenAddress common.Address, currencyStr string) (*big.Rat, error)
}

type MixMarketCap

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

func (*MixMarketCap) GetEthCap

func (cap *MixMarketCap) GetEthCap() (*big.Rat, error)

func (*MixMarketCap) GetMarketCap

func (cap *MixMarketCap) GetMarketCap(tokenAddress common.Address) (*big.Rat, error)

func (*MixMarketCap) GetMarketCapByCurrency

func (cap *MixMarketCap) GetMarketCapByCurrency(tokenAddress common.Address, currencyStr string) (*big.Rat, error)

func (*MixMarketCap) LegalCurrencyValue

func (cap *MixMarketCap) LegalCurrencyValue(tokenAddress common.Address, amount *big.Rat) (*big.Rat, error)

func (*MixMarketCap) LegalCurrencyValueByCurrency

func (cap *MixMarketCap) LegalCurrencyValueByCurrency(tokenAddress common.Address, amount *big.Rat, currencyStr string) (*big.Rat, error)

func (*MixMarketCap) LegalCurrencyValueOfEth

func (cap *MixMarketCap) LegalCurrencyValueOfEth(amount *big.Rat) (*big.Rat, error)

func (*MixMarketCap) Start

func (cap *MixMarketCap) Start()

func (*MixMarketCap) Stop

func (cap *MixMarketCap) Stop()

Jump to

Keyboard shortcuts

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