cryptocompare

package
v0.174.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

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
}

func NewClient

func NewClient() *Client

func (*Client) DoQuery

func (c *Client) DoQuery(url string) (*http.Response, error)

func (*Client) FetchHistoricalDailyPrices

func (c *Client) FetchHistoricalDailyPrices(symbol string, currency string, limit int, allData bool, aggregate int) ([]thirdparty.HistoricalPrice, error)

func (*Client) FetchHistoricalHourlyPrices

func (c *Client) FetchHistoricalHourlyPrices(symbol string, currency string, limit int, aggregate int) ([]thirdparty.HistoricalPrice, error)

func (*Client) FetchPrices

func (c *Client) FetchPrices(symbols []string, currencies []string) (map[string]map[string]float64, error)

func (*Client) FetchTokenDetails

func (c *Client) FetchTokenDetails(symbols []string) (map[string]thirdparty.TokenDetails, error)

func (*Client) FetchTokenMarketValues

func (c *Client) FetchTokenMarketValues(symbols []string, currency string) (map[string]thirdparty.TokenMarketValues, error)

type HistoricalPricesContainer

type HistoricalPricesContainer struct {
	Aggregated     bool                         `json:"Aggregated"`
	TimeFrom       int64                        `json:"TimeFrom"`
	TimeTo         int64                        `json:"TimeTo"`
	HistoricalData []thirdparty.HistoricalPrice `json:"Data"`
}

type HistoricalPricesData

type HistoricalPricesData struct {
	Data HistoricalPricesContainer `json:"Data"`
}

type MarketValuesContainer

type MarketValuesContainer struct {
	Raw map[string]map[string]thirdparty.TokenMarketValues `json:"Raw"`
}

type TokenDetailsContainer

type TokenDetailsContainer struct {
	Data map[string]thirdparty.TokenDetails `json:"Data"`
}

Jump to

Keyboard shortcuts

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