Documentation

Overview

    Package coingecko is forked from https://github.com/superoo7/go-gecko

    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
    }

      Client struct

      func NewClient

      func NewClient(httpClient *http.Client) *Client

        NewClient create new client object

        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, vsCurrency string, days string) (*types.CoinsIDMarketChart, error)

              CoinsIDMarketChart /coins/{id}/market_chart?vsCurrency={usd, eur, jpy, etc.}&days={1,14,30,max}

              func (*Client) CoinsIDTickers

              func (c *Client) CoinsIDTickers(id string, page int) (*types.CoinsIDTickers, error)

                CoinsIDTickers /coins/{id}/tickers

                func (*Client) CoinsList

                func (c *Client) CoinsList() (*types.CoinList, error)

                  CoinsList /coins/list

                  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) ExchangeRates

                        func (c *Client) ExchangeRates() (*types.ExchangeRatesItem, error)

                          ExchangeRates https://api.coingecko.com/api/v3/exchange_rates

                          func (*Client) Global

                          func (c *Client) Global() (*types.Global, error)

                            Global https://api.coingecko.com/api/v3/global

                            func (*Client) MakeReq

                            func (c *Client) MakeReq(url string) ([]byte, error)

                              MakeReq HTTP request helper

                              func (*Client) Ping

                              func (c *Client) Ping() (*types.Ping, error)

                                Ping /ping endpoint

                                func (*Client) SimplePrice

                                func (c *Client) SimplePrice(ids []string, vsCurrencies []string) (*map[string]map[string]float32, error)

                                  SimplePrice /simple/price Multiple ID and Currency (ids, vs_currencies)

                                  func (*Client) SimpleSinglePrice

                                  func (c *Client) SimpleSinglePrice(id string, vsCurrency string) (*types.SimpleSinglePrice, error)

                                    SimpleSinglePrice /simple/price Single ID and Currency (ids, vsCurrency)

                                    func (*Client) SimpleSupportedVSCurrencies

                                    func (c *Client) SimpleSupportedVSCurrencies() (*types.SimpleSupportedVSCurrencies, error)

                                      SimpleSupportedVSCurrencies /simple/supported_vs_currencies

                                      Source Files

                                      Directories

                                      Path Synopsis