Prices over an interval

GET
/v2/updates/price/{publish_time}/{interval}

Updates from publish_time to publish_time + interval, inclusive, one PriceUpdate per second, oldest first. ema_price equals price on historical routes. At most 100 distinct feeds, which keeps the URL under the edge's length limit.

Path Parameters

publish_time*integer

Unix time in seconds.

Range0 <= value <= 4294967295
interval*integer

Length of the window in seconds, at most 60.

Range0 <= value <= 60

Query Parameters

ids[]*array<>

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.

Itemsitems <= 500
ids?array<>

The 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?string

Encoding named in binary.encoding on the v2 routes. The data array is always empty. Validated and ignored on the v1 routes.

Default"hex"

Value in

  • "hex"
  • "base64"
parsed?boolean

Include the parsed prices on the v2 routes. Validated and ignored on the v1 routes.

Defaulttrue
ignore_invalid_price_ids?boolean

Drop unknown IDs instead of answering 404, on the v2 routes. Validated and ignored on the v1 routes.

Defaultfalse
channel?string

Update 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.

Default"fixed_rate@1000ms"

Value in

  • "real_time"
  • "fixed_rate@200ms"
  • "fixed_rate@1000ms"
benchmarks_only?boolean

On the SSE stream, send only the first update of each second. Validated and ignored elsewhere.

Defaultfalse
verbose?boolean

Include metadata, on the v1 routes. Validated and ignored on the v2 routes.

Defaultfalse
binary?boolean

Include vaa, which is always the empty string, on the v1 routes. Validated and ignored on the v2 routes.

Defaultfalse
unique?boolean

On the interval route, keep only the first update of each feed in each second. Validated and ignored elsewhere.

Defaulttrue
allow_unordered?boolean

Accepted for Hermes compatibility. Updates are always ordered, so it changes nothing.

Defaultfalse

Response Body

application/json

text/plain

text/plain

text/plain

text/plain

application/problem+json

curl -X GET "https://example.com/v2/updates/price/0/0?ids%5B%5D=string"
[  {    "binary": {      "encoding": "hex",      "data": []    },    "parsed": [      {        "id": "string",        "price": {          "price": "string",          "conf": "string",          "expo": 0,          "publish_time": 0        },        "ema_price": {          "price": "string",          "conf": "string",          "expo": 0,          "publish_time": 0        },        "metadata": {          "slot": 0,          "proof_available_time": 0,          "prev_publish_time": 0        }      }    ]  }]