/quote. GET /quote/stream keeps the question open and the router answers it again whenever an account of the route it served is written: the pool, or one of its vaults. A quiet pool sends no change-driven updates; a busy one sends at most one quote per pacing interval.
Every quote is the one GET /quote would answer at that moment, made by the same code, and its body travels unchanged as data: parse it as you parse /quote, and build it with POST /swap-instructions like any other quote.
Opening a connection uses one request from the key’s rate limit. Billing is per started minute the WebSocket or SSE connection stays open (
router / stream_minute), even when idle. There is no separate charge for opening it or for individual quotes.WebSocket
Openwss://router.raze.bot/quote/stream (with the API key) and send JSON text frames.
seq grows by one per frame of a subscription. A quote that changes nothing you can see (amounts, route, fees) is not sent again, except once every 5 seconds, so a flat price and a dead stream look different. Without any write on its route a subscription is quoted again every second anyway, so the route can move to a pool it was not watching.
Server-sent events
Without the WebSocket upgrade,GET /quote/stream with the query of GET /quote (plus minIntervalMs) is one subscription as an event stream. Each event is named after its op (quote, no_quote) and carries the same JSON as the WebSocket frame.
400 before the stream opens; the router at its capacity is 503 stream_capacity.