> For the complete documentation index, see [llms.txt](https://docs.oogabooga.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.oogabooga.io/developers/meta-api/streaming-vs-polling.md).

# 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 <david@oogabooga.io>

***


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.oogabooga.io/developers/meta-api/streaming-vs-polling.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
