goingecko

module
v3.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2025 License: MIT

README ΒΆ

Goingecko

goingecko

Goingecko is a Go client library for the CoinGecko API that provides easy access to cryptocurrency data. It supports both the public and Pro API endpoints, with features like rate limiting and automatic retries. The library is designed to be simple to use while providing comprehensive access to CoinGecko's cryptocurrency data services.

Key features:

  • Support for both public and Pro API endpoints
  • Rate limiting with configurable request limits
  • Automatic retry with exponential backoff
  • Comprehensive endpoint coverage
  • Type-safe API responses
  • Context support for request cancellation and timeouts

Endpoints

Simple Endpoints
Endpoint Status Function Plan
/ping βœ“ Ping 🦎
/simple/price βœ“ SimplePrice 🦎
/simple/token_price/{id} βœ“ SimpleTokenPrice 🦎
/simple/supported_vs_currencies βœ“ SimpleSupportedVsCurrency 🦎
Coins Endpoints
Endpoint Status Function Plan
/coins/list βœ“ CoinsList 🦎
/coins/top_gainers_losers βœ— πŸ’Ό
/coins/list/new βœ— πŸ’Ό
/coins/markets βœ“ CoinsMarket 🦎
/coins/{id} βœ“ CoinsId 🦎
/coins/{id}/tickers βœ“ CoinsIdTickers 🦎
/coins/{id}/history βœ“ CoinsIdHistory 🦎
/coins/{id}/market_chart βœ“ CoinsIdMarketChart 🦎
/coins/{id}/market_chart/range βœ“ CoinsIdMarketChartRange 🦎
/coins/{id}/ohlc βœ“ CoinsOhlc 🦎
/coins/id/ohlc/range βœ— πŸ’Ό
/coins/id/circulating_supply_chart βœ— πŸ‘‘
/coins/id/circulating_supply_chart/range βœ— πŸ‘‘
/coins/id/total_supply_chart βœ— πŸ‘‘
/coins/id/total_supply_chart/range βœ— πŸ‘‘
Contract Endpoints
Endpoint Status Function Plan
/coins/{id}/contract/{contract_address} βœ“ ContractInfo 🦎
/coins/{id}/contract/{contract_address}/market_chart/ βœ“ ContractMarketChart 🦎
/coins/{id}/contract/{contract_address}/market_chart/range βœ“ ContractMarketChartRange 🦎
Categories Endpoints
Endpoint Status Function Plan
/coins/categories/list βœ“ CategoriesList 🦎
/coins/categories/ βœ“ Categories 🦎
Exchange Endpoints
Endpoint Status Function Plan
/exchanges βœ“ Exchanges 🦎
/exchanges/list βœ“ ExchangesList 🦎
/exchanges/{id} βœ“ ExchangesId 🦎
/exchanges/{id}/tickers βœ“ ExchangesIdTickers 🦎
/exchanges/{id}/volume_chart βœ“ ExchangesIdVolumeChart 🦎
/exchanges/id/volume_chart/range βœ— πŸ’Ό
Derivatives Endpoints
Endpoint Status Function Plan
/derivaties βœ“ Derivatives 🦎
/derivaties/exchanges βœ“ DerivativesExchanges 🦎
/derivaties/exchanges/{id} βœ“ DerivativesExchangesId 🦎
/derivaties/exchanges/list βœ“ DerivativesExchangesList 🦎
NFT Endpoints
Endpoint Status Function Plan
/nfts/list βœ“ NftsList 🦎
/nfts/{id} βœ“ NftsId 🦎
/nfts/{asset_platform_id}/contract/{contract_address} βœ“ NftsContract 🦎
/nfts/markets βœ— πŸ’Ό
/nfts/id/market_chart βœ— πŸ’Ό
/nfts/asset_platform_id/contract/contract_address/market_chart βœ— πŸ’Ό
/nfts/id/tickers βœ— πŸ’Ό
Other Endpoints
Endpoint Status Function Plan
/asset_platforms βœ“ AssetPlatforms 🦎
/token_lists/asset_platform_id/all.json βœ— πŸ‘‘
/key βœ“ AssetPlatforms πŸ’Ό
/exchange_rates βœ— 🦎
/search βœ“ Search 🦎
/search/trending βœ“ Trending 🦎
/global βœ“ Global 🦎
/global/decentralized_finance_defi βœ“ DecentrilizedFinanceDEFI 🦎
/global/market_cap_chart βœ— πŸ’Ό
/companies/public_treasury/{coin_id} βœ“ PublicTreasuryCoinId 🦎
Legend
  • 🦎 - Free tier endpoints
  • πŸ’Ό - Exclusive for Paid Plan subscribers (Analyst/Lite/Pro)
  • πŸ‘‘ - Exclusive for Enterprise Plan subscribers only

Usage

package main

import (
	"context"
	"fmt"

	"github.com/JulianToledano/goingecko/v3/api"
	"github.com/JulianToledano/goingecko/v3/api/coins"
)

func main() {
	cgClient := api.NewDefaultClient()

	data, err := cgClient.CoinsId(context.Background(), "bitcoin", coins.WithTickers(false))
	if err != nil {
		panic(err)
	}
	fmt.Printf("Bitcoin price is: %f$", data.MarketData.CurrentPrice.Usd)
}

Check dir examples for more.

Todo

  • Implement premium API endpoints
  • Implement On Chain Dex API

Jump to

Keyboard shortcuts

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