Documentation
¶
Index ¶
- Constants
- type Client
- func (c *Client) CoinContract(networkID, contract string, ...) (*types.CoinsID, error)
- func (c *Client) CoinsID(id string, localization bool, tickers bool, marketData bool, ...) (*types.CoinsID, error)
- func (c *Client) CoinsIDHistory(id string, date string, localization bool) (*types.CoinsIDHistory, error)
- func (c *Client) CoinsIDMarketChart(id string, vs_currency string, days string) (*types.CoinsIDMarketChart, error)
- func (c *Client) CoinsIDTickers(id string, page int) (*types.CoinsIDTickers, error)
- func (c *Client) CoinsList() (types.CoinList, error)
- func (c *Client) CoinsMarket(vsCurrency string, ids []string, order string, perPage int, page int, ...) (types.CoinsMarket, error)
- func (c *Client) EventsCountries() ([]*types.EventCountryItem, error)
- func (c *Client) EventsTypes() (*types.EventsTypes, error)
- func (c *Client) ExchangeIDTickers(exchangeID string, coinIDs []string) (*types.ExchangeIDTickers, error)
- func (c *Client) ExchangeRates() (*types.ExchangeRatesItem, error)
- func (c *Client) Exchanges(perPage int, page int) (types.ExchangesDetail, error)
- func (c *Client) ExchangesList() (types.ExchangesBase, error)
- func (c *Client) Global() (*types.Global, error)
- func (c *Client) MakeReq(url string) ([]byte, error)
- func (c *Client) Ping() (*types.Ping, error)
- func (c *Client) SimplePrice(ids []string, vsCurrencies []string) (map[string]map[string]float64, error)
- func (c *Client) SimpleSinglePrice(id string, vsCurrency string) (*types.SimpleSinglePrice, error)
- func (c *Client) SimpleSupportedVSCurrencies() (*types.SimpleSupportedVSCurrencies, error)
- func (c *Client) SimpleTokenPrices(platformID string, contracts, vsCurrencies []string) (map[string]map[string]float64, error)
Constants ¶
const BaseURL = "https://api.coingecko.com/api/v3"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client struct
func (*Client) CoinContract ¶
func (c *Client) CoinContract(networkID, contract string, localization, tickers, marketData, communityData, developerData, sparkline bool, ) (*types.CoinsID, error)
Contract Coin info from contract address
func (*Client) CoinsID ¶
func (c *Client) CoinsID(id string, localization bool, tickers bool, marketData bool, communityData bool, developerData bool, sparkline bool) (*types.CoinsID, error)
CoinsID /coins/{id}
func (*Client) CoinsIDHistory ¶
func (c *Client) CoinsIDHistory(id string, date string, localization bool) (*types.CoinsIDHistory, error)
CoinsIDHistory /coins/{id}/history?date={date}&localization=false
func (*Client) CoinsIDMarketChart ¶
func (c *Client) CoinsIDMarketChart(id string, vs_currency string, days string) (*types.CoinsIDMarketChart, error)
CoinsIDMarketChart /coins/{id}/market_chart?vs_currency={usd, eur, jpy, etc.}&days={1,14,30,max}
func (*Client) CoinsIDTickers ¶
CoinsIDTickers /coins/{id}/tickers
func (*Client) CoinsMarket ¶
func (c *Client) CoinsMarket(vsCurrency string, ids []string, order string, perPage int, page int, sparkline bool, priceChangePercentage []string) (types.CoinsMarket, error)
CoinsMarket /coins/market
func (*Client) EventsCountries ¶
func (c *Client) EventsCountries() ([]*types.EventCountryItem, error)
EventsCountries https://api.coingecko.com/api/v3/events/countries
func (*Client) EventsTypes ¶
func (c *Client) EventsTypes() (*types.EventsTypes, error)
EventsTypes https://api.coingecko.com/api/v3/events/types
func (*Client) ExchangeIDTickers ¶
func (c *Client) ExchangeIDTickers(exchangeID string, coinIDs []string) (*types.ExchangeIDTickers, error)
Get exchange tickers (paginated)
func (*Client) ExchangeRates ¶
func (c *Client) ExchangeRates() (*types.ExchangeRatesItem, error)
ExchangeRates https://api.coingecko.com/api/v3/exchange_rates
func (*Client) ExchangesList ¶
func (c *Client) ExchangesList() (types.ExchangesBase, error)
Exchanges list, no pagination required
func (*Client) SimplePrice ¶
func (c *Client) SimplePrice(ids []string, vsCurrencies []string) (map[string]map[string]float64, error)
SimplePrice /simple/price Multiple ID and Currency (ids, vs_currencies)
func (*Client) SimpleSinglePrice ¶
SimpleSinglePrice /simple/price Single ID and Currency (ids, vs_currency)
func (*Client) SimpleSupportedVSCurrencies ¶
func (c *Client) SimpleSupportedVSCurrencies() (*types.SimpleSupportedVSCurrencies, error)
SimpleSupportedVSCurrencies /simple/supported_vs_currencies