Meta Aggregator Quote Streaming

Github

Live demo

This example shows how to stream real-time swap quotes from multiple aggregators simultaneously.

Architecture Overview

🏗️ Backend Infrastructure

  • Ooga Booga Meta Dex Aggregator: Service providing real-time swap quotes

  • Server-Sent Events: Streaming infrastructure for live updates

📁 Frontend Components

  1. API Layer (src/api/meta-stream-api.ts)

    • Manages SSE connections to the aggregator API

    • Handles quote stream parameters and events

  2. Connection Management (src/hooks/use-quote-stream.ts)

    • React hook for managing quote streams

    • Event subscription and cleanup lifecycle

  3. Business Logic (src/hooks/use-aggregators-quote.ts)

    • Preconfigured hook for USDT/HYPE quotes

    • Built on top of useQuoteStream

  4. UI Components (src/components/)

    • React components for displaying quote data

✅ That's everything you need to get started with streaming quotes!

Last updated