Versions in this module Expand all Collapse all v1 v1.0.0 Jan 27, 2026 Changes in this version + const BaseURLFree + const BaseURLPro + const WebSocketURLPro + type AssetPlatform struct + ChainIdentifier *int + ID string + ImageURL *string + Name string + NativeCoinID string + Shortname string + type AssetPlatformsAPI struct + func (a *AssetPlatformsAPI) List(filter *string) ([]AssetPlatform, error) + func (a *AssetPlatformsAPI) TokenLists(assetPlatformID string, page *int) (map[string]interface{}, error) + type CategoriesAPI struct + func (c *CategoriesAPI) List() ([]Category, error) + func (c *CategoriesAPI) ListWithMarketData(order *string) ([]map[string]interface{}, error) + type Category struct + CategoryID string + Name string + type Client struct + func NewClient(options ...ClientOption) *Client + type ClientOption func(*Client) + func WithAPIKey(apiKey string) ClientOption + func WithHTTPClient(httpClient *http.Client) ClientOption + func WithProAPI(isPro bool) ClientOption + func WithTimeout(timeout time.Duration) ClientOption + type CoinGecko struct + func New(options ...ClientOption) *CoinGecko + func (cg *CoinGecko) AssetPlatforms() *AssetPlatformsAPI + func (cg *CoinGecko) Categories() *CategoriesAPI + func (cg *CoinGecko) Coins() *CoinsAPI + func (cg *CoinGecko) Contract() *ContractAPI + func (cg *CoinGecko) Derivatives() *DerivativesAPI + func (cg *CoinGecko) Entities() *EntitiesAPI + func (cg *CoinGecko) ExchangeRates() *ExchangeRatesAPI + func (cg *CoinGecko) Exchanges() *ExchangesAPI + func (cg *CoinGecko) Global() *GlobalAPI + func (cg *CoinGecko) NFTs() *NFTsAPI + func (cg *CoinGecko) Ping() *PingAPI + func (cg *CoinGecko) Search() *SearchAPI + func (cg *CoinGecko) Simple() *SimpleAPI + func (cg *CoinGecko) WebSocket() *WebSocketAPI + type CoinListItem struct + ID string + Name string + Platforms map[string]string + Symbol string + type CoinOptions struct + CommunityData bool + DeveloperData bool + Localization bool + MarketData bool + Sparkline bool + Tickers bool + type CoinsAPI struct + func (c *CoinsAPI) CirculatingSupplyChart(id string, days string, interval *string) (map[string]interface{}, error) + func (c *CoinsAPI) CirculatingSupplyChartRange(id string, from int64, to int64) (map[string]interface{}, error) + func (c *CoinsAPI) Coin(id string, options *CoinOptions) (map[string]interface{}, error) + func (c *CoinsAPI) History(id string, date string, localization bool) (map[string]interface{}, error) + func (c *CoinsAPI) List(includePlatform bool) ([]CoinListItem, error) + func (c *CoinsAPI) MarketChart(id string, vsCurrency string, days string, options *MarketChartOptions) (map[string]interface{}, error) + func (c *CoinsAPI) MarketChartRange(id string, vsCurrency string, from int64, to int64, precision *string) (map[string]interface{}, error) + func (c *CoinsAPI) Markets(vsCurrency string, options *MarketsOptions) ([]map[string]interface{}, error) + func (c *CoinsAPI) OHLC(id string, vsCurrency string, days string, precision *string) ([][]float64, error) + func (c *CoinsAPI) RecentlyAdded() ([]map[string]interface{}, error) + func (c *CoinsAPI) Tickers(id string, options *TickersOptions) (map[string]interface{}, error) + func (c *CoinsAPI) TopGainersLosers(vsCurrency string, duration *string, topCoins *int) (map[string]interface{}, error) + func (c *CoinsAPI) TotalSupplyChart(id string, days string, interval *string) (map[string]interface{}, error) + func (c *CoinsAPI) TotalSupplyChartRange(id string, from int64, to int64) (map[string]interface{}, error) + type ContractAPI struct + func (c *ContractAPI) Coin(assetPlatform string, contractAddress string) (map[string]interface{}, error) + func (c *ContractAPI) MarketChart(assetPlatform string, contractAddress string, vsCurrency string, days string) (map[string]interface{}, error) + func (c *ContractAPI) MarketChartRange(assetPlatform string, contractAddress string, vsCurrency string, from int64, ...) (map[string]interface{}, error) + type DerivativesAPI struct + func (d *DerivativesAPI) Exchange(id string, includeTickers *string) (map[string]interface{}, error) + func (d *DerivativesAPI) Exchanges(options *DerivativesExchangesOptions) ([]map[string]interface{}, error) + func (d *DerivativesAPI) ExchangesList() ([]map[string]interface{}, error) + func (d *DerivativesAPI) Tickers(includeTickers *string) ([]map[string]interface{}, error) + type DerivativesExchangesOptions struct + Order *string + Page *int + PerPage *int + type EntitiesAPI struct + func (e *EntitiesAPI) List() ([]map[string]interface{}, error) + func (e *EntitiesAPI) TransactionHistory(entityID string, coinID string, options *TransactionHistoryOptions) (map[string]interface{}, error) + func (e *EntitiesAPI) TreasuryByCoinID(coinID string) (map[string]interface{}, error) + func (e *EntitiesAPI) TreasuryByEntityID(entityID string, coinID string) (map[string]interface{}, error) + func (e *EntitiesAPI) TreasuryChart(entityID string, coinID string, days int) (map[string]interface{}, error) + type ExchangeRatesAPI struct + func (e *ExchangeRatesAPI) Rates() (map[string]interface{}, error) + type ExchangeTickersOptions struct + CoinIDs []string + Depth *string + IncludeExchangeLogo bool + Order *string + Page *int + type ExchangesAPI struct + func (e *ExchangesAPI) Exchange(id string) (map[string]interface{}, error) + func (e *ExchangesAPI) List(options *ExchangesListOptions) ([]map[string]interface{}, error) + func (e *ExchangesAPI) ListIDMap() ([]map[string]interface{}, error) + func (e *ExchangesAPI) Tickers(id string, options *ExchangeTickersOptions) (map[string]interface{}, error) + func (e *ExchangesAPI) VolumeChart(id string, days int) ([][]interface{}, error) + func (e *ExchangesAPI) VolumeChartRange(id string, from int64, to int64) ([][]interface{}, error) + type ExchangesListOptions struct + Page *int + PerPage *int + type GlobalAPI struct + func (g *GlobalAPI) Crypto() (map[string]interface{}, error) + func (g *GlobalAPI) DeFi() (map[string]interface{}, error) + func (g *GlobalAPI) MarketCapChart(days int, vsCurrency string) (map[string]interface{}, error) + type MarketChartOptions struct + Interval *string + Precision *string + type MarketsOptions struct + Category *string + IDs []string + Locale *string + Order *string + Page *int + PerPage *int + Precision *string + PriceChangePercentage *string + Sparkline bool + type NFTsAPI struct + func (n *NFTsAPI) Collection(id string) (map[string]interface{}, error) + func (n *NFTsAPI) CollectionByContract(assetPlatformID string, contractAddress string) (map[string]interface{}, error) + func (n *NFTsAPI) List(options *NFTsListOptions) ([]map[string]interface{}, error) + func (n *NFTsAPI) MarketChart(id string, days int) (map[string]interface{}, error) + func (n *NFTsAPI) MarketChartByContract(assetPlatformID string, contractAddress string, days int) (map[string]interface{}, error) + func (n *NFTsAPI) Markets(options *NFTsMarketsOptions) ([]map[string]interface{}, error) + func (n *NFTsAPI) Tickers(id string) (map[string]interface{}, error) + type NFTsListOptions struct + AssetPlatformID *string + Order *string + Page *int + PerPage *int + type NFTsMarketsOptions struct + AssetPlatformID *string + Order *string + Page *int + PerPage *int + type PingAPI struct + func (p *PingAPI) APIUsage() (map[string]interface{}, error) + func (p *PingAPI) Ping() (*PingResponse, error) + type PingResponse struct + GeckoSays string + type SearchAPI struct + func (s *SearchAPI) Search(query string) (map[string]interface{}, error) + func (s *SearchAPI) Trending() (map[string]interface{}, error) + type SimpleAPI struct + func (s *SimpleAPI) Price(ids []string, vsCurrencies []string, options *SimplePriceOptions) (map[string]map[string]interface{}, error) + func (s *SimpleAPI) SupportedVsCurrencies() ([]string, error) + func (s *SimpleAPI) TokenPrice(assetPlatform string, contractAddresses []string, vsCurrencies []string, ...) (map[string]map[string]interface{}, error) + type SimplePriceOptions struct + Include24hrChange bool + Include24hrVol bool + IncludeLastUpdatedAt bool + IncludeMarketCap bool + type TickersOptions struct + Depth *string + ExchangeIDs []string + IncludeExchangeLogo bool + Order *string + Page *int + type TokenPriceOptions struct + Include24hrChange bool + Include24hrVol bool + IncludeLastUpdatedAt bool + IncludeMarketCap bool + type TransactionHistoryOptions struct + Page *int + PerPage *int + type WebSocketAPI struct + func (w *WebSocketAPI) CreateOnchainOHLCVSubscription(network string, poolAddress string, timeframe string) (string, error) + func (w *WebSocketAPI) CreateOnchainSimpleTokenPriceSubscription(network string, addresses []string, vsCurrencies []string) (string, error) + func (w *WebSocketAPI) CreateOnchainTradeSubscription(network string, poolAddress string) (string, error) + func (w *WebSocketAPI) CreatePingMessage() (string, error) + func (w *WebSocketAPI) CreateSimplePriceSubscription(coinIDs []string, vsCurrencies []string) (string, error) + func (w *WebSocketAPI) CreateUnsubscribeMessage(channel string) (string, error) + func (w *WebSocketAPI) GetWebSocketURL() string + type WebSocketSubscription struct + Params map[string]interface{} + Type string