dashboard

package
v0.0.0-...-ba036dd Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type ChartItem

type ChartItem struct {
	Timestamp time.Time `json:"t"`
	Value     string    `json:"v"`
}

type ChartRes

type ChartRes []ChartItem

type ChartType

type ChartType = string
const (
	ChartTypeVolume ChartType = "volume"
	ChartTypeTvl    ChartType = "tvl"
	ChartTypeApr    ChartType = "apr"
	ChartTypeFee    ChartType = "fee"
	ChartTypePrice  ChartType = "price"
	ChartTypeNone   ChartType = ""
)

func ToChartType

func ToChartType(s string) ChartType

type PoolDetailRes

type PoolDetailRes struct {
	Recent RecentRes `json:"recent"`
	Txs    TxsRes    `json:"txs"`
}

type PoolRes

type PoolRes struct {
	Address string `json:"address"`
	Tvl     string `json:"tvl"`
	Volume  string `json:"volume"`
	Fee     string `json:"fee"`
	Apr     string `json:"apr"`
}

type PoolsRes

type PoolsRes []PoolRes

type RecentRes

type RecentRes struct {
	Volume           string  `json:"volume"`
	VolumeChangeRate float32 `json:"volumeChangeRate"`
	Fee              string  `json:"fee"`
	FeeChangeRate    float32 `json:"feeChangeRate"`
	Tvl              string  `json:"tvl"`
	TvlChangeRate    float32 `json:"tvlChangeRate"`
	Apr              float32 `json:"apr"`
	AprChangeRate    float32 `json:"aprChangeRate"`
}

type StatisticRes

type StatisticRes []StatisticResItem

type StatisticResItem

type StatisticResItem struct {
	AddressCount uint64    `json:"addressCount"`
	TxCount      uint64    `json:"txCount"`
	Fee          string    `json:"fee"`
	Timestamp    time.Time `json:"timestamp"`
}

type TokenRes

type TokenRes struct {
	Address         string  `json:"address"`
	Price           string  `json:"price"`
	PriceChange     float32 `json:"priceChange"`
	Volume24h       string  `json:"volume24h"`
	Volume24hChange string  `json:"volume24hChange,omitempty"`
	Volume7d        string  `json:"volume7d,omitempty"`
	Volume7dChange  string  `json:"volume7dChange,omitempty"`
	Tvl             string  `json:"tvl"`
	TvlChange       string  `json:"tvlChange,omitempty"`
	Fee             string  `json:"fee,omitempty"`
}

type TokensRes

type TokensRes []TokenRes

type TxRes

type TxRes struct {
	Action        string `json:"action"`
	ActionDisplay string `json:"actionDisplay"`

	Address      string    `json:"address"`
	Hash         string    `json:"hash"`
	TotalValue   string    `json:"totalValue"`
	Asset0       string    `json:"asset0"`
	Asset0Amount string    `json:"asset0amount"`
	Asset1       string    `json:"asset1"`
	Asset1Amount string    `json:"asset1amount"`
	Account      string    `json:"account"`
	Timestamp    time.Time `json:"timestamp"`
}

type TxType

type TxType string
const (
	TX_TYPE_SWAP   TxType = "swap"
	TX_TYPE_ADD    TxType = "add"
	TX_TYPE_REMOVE TxType = "remove"
	TX_TYPE_ALL    TxType = ""
)

type TxsRes

type TxsRes []TxRes

Jump to

Keyboard shortcuts

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