zerion

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2025 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attributes

type Attributes struct {
	Name       string     `json:"name"`
	Symbol     string     `json:"symbol"`
	MarketData MarketData `json:"market_data"`
}

type Chart added in v0.4.4

type Chart struct {
	ChartData ChartData `json:"data"`
}

type ChartAttributes added in v0.4.4

type ChartAttributes struct {
	BeginAt string  `json:"begin_at"`
	EndAt   string  `json:"end_at"`
	Stats   Stats   `json:"stats"`
	Points  []Point `json:"points"`
}

type ChartData added in v0.4.4

type ChartData struct {
	ID              string          `json:"id"`
	ChartAttributes ChartAttributes `json:"attributes"`
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(apiURL, authKey string, client *http.Client) *Client

func (*Client) GetFungibleChart added in v0.4.4

func (c *Client) GetFungibleChart(id string, period string) (*ChartData, error)

func (*Client) GetFungibleData added in v0.4.4

func (c *Client) GetFungibleData(id string) (*FungibleData, error)

func (*Client) GetFungibleList added in v0.4.3

func (c *Client) GetFungibleList(ids string, address string) (*FungibleList, error)

type Fungible added in v0.4.4

type Fungible struct {
	FungibleData FungibleData `json:"data"`
}

type FungibleData

type FungibleData struct {
	ID         string     `json:"id"`
	Attributes Attributes `json:"attributes"`
}

type FungibleList

type FungibleList struct {
	List []FungibleData `json:"data"`
}

type MarketData

type MarketData struct {
	TotalSupply           float64 `json:"total_supply"`
	CirculatingSupply     float64 `json:"circulating_supply"`
	MarketCap             float64 `json:"market_cap"`
	FullyDilutedValuation float64 `json:"fully_diluted_valuation"`
	Price                 float64 `json:"price"`
}

type Point added in v0.4.4

type Point struct {
	Time  time.Time
	Price float64
}

func (*Point) UnmarshalJSON added in v0.4.4

func (p *Point) UnmarshalJSON(data []byte) error

type Stats added in v0.4.4

type Stats struct {
	First float64 `json:"first"`
	Min   float64 `json:"min"`
	Avg   float64 `json:"avg"`
	Max   float64 `json:"max"`
	Last  float64 `json:"last"`
}

Jump to

Keyboard shortcuts

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