v1

package
v1.51.1 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2023 License: AGPL-3.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
	ID                            int64            `json:"id"`
	Name                          string           `json:"name"`
	Symbol                        string           `json:"symbol"`
	Slug                          string           `json:"slug"`
	CmcRank                       int64            `json:"cmc_rank,omitempty"`
	IsActive                      bool             `json:"is_active,omitempty"`
	IsFiat                        int64            `json:"is_fiat,omitempty"`
	NumMarketPairs                int64            `json:"num_market_pairs"`
	CirculatingSupply             float64          `json:"circulating_supply"`
	TotalSupply                   float64          `json:"total_supply"`
	MaxSupply                     float64          `json:"max_supply"`
	LastUpdated                   time.Time        `json:"last_updated"`
	DateAdded                     time.Time        `json:"date_added"`
	Tags                          []string         `json:"tags"`
	SelfReportedCirculatingSupply float64          `json:"self_reported_circulating_supply,omitempty"`
	SelfReportedMarketCap         float64          `json:"self_reported_market_cap,omitempty"`
	Platform                      Platform         `json:"platform"`
	Quote                         map[string]Quote `json:"quote"`
}

type ListingsHistoricalRequest

type ListingsHistoricalRequest struct {
	Client requestgen.AuthenticatedAPIClient

	Date               string  `param:"date,query,required"`
	Start              *int    `param:"start,query" default:"1"`
	Limit              *int    `param:"limit,query" default:"100"`
	Convert            *string `param:"convert,query"`
	ConvertID          *string `param:"convert_id,query"`
	Sort               *string `` /* 215-byte string literal not displayed */
	SortDir            *string `param:"sort_dir,query" validValues:"asc,desc"`
	CryptocurrencyType *string `param:"cryptocurrency_type,query" default:"all" validValues:"all,coins,tokens"`
	Aux                *string `param:"aux,query" default:"platform,tags,date_added,circulating_supply,total_supply,max_supply,cmc_rank,num_market_pairs"`
}

func (*ListingsHistoricalRequest) Do

func (*ListingsHistoricalRequest) GetParameters

func (l *ListingsHistoricalRequest) GetParameters() (map[string]interface{}, error)

GetParameters builds and checks the parameters and return the result in a map object

func (*ListingsHistoricalRequest) GetParametersJSON

func (l *ListingsHistoricalRequest) GetParametersJSON() ([]byte, error)

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*ListingsHistoricalRequest) GetParametersQuery

func (l *ListingsHistoricalRequest) GetParametersQuery() (url.Values, error)

GetParametersQuery converts the parameters from GetParameters into the url.Values format

func (*ListingsHistoricalRequest) GetQueryParameters

func (l *ListingsHistoricalRequest) GetQueryParameters() (url.Values, error)

GetQueryParameters builds and checks the query parameters and returns url.Values

func (*ListingsHistoricalRequest) GetSlugParameters

func (l *ListingsHistoricalRequest) GetSlugParameters() (map[string]interface{}, error)

GetSlugParameters builds and checks the slug parameters and return the result in a map object

func (*ListingsHistoricalRequest) GetSlugsMap

func (l *ListingsHistoricalRequest) GetSlugsMap() (map[string]string, error)

func (*ListingsHistoricalRequest) SetAux

func (*ListingsHistoricalRequest) SetConvert

func (*ListingsHistoricalRequest) SetConvertID

func (l *ListingsHistoricalRequest) SetConvertID(ConvertID string) *ListingsHistoricalRequest

func (*ListingsHistoricalRequest) SetCryptocurrencyType

func (l *ListingsHistoricalRequest) SetCryptocurrencyType(CryptocurrencyType string) *ListingsHistoricalRequest

func (*ListingsHistoricalRequest) SetDate

func (*ListingsHistoricalRequest) SetLimit

func (*ListingsHistoricalRequest) SetSort

func (*ListingsHistoricalRequest) SetSortDir

func (*ListingsHistoricalRequest) SetStart

type ListingsLatestRequest

