Stream prices (SSE)
Server-sent events. Each event carries one PriceUpdate for one feed as data: {json}. The last
value of each feed is sent on connect. A : keepalive comment arrives every 30 seconds, and the
stream closes after 24 hours: reconnect. Per feed, updates arrive in publish_time order and
never repeat.
Send at most 200 IDs per request; longer URLs are rejected before they reach Astra. For more feeds, open several streams or subscribe over WebSocket, where IDs travel in the message body.
Query Parameters
Feed IDs, repeated (ids[]=…&ids[]=…). ids is accepted too. The server accepts at most 500 per request, and 100 distinct feeds on historical routes. Send at most 200 IDs per request; longer URLs are rejected before they reach Astra. For more feeds, use several requests or subscribe over WebSocket, where IDs travel in the message body.
items <= 500The same as ids[], for clients that send the name without brackets. Both may be combined, and count together. Send at most 200 IDs per request; longer URLs are rejected before they reach Astra. For more feeds, use several requests or subscribe over WebSocket, where IDs travel in the message body.
Encoding named in binary.encoding on the v2 routes. The data array is always empty. Validated and ignored on the v1 routes.
"hex"Value in
- "hex"
- "base64"
Include the parsed prices on the v2 routes. Validated and ignored on the v1 routes.
trueDrop unknown IDs instead of answering 404, on the v2 routes. Validated and ignored on the v1 routes.
falseUpdate cadence of the SSE stream and the WebSocket. A fixed-rate channel sends a feed at most once per tick, only when it changed. fixed_rate@50ms is refused. Validated and ignored on the other routes.
"fixed_rate@1000ms"Value in
- "real_time"
- "fixed_rate@200ms"
- "fixed_rate@1000ms"
On the SSE stream, send only the first update of each second. Validated and ignored elsewhere.
falseInclude metadata, on the v1 routes. Validated and ignored on the v2 routes.
falseInclude vaa, which is always the empty string, on the v1 routes. Validated and ignored on the v2 routes.
falseOn the interval route, keep only the first update of each feed in each second. Validated and ignored elsewhere.
trueAccepted for Hermes compatibility. Updates are always ordered, so it changes nothing.
falseResponse Body
text/event-stream
text/plain
text/plain
text/plain
text/plain
curl -X GET "https://example.com/v2/updates/price/stream?ids%5B%5D=string""data: {\"binary\":{\"encoding\":\"hex\",\"data\":[]},\"parsed\":[{\"id\":\"e62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43\",\"price\":{\"price\":\"6512345000000\",\"conf\":\"3120000000\",\"expo\":-8,\"publish_time\":1790540000},\"ema_price\":{\"price\":\"6510012000000\",\"conf\":\"3300000000\",\"expo\":-8,\"publish_time\":1790540000},\"metadata\":{\"slot\":0,\"proof_available_time\":1790540000,\"prev_publish_time\":1790539999}}]}\n"Latest prices GET
The current value of each requested feed, whatever the `channel`. A feed with no servable value yet counts as not found. Send at most 200 IDs per request; longer URLs are rejected before they reach Astra. For more feeds, use several requests or subscribe over WebSocket, where IDs travel in the message body.
Prices at a time GET
The first update of each feed at or after `publish_time`. At most 100 distinct feeds, which keeps the URL under the edge's length limit.