pyth

package
v1.3.17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 5, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PriceFeedAttributes

type PriceFeedAttributes struct {
	DisplaySymbol string `json:"display_symbol"`
	Symbol        string `json:"symbol"`
	AssetType     string `json:"asset_type"`
	Base          string `json:"base"`
	QuoteCurrency string `json:"quote_currency"`
	Description   string `json:"description"`
}

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL