Key Concepts

⚠️ Important: Quotes simulation

πŸ”’ Connect your wallet to get real, pre-simulated pricing from the Ooga Booga backend.

Without wallet connection, quotes may be spoofed or manipulated by aggregators. Connected wallets receive verified quotes that reflect actual execution prices.

🌐 Quote Stream API

The application connects to a streaming API for real-time swap quotes:

const AGGREGATOR_BASE_URL = 'https://hyperevm.api.oogabooga.io/meta/stream/swap'

Supported Parameters

Parameter
Type
Description

tokenIn

string

Input token address

tokenOut

string

Output token address

amount

string

Amount to swap (in token units)

maxSlippage

string

Maximum acceptable slippage (default: 0.01)

to

string

Recipient address

aggregators

string[]

Specific aggregators to query

πŸ“‘ Event Types

The SSE stream emits the following events:

  • connected - Initial connection established

  • quote - New quote data received

  • error - Error occurred during streaming

  • heartbeat - Keep-alive signal

πŸ“Š Quote Data Structure

Each quote contains comprehensive swap information:

πŸ”§ Usage Examples

Basic Quote Stream Implementation

Last updated