Basic Price Feed Tutorial
What You'll Build
Prerequisites
Key Concepts
Managed Updates
The Two-Instruction Pattern
Feed IDs
The On-Chain Program
Code Walkthrough
Imports
The Instruction
Account Validation
Sysvars
The TypeScript Client
Client Code Walkthrough
Step 1: Load Environment
Step 2: Derive Canonical Account
Step 3: Simulate Feed (Optional)
Step 4: Create Update Instructions
Step 5-7: Build and Send Transaction
Running the Example
1. Clone the Examples Repository
2. Install Dependencies
3. Configure Your Environment
4. Build and Deploy the Program (Optional)
5. Run the Example
Expected Output
Adding to Your Program
1. Add Dependencies
2. Add the Account Struct
3. Read the Price
Next Steps
Last updated