PriceUpdateV2
price account. It is a focused starting point for any protocol instruction whose amount depends on
a live market price.
View Repository
Build and test the Anchor example against local oracle fixtures.
Prediction & Trading Architecture
Apply the pricing pattern to positions, collateral, liquidation, and settlement.
What the example demonstrates
- binding program configuration to an expected oracle feed ID;
- rejecting prices that are not fully verified, not positive, or older than 60 seconds. The positive-price check matters: a new MagicBlock feed starts as fully verified with a price of 0;
- converting a USD-denominated amount into lamports;
- enforcing a buyer-provided maximum to protect against price movement.
Oracle Overview
Understand MagicBlock’s low-latency pricing feeds.
Oracle Implementation
Read and validate pricing accounts in your program.

