coingecko

package
v0.0.0-...-baa49d7 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2025 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 CoinGeckoAPI

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

func NewCoinGeckoAPI

func NewCoinGeckoAPI() *CoinGeckoAPI

func (*CoinGeckoAPI) GetCoinMarketChart

func (m *CoinGeckoAPI) GetCoinMarketChart(coinID string, currency string) ([]PriceData, error)

func (*CoinGeckoAPI) GetSolanaTokenInfo

func (m *CoinGeckoAPI) GetSolanaTokenInfo(contract string) (*SolanaTokenInfo, error)

type PriceData

type PriceData struct {
	Timestamp time.Time `json:"timestamp"`
	Price     float64   `json:"price"`
}

type SolanaTokenInfo

type SolanaTokenInfo struct {
	ID           string  `json:"id"`
	Name         string  `json:"name"`
	Symbol       string  `json:"symbol"`
	CurrentPrice float64 `json:"price"`
}

Jump to

Keyboard shortcuts

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