cryptocompare

package
v0.180.31 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const CryptoCompareStatusProxyURL = "https://cryptocompare.test.api.status.im"

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 NewClientWithURL added in v0.180.31

func NewClientWithURL(url string) *Client

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