switchboard

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

Updated Jul 28, 2026
One-click install
npx skills add https://github.com/IagoPrandi/zeroclaw-plugin --skill switchboard-iagoprandi
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: switchboard
Source: https://github.com/IagoPrandi/zeroclaw-plugin/tree/main/.claude/skills/solana-dev/ext/sendai/skills/switchboard
Command: npx skills add https://github.com/IagoPrandi/zeroclaw-plugin --skill switchboard-iagoprandi

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @switchboard-xyz/on-demand, @switchboard-xyz/common, @coral-xyz/anchor.

What problem does it solve? Bringing reliable off-chain data on-chain is hard: developers need low-latency price feeds, verifiable randomness, and real-time streaming without building oracle infrastructure themselves. This Skill provides complete integration guidance for the Switchboard permissionless oracle protocol on Solana. ## Core Features & Use Cases - Price Feeds & Oracle Quotes: Fetch and update pull-based feeds or use stateless Oracle Quotes for sub-second latency and reduced on-chain costs, in both TypeScript and Rust. - Surge Real-Time Streaming: Subscribe to WebSocket price streams with sub-100ms latency for trading interfaces and high-frequency applications. - VRF Randomness: Request and consume cryptographically secure verifiable random values on-chain. - Use Case: A DeFi developer building a lending protocol uses the Oracle Quote pattern to read SOL/USD prices inside an Anchor program with staleness checks, while the frontend streams live prices via Surge. ## Quick Start Ask the AI to set up a Switchboard client on Solana devnet and fetch a price update for a given feed public key using the 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 an update instruction via PullFeed.fetchUpdateIx, then build a versioned transaction with asV0Tx. In Rust, read the feed with PullFeedAccountData.parse and validate staleness against the Clock sysvar.

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

Oracle Quotes pass signed oracle data directly to your program without on-chain storage, giving sub-second latency and roughly 90% cost reduction. Traditional pull feeds store values in a feed account that requires cranking and update transactions.

Does Switchboard support VRF randomness on Solana?▼

Yes, Switchboard provides verifiable random functions through RandomnessService in TypeScript and RandomnessAccountData in Rust. You request randomness with a callback, then reveal and consume the value on-chain after oracle fulfillment.

Why does my Switchboard feed read fail with a stale feed error?▼

The feed has not been updated within your program's maximum staleness slot threshold. Call fetchUpdateIx to refresh the feed before reading, or increase the staleness limit if your use case tolerates older data.

How do I stream real-time crypto prices with Switchboard Surge?▼

Create a SwitchboardSurge client with the wss://surge.switchboard.xyz gateway, subscribe to symbols like SOL/USD, and handle data events. Enable autoReconnect and provide an API key for higher rate limits.

What are the Switchboard program IDs for mainnet and devnet?▼

The mainnet Oracle Program is SW1TCH7qEPTdLsDHRgPuMQjbQxKdH2aBStViMFnt64f and devnet is Aio4gaXjXzJNVLtzwtNVmSqGKpANtXhybbkhtAC94ji2. Use the ON_DEMAND_MAINNET_PID and ON_DEMAND_DEVNET_PID SDK constants to select automatically.