Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertCoingeckoPrices ¶
func ConvertCoingeckoPrices(prices []MarketTicker) []types.TokenPrice
func GetTokensPrices ¶
func GetTokensPrices(ids []string) ([]types.TokenPrice, error)
GetTokensPrices queries the remote APIs to get the token prices of all the tokens having the given ids
Types ¶
type MarketTicker ¶
type MarketTicker struct { Symbol string `json:"symbol"` CurrentPrice float64 `json:"current_price"` MarketCap float64 `json:"market_cap"` LastUpdated time.Time `json:"last_updated"` }
MarketTicker contains the current market data for a single token
Click to show internal directories.
Click to hide internal directories.