Getting Started with Surge

Overview

Switchboard Surge is the industry's fastest oracle data delivery system, providing sub-100ms latency through direct WebSocket streaming. Built for perpetual exchanges, oracle-based AMMs, and high-frequency trading systems.

πŸš€ Zero Setup Required

Just like Oracle Quotes, Surge requires NO data feed accounts:

  • ❌ No need to create on-chain feed accounts

  • ❌ No need to deploy or manage contracts

  • ❌ No need to fund accounts with SOL

  • βœ… Just get an API key and start streaming prices instantly!

How is Surge So Fast?

Surge capitalizes on Switchboard's SAIL framework to verify a hardware proof of the oracle upon joining the network, proving the oracle signing prices is only running verified Switchboard code. This oracle then streams directly from price discovery sources without needing to report state to any middleware layer like its own L1.

Other pull oracles gather price information, write to a state layer, and come to consensus. Surge verifies a hardware proof on bootup to prove its legitimacy and unalterability and streams directly to users.

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Price Sources  │────▢│  Oracle Network │────▢│  Surge Gateway  β”‚
β”‚  (CEX, DEX)     β”‚     β”‚   (SAIL Verified)β”‚     β”‚   (WebSocket)   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                                         β”‚
                                              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                                              β”‚  Your Application   β”‚
                                              β”‚ β€’ Event Listeners   β”‚
                                              β”‚ β€’ Price Handlers    β”‚
                                              β”‚ β€’ Oracle Quote Converter β”‚
                                              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Key Features

  • Sub-100ms Latency: Direct oracle-to-client streaming

  • Event-Driven: Receive updates as prices change

  • No Polling: Persistent WebSocket eliminates overhead

  • Oracle Quote Compatible: Convert streams to on-chain Oracle Quotes seamlessly

  • Auto-Reconnect: Built-in connection recovery

Implementation

Primary Use Cases

πŸ“ˆ Perpetual Exchanges

πŸ”„ Oracle-Based AMMs

High-Frequency Trading

Using Crossbar to Stream Surge Prices to Your UI

What is Crossbar?

Crossbar is Switchboard's local gateway service that enables you to stream real-time oracle prices directly to your frontend applications.

Setting Up Crossbar

Frontend Integration

Using Surge on Sui

On Sui, Switchboard Surge updates can be used to get low-latency, low-cost feeds running. Watch price streams with sub-300ms latency, and trigger updates when necessary.

Convert streaming prices directly into on-chain oracle Quotes for smart contract integration:

Find the source and examples for integrating Sui in the Switchboard Github.

Current Limits & Pricing

  • Cost: FREE during launch phase

  • Rate Limits: 5 concurrent WebSocket connections per API key

  • Auto-reconnect: Built-in automatic reconnection on disconnect

  • Approval Time: ~3 days for API key

  • Requirements: None - open to all developers

Getting Started

  1. Request API access: https://tinyurl.com/yqubsr8e

    • Approval time: ~3 days

    • No requirements - open to all

    • Currently FREE with 5 concurrent connections

  2. Set up WebSocket connection with your API key

  3. Subscribe to desired price feeds

  4. Auto-reconnection is handled automatically

FAQ

How is Surge different from Oracle Quotes?

Surge streams data directly to your application via WebSocket for real-time use. Oracle Quotes are for on-chain smart contract integration. You can convert Surge updates to Oracle Quotes when needed.

What happens on disconnect?

The SDK includes automatic reconnection logic with exponential backoff. Your application will seamlessly recover from network interruptions.

Can I use custom feeds?

Contact the Switchboard team for custom feed requests.

Next Steps

Last updated