coingecko

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithAPIKey added in v0.11.0

func WithAPIKey(apikey string) func(*options)

WithAPIKey sets the API key for the client and updates the host to the pro API host if the host is the default.

func WithHost

func WithHost(host string) func(*options)

Types

type Client

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

func New

func New(opts ...func(*options)) Client

New creates a new coingecko Client with the given options.

func (Client) Price

func (c Client) Price(ctx context.Context, tkns ...tokens.Token) (map[tokens.Token]float64, error)

Price returns the price of each coin in USD.

Jump to

Keyboard shortcuts

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