Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CoinGecko ¶
type CoinGecko struct{}
CoinGecko is market data provider.
func (CoinGecko) GetTezosMarketData ¶
func (CoinGecko) GetTezosMarketData() (md models.MarketInfo, err error)
GetTezosMarketData gets the tezos price and price change from CoinGecko API. TODO: some caching layer should be implemented.
type USDMarketData ¶
type USDMarketData struct { Price float64 `json:"current_price"` Price24hChange float64 `json:"price_change_24h"` MarketCap float64 `json:"market_cap"` Volume float64 `json:"total_volume"` Supply float64 `json:"circulating_supply"` }
MarketData is a Price and Price Change with json deserialization for USD .
func (*USDMarketData) GetMarketCap ¶
func (md *USDMarketData) GetMarketCap() float64
func (*USDMarketData) GetPrice ¶
func (md *USDMarketData) GetPrice() float64
GetPrice returns the price in USD.
func (*USDMarketData) GetPriceChange ¶
func (md *USDMarketData) GetPriceChange() float64
GetPriceChange returns the price change during the last 24 hours in percents.
func (*USDMarketData) GetSupply ¶
func (md *USDMarketData) GetSupply() float64
func (*USDMarketData) GetVolume ¶
func (md *USDMarketData) GetVolume() float64
Click to show internal directories.
Click to hide internal directories.