switchboard

Integrate Switchboard oracle price feeds, VRF randomness, and Surge streaming into Solana programs.

1|1|Updated May 21, 2026
One-click install
npx skills add https://github.com/naruto11eth/cryptoskills --skill switchboard-naruto11eth
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: switchboard
Source: https://github.com/naruto11eth/cryptoskills/tree/main/skills/switchboard
Command: npx skills add https://github.com/naruto11eth/cryptoskills --skill switchboard-naruto11eth

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? AI agents and developers often lack accurate, up-to-date knowledge of Switchboard's on-demand oracle SDK on Solana, leading to wrong program IDs, deprecated API patterns, and broken feed integrations. ## Core Features & Use Cases - Price Feeds & Oracle Quotes: Fetch and update pull-based feeds or use stateless Oracle Quotes with sub-second latency and 90% cost reduction. - Surge Real-Time Streaming: Subscribe to WebSocket price streams with sub-100ms latency for trading interfaces. - VRF Randomness: Request and consume cryptographically secure verifiable randomness in TypeScript and Rust/Anchor programs. - Use Case: Build a Solana lending program that reads SOL/USD prices via a canonical Oracle Quote account, validates staleness in Rust, and falls back to pull-feed updates from the TypeScript client. ## Quick Start Ask the agent to set up a Switchboard client on Solana devnet and read the current value of a given feed pubkey using the on-demand TypeScript SDK.

Frequently Asked Questions about switchboard

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I integrate Switchboard price feeds into a Solana program?

Use the @switchboard-xyz/on-demand TypeScript SDK to fetch a pull update instruction via fetchUpdateIx, then send it in a versioned transaction. On-chain, read the feed with PullFeedAccountData or consume an Oracle Quote account validated against the canonical queue key.

What is the difference between Switchboard Oracle Quotes and pull feeds?

Oracle Quotes pass signed oracle data directly in the transaction without on-chain storage, giving sub-second latency and 90% lower cost. Pull feeds store values in a feed account that must be updated and maintained, suiting simpler use cases.

How do I use Switchboard VRF randomness in an Anchor program?

Create a randomness account with RandomnessService from the TypeScript client, specifying a callback to your program. In Rust, parse the account with RandomnessAccountData and call get_value with the Clock sysvar to retrieve the random bytes.

Does Switchboard support real-time price streaming?

Yes, Switchboard Surge provides WebSocket streaming with sub-100ms latency. Initialize SwitchboardSurge with the gateway URL, subscribe to symbols like SOL/USD, and handle data, error, and reconnect events.

Why does my Switchboard transaction fail with a stale feed error?

The feed's last updated slot is older than your program's staleness threshold. Call fetchUpdateIx to refresh the feed before reading, or increase the max staleness slot limit if your use case tolerates older data.

What are the Switchboard program IDs for mainnet and devnet?

Mainnet oracle program is SW1TCH7qEPTdLsDHRgPuMQjbQxKdH2aBStViMFnt64f and devnet is Aio4gaXjXzJNVLtzwtNVmSqGKpANtXhybbkhtAC94ji2. Use the ON_DEMAND_MAINNET_PID and ON_DEMAND_DEVNET_PID constants exported by the SDK.