Documentation ¶
Index ¶
Constants ¶
const (
// SymbolETH refers to the ethereum symbol.
SymbolETH = "ETH"
)
Variables ¶
This section is empty.
Functions ¶
func GetComputedPrices ¶ added in v1.4.0
func GetComputedPrices( logger zerolog.Logger, providerCandles pfprovider.AggregatedProviderCandles, providerPrices pfprovider.AggregatedProviderPrices, providerPairs map[pfprovider.Name][]pftypes.CurrencyPair, deviations map[string]sdk.Dec, ) (prices map[string]sdk.Dec, err error)
GetComputedPrices gets the candle and ticker prices and computes it. It returns candles' TVWAP if possible, if not possible (not available or due to some staleness) it will use the most recent ticker prices and the VWAP formula instead.
func GetStablecoinsCurrencyPair ¶
func GetStablecoinsCurrencyPair(baseSymbol string) []umeepftypes.CurrencyPair
GetStablecoinsCurrencyPair return the currency pair of that symbol quoted by some stablecoins.
Types ¶
type Oracle ¶
type Oracle struct {
// contains filtered or unexported fields
}
Oracle implements the core component responsible for fetching exchange rates for a given set of currency pairs and determining the correct exchange rates.
func (*Oracle) Stop ¶
func (o *Oracle) Stop()
Stop stops the oracle process and waits for it to gracefully exit.
func (*Oracle) SubscribeSymbols ¶
SubscribeSymbols attempts to subscribe the symbols in all the providers. baseSymbols is the base to be subscribed ex.: ["UMEE", "ATOM"].
type Provider ¶
type Provider struct { pfprovider.Provider // contains filtered or unexported fields }
Provider wraps the umee provider interface.