Versions in this module Expand all Collapse all v0 v0.2.0 Oct 12, 2026 Changes in this version type APIAddon + Period AllowancePeriod + RPM int type APIUsage + DailyRequestsUsed int + func (u *APIUsage) Allowance() (allowance Allowance, ok bool) + type Allowance struct + Limit int + Period AllowancePeriod + Used int + func (a Allowance) Remaining() int + type AllowancePeriod string + const AllowanceDaily + const AllowanceMonthly v0.1.0 Oct 8, 2026 Changes in this version + const DefaultBaseURL + var ErrResponseTooLarge = errors.New("response exceeds the configured size limit") + type APIAddon struct + Value int + type APIError struct + Detail string + Endpoint string + RetryAfter time.Duration + StatusCode int + func (e *APIError) Error() string + func (e *APIError) Retryable() bool + type APIUsage struct + APIAddons []APIAddon + CreditsUsed int + func (u *APIUsage) CreditsPerMonth() int + func (u *APIUsage) UnmarshalJSON(data []byte) error + type Asset struct + AssetType string + Blockchains []Blockchain + Categories []string + DefaultNetwork string + ExternalIDs map[string]string + ID string + LogoURL string + Name string + SemanticTags []string + Symbol string + type AssetsResponse struct + Data []Asset + type AuthError struct + Err error + func (e *AuthError) Error() string + func (e *AuthError) Unwrap() error + type Blockchain struct + Address string + Blockchain string + Decimals int + OnChainSupport bool + type BulkDataPoint struct + Bulk []BulkEntry + Timestamp int64 + func (p *BulkDataPoint) UnmarshalJSON(data []byte) error + type BulkEntry struct + Params map[string]string + Value *float64 + func (p *BulkEntry) UnmarshalJSON(data []byte) error + func (p BulkEntry) Asset() string + func (p BulkEntry) MarshalJSON() ([]byte, error) + func (p BulkEntry) Network() string + type Client struct + func NewClient(apiKey string, options ...Option) (*Client, error) + func (c *Client) Get(ctx context.Context, endpoint string, params url.Values, dst any) error + func (c *Client) GetAPIUsage(ctx context.Context) (*APIUsage, error) + func (c *Client) GetBulkMetric(ctx context.Context, path string, params *MetricParams) ([]BulkDataPoint, error) + func (c *Client) GetMetric(ctx context.Context, path string, params *MetricParams, dst any) error + func (c *Client) GetMetricCSV(ctx context.Context, path string, params *MetricParams, w io.Writer) error + func (c *Client) GetMetricMetadata(ctx context.Context, path string, params *MetricParams) (*MetricMetadata, error) + func (c *Client) GetMetricStats(ctx context.Context, path string, params *MetricParams) (*MetricStats, error) + func (c *Client) GetObjectTimeSeries(ctx context.Context, path string, params *MetricParams) ([]ObjectTimeSeriesPoint, error) + func (c *Client) GetTimeSeries(ctx context.Context, path string, params *MetricParams) ([]TimeSeriesPoint, error) + func (c *Client) ListAssetBlockchains(ctx context.Context, filter string) ([]string, error) + func (c *Client) ListAssetCategories(ctx context.Context, filter string) ([]string, error) + func (c *Client) ListAssetTags(ctx context.Context, filter string) ([]string, error) + func (c *Client) ListAssets(ctx context.Context, filter string) ([]Asset, error) + func (c *Client) ListExchanges(ctx context.Context) ([]string, error) + func (c *Client) ListMetricTags(ctx context.Context) ([]string, error) + func (c *Client) ListMetrics(ctx context.Context, params *MetricParams) ([]string, error) + func (c *Client) ListMiners(ctx context.Context) ([]string, error) + func (c *Client) ListNames(ctx context.Context, endpoint, filter string) ([]string, error) + func (c *Client) ListNetworks(ctx context.Context) ([]string, error) + func (c *Client) Raw(ctx context.Context, endpoint string, params url.Values) ([]byte, error) + type DecodeError struct + Endpoint string + Err error + func (e *DecodeError) Error() string + func (e *DecodeError) Unwrap() error + type InputError struct + Field string + Message string + func (e *InputError) Error() string + type LagPercentiles struct + P50 *float64 + P90 *float64 + P95 *float64 + P99 *float64 + type MetricDescriptors struct + DataSharingGroup string + Description map[string]string + Group string + Name string + ShortName string + Tags []string + type MetricLagEntry struct + Resolution map[string]LagPercentiles + Unit string + Window string + type MetricMetadata struct + BulkSupported bool + Descriptors *MetricDescriptors + IsPIT bool + Modified int64 + Parameters map[string][]string + ParametersDefaults map[string][]string + Path string + Queried map[string]string + Refs Refs + Tier int + TimeRange *TimeRange + func (m *MetricMetadata) UnmarshalJSON(data []byte) error + type MetricParams struct + Asset string + Assets []string + Currency string + Exchanges []string + Extra url.Values + Interval string + Since time.Time + Until time.Time + func (p *MetricParams) Values() (url.Values, error) + type MetricStats struct + Lag []MetricLagEntry + type MetricVariant struct + Base *string + Bulk *string + PIT *string + type NameEntry struct + Name string + type NamesResponse struct + Data []NameEntry + type ObjectTimeSeriesPoint struct + ComputedAt *int64 + Object map[string]*float64 + Timestamp int64 + func (p *ObjectTimeSeriesPoint) UnmarshalJSON(data []byte) error + type Option func(*Client) error + func WithAPIKeyInQuery() Option + func WithBaseURL(raw string) Option + func WithBearerToken(token string) Option + func WithHTTPClient(client *http.Client) Option + func WithMaxResponseBytes(limit int64) Option + func WithRetryPolicy(policy RetryPolicy) Option + func WithTimeout(timeout time.Duration) Option + func WithTokenSource(source TokenSource) Option + func WithUserAgent(agent string) Option + type Refs struct + Docs string + MetricVariant *MetricVariant + Studio string + type ResponseTooLargeError struct + Endpoint string + Limit int64 + func (e *ResponseTooLargeError) Error() string + func (e *ResponseTooLargeError) Unwrap() error + type RetryPolicy struct + BaseDelay time.Duration + MaxDelay time.Duration + MaxRetries int + type TimeRange struct + Max int64 + Min int64 + type TimeSeriesPoint struct + ComputedAt *int64 + Timestamp int64 + Value *float64 + func (p *TimeSeriesPoint) UnmarshalJSON(data []byte) error + type TokenRefresher interface + Refresh func(ctx context.Context) (string, error) + type TokenSource interface + Token func(ctx context.Context) (string, error) + type TokenSourceFunc func(context.Context) (string, error) + func (f TokenSourceFunc) Token(ctx context.Context) (string, error) + type TransportError struct + Endpoint string + Err error + func (e *TransportError) Error() string + func (e *TransportError) Unwrap() error