Skip to main content
GET
Stream quotes (SSE)

Overview

The streaming-quotes endpoint emits Server-Sent Events as each protocol returns a quote, instead of waiting for all protocols to complete. Use this for snappy UI — display the first quote in ~200ms instead of waiting 5+ seconds for the slowest aggregator. For a hands-on walkthrough see the Streaming Quotes guide.

Endpoint

Request

Authentication

EventSource cannot set custom headers reliably, so authentication accepts both styles:

Query Parameters

Response

Headers

Event Sequence

Events are sent as data: <json>\n\n chunks (legacy SSE format — no named event: fields). If no protocols return a usable quote, an error event is sent in place of final.

Event Payloads

Quote Object Fields (in final event)

Timeouts

  • Total budget: 8 seconds. Protocols that haven’t responded by then are dropped.
  • Per-protocol circuit breaker: 5 seconds. Protocols that fail repeatedly are skipped.

Examples

Browser (EventSource)

Server (fetch)

Errors

The UNABLE_TO_RETRIEVE_QUOTES error is delivered inside the SSE stream as a type: "error" event, not as an HTTP error. See the error codes catalog for the full list.

Authorizations

Api-Key
string
header
required

Demo API-Key (Sandbox): 7037d2b3-9c76-4f62-b730-c544f7570fa4

Query Parameters

from_asset
string
required

Input asset identifier.

to_asset
string
required

Output asset identifier.

origin
string
required

From wallet address.

destination
string
required

To wallet address.

amount
string
required

Amount to swap.

api_key
string

Alternative to Api-Key header (useful for EventSource which cannot set headers).

Response

Server-Sent Events stream. Events are sent as data: {json}\n\n format.

SSE stream with events: init, quote (per protocol), final (sorted), finished.