derivatives

package
v3.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithIncludeTickersExchangesById

func WithIncludeTickersExchangesById(includeTickers string) exchangesByIdOption

WithIncludeTickersExchangesById returns an exchangesByIdOption that controls inclusion of tickers data. The includeTickers parameter specifies whether to include tickers data in the response.

func WithOrderDerivativesExchanges

func WithOrderDerivativesExchanges(order string) exchangesOption

WithOrderDerivativesExchanges returns an exchangesOption that sets the ordering of results. The order parameter specifies how to sort the derivatives exchanges in the response.

func WithPageDerivativesExchanges

func WithPageDerivativesExchanges(page int64) exchangesOption

WithPageDerivativesExchanges returns an exchangesOption that sets which page of results to return. The page parameter specifies which page of derivatives exchanges to return in the response.

func WithPerPageDerivativesExchanges

func WithPerPageDerivativesExchanges(perPage int64) exchangesOption

WithPerPageDerivativesExchanges returns an exchangesOption that sets the number of results per page. The perPage parameter specifies how many derivatives exchanges to return per page in the response.

Types

type DerivativesClient

type DerivativesClient struct {
	*internal.Client
}

func NewClient

func NewClient(c *geckohttp.Client, url string) *DerivativesClient

func (*DerivativesClient) Derivatives

func (c *DerivativesClient) Derivatives(ctx context.Context) ([]types.Derivative, error)

Derivatives allows you to query all the tickers from derivatives exchanges on CoinGecko.

📘 Notes

    Data for open_interest and volume_24h in the endpoint responses are in USD
    Cache / Update Frequency: every 30 seconds for all the API plans

func (*DerivativesClient) DerivativesExchanges

func (c *DerivativesClient) DerivativesExchanges(ctx context.Context, options ...exchangesOption) ([]types.Exchange, error)

DerivativesExchanges allows you to query all the derivatives exchanges with related data (id, name, open interest, .... etc) on CoinGecko.

👍 Tips

    You may include values such as per_page and page to specify how many results you would like to show in the responses per page and which page of responses you would like to show

📘Notes

    Cache / Update Frequency: every 60 seconds for all the API plans

func (*DerivativesClient) DerivativesExchangesId

func (c *DerivativesClient) DerivativesExchangesId(ctx context.Context, id string, options ...exchangesByIdOption) (*types.ExchangeId, error)

DerivativesExchangesId allows you to query the derivatives exchange’s related data (id, name, open interest, .... etc) based on the exchanges’ id.

👍 Tips

    You may change the value to either all to include all the tickers or unexpired to include unexpired tickers in the responses for the include_tickers params. You may leave it blank to omit the tickers data in response

📘Notes

    Cache / Update Frequency: every 30 seconds for all the API plans

func (*DerivativesClient) DerivativesExchangesList

func (c *DerivativesClient) DerivativesExchangesList(ctx context.Context) ([]types.DerivativesListItem, error)

DerivativesExchangesList allows you to query all the derivatives exchanges with id and name on CoinGecko.

👍 Tips

    You may use this endpoint to query the list of exchanges for other endpoints that contain params like id (derivatives exchange's id)

📘 Notes

    Cache / Update Frequency: every 5 minutes for all the API plans

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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