coingecko

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCoinID added in v0.0.5

func GetCoinID(symbol string) (string, error)

Get CoinID from symbol

func GetCoinPrice

func GetCoinPrice(coinID string) (float64, error)

GetCoinPrice retrieves the price of the coin in USD

Types

type Coin

type Coin struct {
	ID     string `json:"id,omitempty"`
	Symbol string `json:"symbol,omitempty"`
	Name   string `json:"name,omitempty"`
}

Coin refers to the coingecko coin model

func GetCoinsList

func GetCoinsList() ([]Coin, error)

GetCoinsList retrieves the list of coins from CoinGecko

Jump to

Keyboard shortcuts

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