coingecko

package
v0.15.4 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NoApiKey         = ""
	ApiKeyHeaderName = "x-cg-demo-api-key"
)
View Source
const SimplePriceURL = "%s/simple/price?vs_currencies=usd&include_last_updated_at=true&ids=%s"

Variables

This section is empty.

Functions

This section is empty.

Types

type CoingeckoClient

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

func NewCoingeckoClient

func NewCoingeckoClient(config *config.CoingeckoConfig, log *logging.Logger) *CoingeckoClient

func (*CoingeckoClient) GetAssetPrices

func (c *CoingeckoClient) GetAssetPrices(assetIds []string) ([]PriceData, error)

func (*CoingeckoClient) GetPrices

func (c *CoingeckoClient) GetPrices() ([]PriceData, error)

type PriceData

type PriceData struct {
	AssetSymbol string
	PriceUSD    decimal.Decimal
	Time        time.Time
}

Jump to

Keyboard shortcuts

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