type ListingsLatestRequest struct {
	Client requestgen.AuthenticatedAPIClient

	Start                *int     `param:"start,query" default:"1"`
	Limit                *int     `param:"limit,query" default:"100"`
	PriceMin             *float64 `param:"price_min,query"`
	PriceMax             *float64 `param:"price_max,query"`
	MarketCapMin         *float64 `param:"market_cap_min,query"`
	MarketCapMax         *float64 `param:"market_cap_max,query"`
	Volume24HMin         *float64 `param:"volume_24h_min,query"`
	Volume24HMax         *float64 `param:"volume_24h_max,query"`
	CirculatingSupplyMin *float64 `param:"circulating_supply_min,query"`
	CirculatingSupplyMax *float64 `param:"circulating_supply_max,query"`
	PercentChange24HMin  *float64 `param:"percent_change_24h_min,query"`
	PercentChange24HMax  *float64 `param:"percent_change_24h_max,query"`
	Convert              *string  `param:"convert,query"`
	ConvertID            *string  `param:"convert_id,query"`
	Sort                 *string  `` /* 292-byte string literal not displayed */
	SortDir              *string  `param:"sort_dir,query" validValues:"asc,desc"`
	CryptocurrencyType   *string  `param:"cryptocurrency_type,query" default:"all" validValues:"all,coins,tokens"`
	Tag                  *string  `param:"tag,query" default:"all" validValues:"all,defi,filesharing"`
	Aux                  *string  `param:"aux,query" default:"num_market_pairs,cmc_rank,date_added,tags,platform,max_supply,circulating_supply,total_supply"`
}

func (*ListingsLatestRequest) Do

func (*ListingsLatestRequest) GetParameters

func (l *ListingsLatestRequest) GetParameters() (map[string]interface{}, error)

GetParameters builds and checks the parameters and return the result in a map object

func (*ListingsLatestRequest) GetParametersJSON

func (l *ListingsLatestRequest) GetParametersJSON() ([]byte, error)

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*ListingsLatestRequest) GetParametersQuery

func (l *ListingsLatestRequest) GetParametersQuery() (url.Values, error)

GetParametersQuery converts the parameters from GetParameters into the url.Values format

func (*ListingsLatestRequest) GetQueryParameters

func (l *ListingsLatestRequest) GetQueryParameters() (url.Values, error)

GetQueryParameters builds and checks the query parameters and returns url.Values

func (*ListingsLatestRequest) GetSlugParameters

func (l *ListingsLatestRequest) GetSlugParameters() (map[string]interface{}, error)

GetSlugParameters builds and checks the slug parameters and return the result in a map object

func (*ListingsLatestRequest) GetSlugsMap

func (l *ListingsLatestRequest) GetSlugsMap() (map[string]string, error)

func (*ListingsLatestRequest) SetAux

func (*ListingsLatestRequest) SetCirculatingSupplyMax

func (l *ListingsLatestRequest) SetCirculatingSupplyMax(CirculatingSupplyMax float64) *ListingsLatestRequest

func (*ListingsLatestRequest) SetCirculatingSupplyMin

func (l *ListingsLatestRequest) SetCirculatingSupplyMin(CirculatingSupplyMin float64) *ListingsLatestRequest

func (*ListingsLatestRequest) SetConvert

func (l *ListingsLatestRequest) SetConvert(Convert string) *ListingsLatestRequest

func (*ListingsLatestRequest) SetConvertID

func (l *ListingsLatestRequest) SetConvertID(ConvertID string) *ListingsLatestRequest

func (*ListingsLatestRequest) SetCryptocurrencyType

func (l *ListingsLatestRequest) SetCryptocurrencyType(CryptocurrencyType string) *ListingsLatestRequest

func (*ListingsLatestRequest) SetLimit

func (l *ListingsLatestRequest) SetLimit(Limit int) *ListingsLatestRequest

func (*ListingsLatestRequest) SetMarketCapMax

func (l *ListingsLatestRequest) SetMarketCapMax(MarketCapMax float64) *ListingsLatestRequest

func (*ListingsLatestRequest) SetMarketCapMin

func (l *ListingsLatestRequest) SetMarketCapMin(MarketCapMin float64) *ListingsLatestRequest

func (*ListingsLatestRequest) SetPercentChange24HMax

func (l *ListingsLatestRequest) SetPercentChange24HMax(PercentChange24HMax float64) *ListingsLatestRequest

func (*ListingsLatestRequest) SetPercentChange24HMin

func (l *ListingsLatestRequest) SetPercentChange24HMin(PercentChange24HMin float64) *ListingsLatestRequest

func (*ListingsLatestRequest) SetPriceMax

func (l *ListingsLatestRequest) SetPriceMax(PriceMax float64) *ListingsLatestRequest

func (*ListingsLatestRequest) SetPriceMin

func (l *ListingsLatestRequest) SetPriceMin(PriceMin float64) *ListingsLatestRequest

func (*ListingsLatestRequest) SetSort

func (*ListingsLatestRequest) SetSortDir

func (l *ListingsLatestRequest) SetSortDir(SortDir string) *ListingsLatestRequest

func (*ListingsLatestRequest) SetStart

