Get API key
Hermes-compatible API

Get price updates within a time interval

gethttps://pyth.dourolabs.app/hermes/v2/updates/price/{publish_time}/{interval}

An API key, in an Authorization: Bearer <API_KEY> header. Access tokens are not accepted.

Use these endpoints for existing Hermes integrations. For new integrations, use the Pyth Price Feeds endpoints.

Returns price updates from publish_time through publish_time + interval, including both boundaries. Specify both values in seconds. The interval cannot exceed 60 seconds, and each request can include up to 100 feed IDs.

gethermes/v2/updates/price/{publish_time}/{interval}
curl "https://pyth.dourolabs.app/hermes/v2/updates/price/1790208000/60?ids%5B%5D=e62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43&ids%5B%5D=ff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace" \
  -H "Authorization: Bearer $PYTH_API_KEY"
Response
[
  { "binary": { "data": ["string"], "encoding": "hex" } }
]

Path parameters

Replace the placeholders in the URL path with these values.

publish_timeintegerRequired

Start of the requested interval, in Unix seconds. This boundary is inclusive.

intervalintegerRequired

Interval length, in seconds. The inclusive end is publish_time + interval. The maximum is 60 seconds.

Query parameters

Add these parameters to the URL query string.

ids[]string[]Required

IDs of the feeds to retrieve. Repeat the parameter for multiple feeds: ?ids[]=<ID_1>&ids[]=<ID_2>. ids without brackets also works, but not together with ids[].

encodingstringDefault hex

Encoding of the binary update data. The default is hex.

  • hexdefault
  • base64
parsedbooleanDefault true

If true, includes decoded price updates in the response's parsed field. The default is true.

ignore_invalid_price_idsbooleanDefault false

If true, ignores invalid feed IDs in the request. The default is false.

uniquebooleanDefault true

If true, returns only the first update at each publish timestamp. The default is true.

Response

200 · application/json

Returns a JSON array. Each item contains the following fields.

binaryobject

Binary price update payloads.

datastring[]

Update payloads encoded using encoding.

encodingstring

The encoding of each payload in data.

  • hex
  • base64
parsedobject[] | null

Decoded price updates. Included when parsed is true.

ema_priceobject

The exponential moving average price, its confidence interval, exponent, and publication timestamp.

confstring

Confidence interval stored as a string to preserve precision. Multiply by 10^expo to obtain the decimal value.

expointeger

Exponent used to scale both price and conf.

pricestring

Price value stored as a string to preserve precision. Multiply by 10^expo to obtain the decimal value.

publish_timeinteger

Publication timestamp, in Unix seconds.

idstring

Hexadecimal ID of the price feed.

metadataobject

Publication and proof metadata for the update.

prev_publish_timeinteger

Previous publication timestamp, in Unix seconds.

proof_available_timeinteger

Timestamp associated with proof availability, in Unix seconds.

slotinteger

Slot associated with the price update.

priceobject

The price, confidence interval, exponent, and publication timestamp.

confstring

Confidence interval stored as a string to preserve precision. Multiply by 10^expo to obtain the decimal value.

expointeger

Exponent used to scale both price and conf.

pricestring

Price value stored as a string to preserve precision. Multiply by 10^expo to obtain the decimal value.

publish_timeinteger

Publication timestamp, in Unix seconds.

Errors

Status codes returned when a request fails.

400
Invalid interval or price IDs, or a malformed Authorization header.
401
The API key is missing.
403
The API key is invalid or does not grant access to a requested feed or channel.
404
One or more requested feed IDs were not found, or are not available on the channel.