# README
Summary
Pyth Network delivers real-time market data to the Solana blockchain.
This library allows you to query, stream and publish price data using the Go programming language.
Getting Started
Add the Pyth client to your project using the Go CLI.
go get go.blockdaemon.com/pyth@latest
Find docs and usage examples on pkg.go.dev.
Useful Links
Attributions
- Built with 👿 at Blockdaemon
- Using immaterial.ink's awesome Solana Go SDK
# Functions
DecodeInstruction attempts to reconstruct a Pyth command from an on-chain instruction.
InstructionIDToName returns a human-readable name of a Pyth instruction type.
NewAttrsMap returns a new attribute map with an initial arbitrary order.
NewClient creates a new client to the Pyth on-chain program.
NewInstructionBuilder creates a new InstructionBuilder targeting the given Pyth program.
NewPriceEventHandler creates a new event handler over the stream.
PeekAccount determines the account type given the account's data bytes.
ReadAttrsMapFromBinary consumes all bytes from a binary reader, returning an AttrsMap and the number of bytes read.
# Constants
The Account type enum identifies what each Pyth account stores.
The Account type enum identifies what each Pyth account stores.
The Account type enum identifies what each Pyth account stores.
The Account type enum identifies what each Pyth account stores.
Pyth program instructions.
Pyth program instructions.
Pyth program instructions.
Pyth program instructions.
Pyth program instructions.
Pyth program instructions.
Pyth program instructions.
Pyth program instructions.
Pyth program instructions.
Pyth program instructions.
Pyth program instructions.
Pyth program instructions.
Pyth program instructions.
Pyth program instructions.
Magic is the 32-bit number prefixed on each account.
Price status.
Price status.
Price status.
Price status.
ProductAccountHeaderLen is the binary offset of the AttrsData field within RawProductAccount.
V2 identifies the version 2 data format stored in an account.
# Structs
AccountHeader is a 16-byte header at the beginning of each account type.
AttrsMap is a list of string key-value pairs with stable order.
CallbackHandle tracks the lifetime of a callback registration.
Client interacts with Pyth via Solana's JSON-RPC API.
CommandAddPrice is the payload of Instruction_AddPrice.
CommandAddPublisher is the payload of Instruction_AddPublisher.
CommandDelPublisher is the payload of Instruction_DelPublisher.
CommandHeader is an 8-byte header at the beginning any instruction data.
CommandInitPrice is the payload of Instruction_InitPrice.
CommandSetMinPub is the payload of Instruction_SetMinPub.
CommandUpdPrice is the payload of Instruction_UpdPrice or Instruction_UpdPriceNoFailOnError.
CommandUpdProduct is the payload of Instruction_UpdProduct.
CommandUpdTest is the payload Instruction_UpdTest.
Ema is an exponentially-weighted moving average.
Env identifies deployment of the Pyth on-chain program.
No description provided by the author
InstructionBuilder creates new instructions to interact with the Pyth on-chain program.
MappingAccount is a piece of a singly linked-list of all products on Pyth.
MappingAccountEntry is a versioned mapping account and its pubkey.
PriceAccount represents a continuously-updating price feed for a product.
PriceAccountEntry is a versioned price account and its pubkey.
PriceAccountStream is an ongoing stream of on-chain price account updates.
PriceComp contains the price and confidence contributed by a specific publisher.
PriceEventHandler provides a callback-style interface to Pyth updates.
PriceInfo contains a price and confidence at a specific slot.
PriceUpdate is returned to callbacks when an aggregate or component price has been updated.
ProductAccount contains metadata for a single product, such as its symbol and its base/quote currencies.
ProductAccountEntry is a versioned product account and its pubkey.
No description provided by the author
No description provided by the author