func (l *ListingsLatestRequest) SetStart(Start int) *ListingsLatestRequest

func (*ListingsLatestRequest) SetTag

func (*ListingsLatestRequest) SetVolume24HMax

func (l *ListingsLatestRequest) SetVolume24HMax(Volume24HMax float64) *ListingsLatestRequest

func (*ListingsLatestRequest) SetVolume24HMin

func (l *ListingsLatestRequest) SetVolume24HMin(Volume24HMin float64) *ListingsLatestRequest

type ListingsNewRequest

type ListingsNewRequest struct {
	Client requestgen.AuthenticatedAPIClient

	Start     *int    `param:"start,query" default:"1"`
	Limit     *int    `param:"limit,query" default:"100"`
	Convert   *string `param:"convert,query"`
	ConvertID *string `param:"convert_id,query"`
	SortDir   *string `param:"sort_dir,query" validValues:"asc,desc"`
}

func (*ListingsNewRequest) Do

func (*ListingsNewRequest) GetParameters

func (l *ListingsNewRequest) GetParameters() (map[string]interface{}, error)

GetParameters builds and checks the parameters and return the result in a map object

func (*ListingsNewRequest) GetParametersJSON

func (l *ListingsNewRequest) GetParametersJSON() ([]byte, error)

GetParametersJSON converts the parameters from GetParameters into the JSON format

func (*ListingsNewRequest) GetParametersQuery

func (l *ListingsNewRequest) GetParametersQuery() (url.Values, error)

GetParametersQuery converts the parameters from GetParameters into the url.Values format

func (*ListingsNewRequest) GetQueryParameters

func (l *ListingsNewRequest) GetQueryParameters() (url.Values, error)

GetQueryParameters builds and checks the query parameters and returns url.Values

func (*ListingsNewRequest) GetSlugParameters

func (l *ListingsNewRequest) GetSlugParameters() (map[string]interface{}, error)

GetSlugParameters builds and checks the slug parameters and return the result in a map object

func (*ListingsNewRequest) GetSlugsMap

func (l *ListingsNewRequest) GetSlugsMap() (map[string]string, error)

func (*ListingsNewRequest) SetConvert

func (l *ListingsNewRequest) SetConvert(Convert string) *ListingsNewRequest

func (*ListingsNewRequest) SetConvertID

func (l *ListingsNewRequest) SetConvertID(ConvertID string) *ListingsNewRequest

func (*ListingsNewRequest) SetLimit

func (l *ListingsNewRequest) SetLimit(Limit int) *ListingsNewRequest

func (*ListingsNewRequest) SetSortDir

func (l *ListingsNewRequest) SetSortDir(SortDir string) *ListingsNewRequest

func (*ListingsNewRequest) SetStart

func (l *ListingsNewRequest) SetStart(Start int) *ListingsNewRequest

type Platform

type Platform struct {
	ID           int    `json:"id"`
	Name         string `json:"name"`
	Symbol       string `json:"symbol"`
	Slug         string `json:"slug"`
	TokenAddress string `json:"token_address"`
}

type Quote

type Quote struct {
	Price                 float64   `json:"price"`
	Volume24H             float64   `json:"volume_24h"`
	VolumeChange24H       float64   `json:"volume_change_24h"`
	PercentChange1H       float64   `json:"percent_change_1h"`
	PercentChange24H      float64   `json:"percent_change_24h"`
	PercentChange7D       float64   `json:"percent_change_7d"`
	MarketCap             float64   `json:"market_cap"`
	MarketCapDominance    float64   `json:"market_cap_dominance"`
	FullyDilutedMarketCap float64   `json:"fully_diluted_market_cap"`
	LastUpdated           time.Time `json:"last_updated"`
}

type Response

type Response struct {
	Data   json.RawMessage `json:"data"`
	Status Status          `json:"status"`
}

type RestClient

type RestClient struct {
	requestgen.BaseAPIClient
	// contains filtered or unexported fields
}

func New

func New() *RestClient

func (*RestClient) Auth

func (c *RestClient) Auth(apiKey string)

func (*RestClient) NewAuthenticatedRequest

func (c *RestClient) NewAuthenticatedRequest(ctx context.Context, method, refURL string, params url.Values, payload interface{}) (*http.Request, error)

type Status

type Status struct {
	Timestamp    time.Time `json:"timestamp"`
	ErrorCode    int       `json:"error_code"`
	ErrorMessage string    `json:"error_message"`
	Elapsed      int       `json:"elapsed"`
	CreditCount  int       `json:"credit_count"`
}

Jump to

Keyboard shortcuts

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