Deriving the Price Feed Account
We derive the PDA of the price account using the following seeds:- “price feed” (buffer)
- “pyth-lazer” (buffer)
- feedID (buffer) — the asset you want. Find the supported feeds here.
- price program id —
PriCems5tHihc6UDXDjzjeawomAwBduWMGAi8ZUjppd
Parsing the Account
The on‑chain account stores a header and fields for price data. We read raw bytes and decode.- Price offset: 73 bytes from start
- Type: signed 64‑bit integer (
i64
) - Apply exponent: scale the raw price using the account’s exponent