coingecko

package
v0.172.10 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient() *Client

func (*Client) DoQuery

func (c *Client) DoQuery(url string) (*http.Response, error)

func (*Client) FetchHistoricalDailyPrices

func (c *Client) FetchHistoricalDailyPrices(symbol string, currency string, limit int, allData bool, aggregate int) ([]thirdparty.HistoricalPrice, error)

func (*Client) FetchHistoricalHourlyPrices

func (c *Client) FetchHistoricalHourlyPrices(symbol string, currency string, limit int, aggregate int) ([]thirdparty.HistoricalPrice, error)

func (*Client) FetchPrices

func (c *Client) FetchPrices(symbols []string, currencies []string) (map[string]map[string]float64, error)

func (*Client) FetchTokenDetails

func (c *Client) FetchTokenDetails(symbols []string) (map[string]thirdparty.TokenDetails, error)

func (*Client) FetchTokenMarketValues

func (c *Client) FetchTokenMarketValues(symbols []string, currency string) (map[string]thirdparty.TokenMarketValues, error)

type GeckoMarketValues

type GeckoMarketValues struct {
	ID                                string  `json:"id"`
	Symbol                            string  `json:"symbol"`
	Name                              string  `json:"name"`
	MarketCap                         float64 `json:"market_cap"`
	High24h                           float64 `json:"high_24h"`
	Low24h                            float64 `json:"low_24h"`
	PriceChange24h                    float64 `json:"price_change_24h"`
	PriceChangePercentage24h          float64 `json:"price_change_percentage_24h"`
	PriceChangePercentage1hInCurrency float64 `json:"price_change_percentage_1h_in_currency"`
}

type GeckoToken

type GeckoToken struct {
	ID     string `json:"id"`
	Symbol string `json:"symbol"`
	Name   string `json:"name"`
}

type HistoricalPriceContainer

type HistoricalPriceContainer struct {
	Prices [][]float64 `json:"prices"`
}

Jump to

Keyboard shortcuts

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