Versions in this module Expand all Collapse all v1 v1.0.0 Jan 28, 2026 Changes in this version + const AggregatorV3ABI + const DefaultArbitrumRPC + var ArbitrumMainnetFeeds = []FeedConfig + var ArbitrumSepoliaFeeds = []FeedConfig + func FormatPrice(price int64, decimals int) string + type AggregatorV3Response struct + Answer *big.Int + AnsweredInRound *big.Int + RoundID *big.Int + StartedAt *big.Int + UpdatedAt *big.Int + type BatchPriceData struct + FetchedAt time.Time + Network string + Prices []PriceData + type BatchUpdateParams struct + AttestationHashes [][]byte + BatchAttestationHash []byte + Prices []int64 + RoundIDs []int64 + SourceSetIDs []int64 + Symbols []string + Timestamps []uint64 + func (p *BatchUpdateParams) GetAttestationHashHex() string + type Client struct + func NewClient(rpcURL string, network string) (*Client, error) + func (c *Client) Close() + func (c *Client) FetchAllPrices(ctx context.Context) (*BatchPriceData, error) + func (c *Client) FetchPrice(ctx context.Context, feed FeedConfig) (*PriceData, error) + func (c *Client) GetFeeds() []FeedConfig + type FeedCategory string + const CategoryCommodity + const CategoryCrypto + const CategoryDeFi + const CategoryForex + const CategoryIndex + const CategoryL2 + const CategoryStablecoin + const CategoryStaking + type FeedConfig struct + Address string + Base string + Category FeedCategory + Decimals int + Quote string + Symbol string + func GetFeedsForNetwork(network string) []FeedConfig + type PriceData struct + AnsweredIn uint64 + Base string + Category FeedCategory + Decimals int + Price *big.Int + Quote string + RoundID *big.Int + StartedAt time.Time + Symbol string + Timestamp time.Time + type Service struct + func NewService(cfg ServiceConfig) (*Service, error) + func (s *Service) Close() + func (s *Service) GetAllPrices(ctx context.Context) (*BatchPriceData, error) + func (s *Service) GetFeedCount() int + func (s *Service) PrepareForBatchUpdate(ctx context.Context) (*BatchUpdateParams, error) + type ServiceConfig struct + CacheTTL time.Duration + Network string + RPCURL string