Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PriceFeedAttributes ¶
type PriceFeeds ¶
type PriceFeeds interface {
GetFeed(id string) (PriceFeedAttributes, bool)
}
PriceFeeds provides metadata for Pyth Network price feeds by ID (256 bits hex number) see https://docs.pyth.network/price-feeds/core/price-feeds/price-feed-ids
var Default PriceFeeds
Default is loaded from the embedded pyth_price_feeds.json
func GetUpdatedWithFallback ¶
func GetUpdatedWithFallback(ctx context.Context, logger *zap.Logger) PriceFeeds
GetUpdatedWithFallback fetches fresh price feed metadata, in case of failure - returns embedded version
func NewFromJSON ¶
func NewFromJSON(data []byte) (PriceFeeds, error)
Click to show internal directories.
Click to hide internal directories.