coinmarketcap

package
v0.0.0-...-febeaf7 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	URL = "https://pro-api.coinmarketcap.com"
)

Variables

View Source
var (
	ErrInvalidSymbol = errors.New("invalid symbol")
	ErrUnknown       = errors.New("unknown error")
)

Functions

This section is empty.

Types

type Client

type Client interface {
	GetRate(ctx context.Context, symbol string) (model.Rate, error)
}

func NewClient

func NewClient(cfg *Config) Client

type Config

type Config struct {
	APIKey string `yaml:"apiKey"`
}

func NewConfig

func NewConfig(cfg *config.YAML) (*Config, error)

Jump to

Keyboard shortcuts

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