coingecko

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CoinGecko

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

CoinGecko is the CoinGecko implementation of Provider. The precision of CoinGecko provider is up to day.

func NewCoinGecko

func NewCoinGecko() *CoinGecko

New creates a new CoinGecko instance.

func (*CoinGecko) GetTrending

func (cg *CoinGecko) GetTrending() (CoingeckoTrending, error)

type CoingeckoCoin

type CoingeckoCoin struct {
	Item Item `json:"item"`
}

type CoingeckoData

type CoingeckoData struct {
	Price                    string      `json:"price"`
	MarketCap                string      `json:"market_cap"`
	TotalVolume              string      `json:"total_volume"`
	PriceChangePercentage24h PriceChange `json:"price_change_percentage_24h"`
}

type CoingeckoTrending

type CoingeckoTrending struct {
	Coins []CoingeckoCoin `json:"coins"`
}

type Item

type Item struct {
	// CoinID uint          `json:"coin_id"`
	Name   string        `json:"name"`
	Symbol string        `json:"symbol"`
	Thumb  string        `json:"thumb"`
	Small  string        `json:"small"`
	Data   CoingeckoData `json:"data"`
}

type PriceChange

type PriceChange struct {
	Eur float64 `json:"eur"`
}

Jump to

Keyboard shortcuts

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