Documentation
¶
Index ¶
Constants ¶
View Source
const ( // CoinGeckoCurrencyUSD is the name of US dollars in CoinGecko. CoinGeckoCurrencyUSD = "usd" // CoinGeckoCurrencyEUR is the name of euros in CoinGecko. CoinGeckoCurrencyEUR = "eur" // CoinGeckoCurrencyCAD is the name of Canadian dollars in CoinGecko. CoinGeckoCurrencyCAD = "cad" // CoinGeckoCurrencyAUD is the name of Australian dollars in CoinGecko. CoinGeckoCurrencyAUD = "aud" // CoinGeckoCurrencyGBP is the name of British pounds in CoinGecko. CoinGeckoCurrencyGBP = "gbp" // CoinGeckoCurrencyJPY is the name of Japanese yen in CoinGecko. CoinGeckoCurrencyJPY = "jpy" // CoinGeckoCurrencyCNY is the name of Chinese yuan in CoinGecko. CoinGeckoCurrencyCNY = "cny" // CoinGeckoCurrencyBTC is the name of Bitcoin in CoinGecko. CoinGeckoCurrencyBTC = "btc" // CoinGeckoCurrencyETH is the name of Ethereum in CoinGecko. CoinGeckoCurrencyETH = "eth" )
View Source
const ( // CurrencyUSD represents US dollars. CurrencyUSD = "USD" // CurrencyEUR represents euros. CurrencyEUR = "EUR" // CurrencyCAD represents Canadian dollars. CurrencyCAD = "CAD" // CurrencyAUD represents Australian dollars. CurrencyAUD = "AUD" // CurrencyGBP represents British pounds. CurrencyGBP = "GBP" // CurrencyJPY represents Japanese yen. CurrencyJPY = "JPY" // CurrencyCNY represents Chinese yuan. CurrencyCNY = "CNY" // CurrencyBTC represents Bitcoin. CurrencyBTC = "BTC" // CurrencyETH represents Ethereum. CurrencyETH = "ETH" )
View Source
const ( // KrakenPairSiacoinUSD is the ID of SC/USD pair in Kraken KrakenPairSiacoinUSD = "SCUSD" // KrakenPairSiacoinEUR is the ID of SC/EUR pair in Kraken KrakenPairSiacoinEUR = "SCEUR" // KrakenPairSiacoinBTC is the ID of SC/BTC pair in Kraken KrakenPairSiacoinBTC = "SCXBT" )
View Source
const (
// CoinGeckoTokenSiacoin is the token ID of Siacoin in CoinGecko
CoinGeckoTokenSiacoin = "siacoin"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Source ¶
An Source returns the price of 1 unit of an asset in USD.
func NewAverager ¶
NewAverager returns an exchange rate source that averages multiple exchange rates.
Click to show internal directories.
Click to hide internal directories.