Streaming vs Polling

The Meta API provides two ways to obtain swap quotes:

  • Polling — via the /meta/swap endpoint

  • Streaming — via the /meta/stream/swap endpoint


/meta/stream/swap — Streaming Quotes

Establishes a Server-Sent Events (SSE) stream that returns quotes in real time.

  • Quotes are delivered on a first-come, first-served basis.

  • Aggregators that respond sooner will be sent to the client immediately.

  • Events include connection status, quotes, errors, heartbeats, and completion notifications.

  • Intended to be directly integrated on frontend code.

  • No authentication required only sensible IP based rate limits.


/meta/swap — Polling Quotes

Fetches swap quotes for one or more aggregators in a single response.

  • The aggregators query parameter defines which aggregators to query.

  • If omitted, the API defaults to all available aggregators.

  • The response always includes oogaBooga as a baseline aggregator.

  • Quotes from other aggregators are subject to a 500ms cutoff window; slower responses are excluded.

  • The cutoff is based on observed averages and may be tuned in future releases.

  • More suitable for backend usage.

  • Requires an API key for authentication. Request key from [email protected]


Last updated