Documentation
¶
Index ¶
- func WithCoinIdsTickers(ids []string) tickersOption
- func WithDepthTickers(depth bool) tickersOption
- func WithIncludeExchangeLogoTickers(include bool) tickersOption
- func WithOrderTickers(order string) tickersOption
- func WithPageExchagesOption(page int64) exchangesOption
- func WithPageTickers(page int64) tickersOption
- func WithPerPageExchagesOption(perPage int64) exchangesOption
- func WithStatus(status string) listOption
- type ExchangesClient
- func (c *ExchangesClient) Exchanges(ctx context.Context, options ...exchangesOption) (*types.ExchangesList, error)
- func (c *ExchangesClient) ExchangesId(ctx context.Context, id string) (*types.ExchangeWithTicker, error)
- func (c *ExchangesClient) ExchangesIdTickers(ctx context.Context, id string) (*types.Tickers, error)
- func (c *ExchangesClient) ExchangesIdVolumeChart(ctx context.Context, id, days string) ([]types.Volume, error)
- func (c *ExchangesClient) ExchangesList(ctx context.Context, options ...listOption) ([]types.ExchangeId, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithCoinIdsTickers ¶
func WithCoinIdsTickers(ids []string) tickersOption
WithCoinIdsTickers returns a tickersOption that filters tickers by coin IDs. The ids parameter specifies which coin IDs to include in the response.
func WithDepthTickers ¶
func WithDepthTickers(depth bool) tickersOption
WithDepthTickers returns a tickersOption that controls inclusion of order book depth. When depth is true, order book depth data will be included in the response.
func WithIncludeExchangeLogoTickers ¶
func WithIncludeExchangeLogoTickers(include bool) tickersOption
WithIncludeExchangeLogoTickers returns a tickersOption that controls inclusion of exchange logos. When include is true, exchange logos will be included in the response.
func WithOrderTickers ¶
func WithOrderTickers(order string) tickersOption
WithOrderTickers returns a tickersOption that sets the ordering of results. The order parameter specifies how to sort the tickers in the response.
func WithPageExchagesOption ¶
func WithPageExchagesOption(page int64) exchangesOption
WithPageExchagesOption returns an exchangesOption that sets which page of results to return. The page parameter specifies which page of exchanges to return in the response.
func WithPageTickers ¶
func WithPageTickers(page int64) tickersOption
WithPageTickers returns a tickersOption that sets which page of results to return. The page parameter specifies which page of tickers to return in the response.
func WithPerPageExchagesOption ¶
func WithPerPageExchagesOption(perPage int64) exchangesOption
WithPerPageExchagesOption returns an exchangesOption that sets the number of results per page. The perPage parameter specifies how many exchanges to return per page in the response.
func WithStatus ¶
func WithStatus(status string) listOption
WithStatus returns a listOption that filters exchanges by their status. The status parameter can be used to filter exchanges based on their current operational status.
Types ¶
type ExchangesClient ¶
func (*ExchangesClient) Exchanges ¶
func (c *ExchangesClient) Exchanges(ctx context.Context, options ...exchangesOption) (*types.ExchangesList, error)
Exchanges allows you to query all the supported exchanges with exchanges’ data (id, name, country, .... etc) that have active trading volumes 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
All the exchanges in the responses are the exchanges with active trading volume on CoinGecko, any inactive or deactivated exchanges will be removed from the list
Cache / Update Frequency: every 60 seconds for all the API plans
func (*ExchangesClient) ExchangesId ¶
func (c *ExchangesClient) ExchangesId(ctx context.Context, id string) (*types.ExchangeWithTicker, error)
ExchangesId endpoint allows you to query exchange’s data (name, year established, country, .... etc), exchange volume in BTC and top 100 tickers based on exchange’s id.
📘 Notes
The exchange volume in the response is provided in BTC. To convert it to other currencies, please use /exchange_rates endpoint
For derivatives (e.g. bitmex, binance_futures), to get derivatives exchanges data, please go to /derivatives/exchange/{id} endpoint
Tickers are limited to 100 items, to get more tickers, please go to /exchanges/{id}/tickers endpoint
Cache / Update Frequency: every 60 seconds for all the API plans
func (*ExchangesClient) ExchangesIdTickers ¶
func (c *ExchangesClient) ExchangesIdTickers(ctx context.Context, id string) (*types.Tickers, error)
ExchangesIdTickers allows you to query exchange's tickers based on exchange’s id.
📘 Notes
Responses are paginated and limited to 100 tickers per page. You may specify the page number using the page params to retrieve the tickers accordingly
Cache / Update Frequency: every 60 seconds for all the API plans
func (*ExchangesClient) ExchangesIdVolumeChart ¶
func (c *ExchangesClient) ExchangesIdVolumeChart(ctx context.Context, id, days string) ([]types.Volume, error)
ExchangesIdVolumeChart allows you to query the historical volume chart data with time in UNIX and trading volume data in BTC based on exchange’s id.
📘 Notes
You can use this endpoint to query the historical volume chart data of derivatives exchanges as well
The exchange volume in the response is provided in BTC. To convert it to other currencies, please use /exchange_rates endpoint
Data granularity is automatic (cannot be adjusted)
1 day = 10-minutely
7, 14 days = hourly
30 days & above = daily
Cache / Update Frequency: every 60 seconds for all the API plans
func (*ExchangesClient) ExchangesList ¶
func (c *ExchangesClient) ExchangesList(ctx context.Context, options ...listOption) ([]types.ExchangeId, error)
ExchangesList allows you to query all the supported exchanges with exchanges’ data (id, name, country, .... etc) that have active trading volumes 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
All the exchanges in the responses are the exchanges with active trading volume on CoinGecko, any inactive or deactivated exchanges will be removed from the list
Cache / Update Frequency: every 60 seconds for all the API plans