Documentation ¶
Index ¶
- func ChainStrings() []string
- func SourcePriceStrings() []string
- type Chain
- func (i Chain) IsAChain() bool
- func (i Chain) MarshalJSON() ([]byte, error)
- func (i Chain) MarshalText() ([]byte, error)
- func (i *Chain) Scan(value interface{}) error
- func (i Chain) String() string
- func (i *Chain) UnmarshalJSON(data []byte) error
- func (i *Chain) UnmarshalText(text []byte) error
- func (i Chain) Value() (driver.Value, error)
- type CoinMarketCapPlatform
- type CoinMarketCapStatus
- type CoinMarketCapTokenInfo
- type Pair
- type PairToken
- type Pairs
- type RedisTokenInfo
- type RedisTokens
- type SourcePrice
- func (i SourcePrice) IsASourcePrice() bool
- func (i SourcePrice) MarshalJSON() ([]byte, error)
- func (i SourcePrice) MarshalText() ([]byte, error)
- func (i *SourcePrice) Scan(value interface{}) error
- func (i SourcePrice) String() string
- func (i *SourcePrice) UnmarshalJSON(data []byte) error
- func (i *SourcePrice) UnmarshalText(text []byte) error
- func (i SourcePrice) Value() (driver.Value, error)
- type Token
- type TokenInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChainStrings ¶
func ChainStrings() []string
ChainStrings returns a slice of all String values of the enum
func SourcePriceStrings ¶
func SourcePriceStrings() []string
SourcePriceStrings returns a slice of all String values of the enum
Types ¶
type Chain ¶
type Chain uint64
enumer -type=Chain -linecomment -json=true -text=true -sql=true
func ChainString ¶
ChainString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func (Chain) IsAChain ¶
IsAChain returns "true" if the value is listed in the enum definition. "false" otherwise
func (Chain) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface for Chain
func (Chain) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface for Chain
func (*Chain) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface for Chain
func (*Chain) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface for Chain
type CoinMarketCapPlatform ¶
type CoinMarketCapStatus ¶
type CoinMarketCapTokenInfo ¶
type Pair ¶
type Pair struct { PriceUsd float64 `json:"priceUsd,string"` BaseToken PairToken `json:"baseToken"` QuoteToken PairToken `json:"quoteToken"` ChainID string `json:"chainId"` DexID string `json:"dexId"` Url string `json:"url"` Volume struct { M5 float64 `json:"m5"` H1 float64 `json:"h1"` H6 float64 `json:"h6"` H24 float64 `json:"h24"` } `json:"volume"` PriceChange struct { M5 float64 `json:"m5"` H1 float64 `json:"h1"` H6 float64 `json:"h6"` H24 float64 `json:"h24"` } `json:"priceChange"` Txns struct { M5 struct { Buys int64 `json:"buys"` Sells int64 `json:"sell"` } `json:"m5"` H1 struct { Buys int64 `json:"buys"` Sells int64 `json:"sell"` } `json:"h1"` H6 struct { Buys int64 `json:"buys"` Sells int64 `json:"sell"` } `json:"h6"` H24 struct { Buys int64 `json:"buys"` Sells int64 `json:"sell"` } `json:"h24"` } `json:"txns"` Liquidity struct { Usd float64 `json:"usd"` } `json:"liquidity"` Info struct { ImageUrl string `json:"imageUrl"` } `json:"info"` Fdv float64 `json:"fdv"` }
type RedisTokenInfo ¶
type RedisTokenInfo struct { Name string `json:"name"` Symbol string `json:"symbol"` CirculatingSupply float64 `json:"circulating_supply"` TotalSupply float64 `json:"total_supply"` MaxSupply float64 `json:"max_supply"` UsdPrice float64 `json:"usd_price"` MarketCap float64 `json:"market_cap"` Tags []string `json:"tags"` Volume24H float64 `json:"volume_24h"` FullyDilutedValuation float64 `json:"fully_diluted_valuation"` PercentChange1H float64 `json:"percent_change_1h"` PercentChange24H float64 `json:"percent_change_24h"` PercentChange7D float64 `json:"percent_change_7d"` }
type RedisTokens ¶
type RedisTokens struct { UpdatedTime int64 `json:"updated_time"` Tokens []RedisTokenInfo `json:"tokens"` }
type SourcePrice ¶
type SourcePrice uint64
enumer -type=SourcePrice -linecomment -json=true -text=true -sql=true
const ( SourcePriceCex SourcePrice = iota + 1 // cex SourcePriceDex // dex )
func SourcePriceString ¶
func SourcePriceString(s string) (SourcePrice, error)
SourcePriceString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func SourcePriceValues ¶
func SourcePriceValues() []SourcePrice
SourcePriceValues returns all values of the enum
func (SourcePrice) IsASourcePrice ¶
func (i SourcePrice) IsASourcePrice() bool
IsASourcePrice returns "true" if the value is listed in the enum definition. "false" otherwise
func (SourcePrice) MarshalJSON ¶
func (i SourcePrice) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface for SourcePrice
func (SourcePrice) MarshalText ¶
func (i SourcePrice) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface for SourcePrice
func (*SourcePrice) Scan ¶
func (i *SourcePrice) Scan(value interface{}) error
func (SourcePrice) String ¶
func (i SourcePrice) String() string
func (*SourcePrice) UnmarshalJSON ¶
func (i *SourcePrice) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for SourcePrice
func (*SourcePrice) UnmarshalText ¶
func (i *SourcePrice) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface for SourcePrice
type Token ¶
type Token struct { UsdPrice float64 `json:"usdPrice"` Address string `json:"tokenAddress"` Symbol string `json:"symbol"` ChainID string `json:"chainId"` SourcePrice SourcePrice `json:"sourcePrice"` ImageUrl string `json:"imageUrl"` DexID string `json:"dexId"` Url string `json:"url"` PriceChangeM5 float64 `json:"priceChangeM5"` PriceChangeH1 float64 `json:"priceChangeH1"` PriceChangeH6 float64 `json:"priceChangeH6"` PriceChangeH24 float64 `json:"priceChangeH24"` }
type TokenInfo ¶
type TokenInfo struct { ID int `json:"id"` Name string `json:"name"` Symbol string `json:"symbol"` Slug string `json:"slug"` CmcRank int `json:"cmc_rank,omitempty"` NumMarketPairs int `json:"num_market_pairs"` CirculatingSupply float64 `json:"circulating_supply"` TotalSupply float64 `json:"total_supply"` MaxSupply float64 `json:"max_supply"` LastUpdated time.Time `json:"last_updated"` DateAdded time.Time `json:"date_added"` Tags []string `json:"tags"` Platform any `json:"platform"` Quote struct { Usd struct { Price float64 `json:"price"` Volume24H float64 `json:"volume_24h"` PercentChange1H float64 `json:"percent_change_1h"` PercentChange24H float64 `json:"percent_change_24h"` PercentChange7D float64 `json:"percent_change_7d"` MarketCap float64 `json:"market_cap"` LastUpdated time.Time `json:"last_updated"` } `json:"USD"` } `json:"quote,omitempty"` }