Get price updates at a timestamp
https://pyth.dourolabs.app/hermes/v2/updates/price/{publish_time}An API key, in an Authorization: Bearer <API_KEY> header. Access tokens are not accepted.
Returns each requested feed's first price update at or after publish_time, a Unix timestamp in seconds. For older timestamps, served from the database, the search covers at most 5 minutes past publish_time.
hermes/v2/updates/price/{publish_time}curl "https://pyth.dourolabs.app/hermes/v2/updates/price/1790208000?ids%5B%5D=e62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43&ids%5B%5D=ff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace" \
-H "Authorization: Bearer $PYTH_API_KEY"{ "binary": { "data": ["string"], "encoding": "hex" } }Replace the placeholders in the URL path with these values.
publish_timeintegerRequiredRequested timestamp, in Unix seconds. Returns the first update at or after this timestamp.
Add these parameters to the URL query string.
ids[]string[]RequiredIDs of the feeds to retrieve. Repeat the parameter for multiple feeds: ?ids[]=<ID_1>&ids[]=<ID_2>.
encodingstringDefault hexEncoding of the binary update data. The default is hex.
- hexdefault
- base64
parsedbooleanDefault trueIf true, includes decoded price updates in the response's parsed field. The default is true.
ignore_invalid_price_idsbooleanDefault falseIf true, ignores invalid feed IDs in the request. The default is false.
Response
200 · application/jsonReturns a JSON object with the following fields.
binaryobjectBinary price update payloads.
datastring[]Update payloads encoded using encoding.
encodingstringThe encoding of each payload in data.
- hex
- base64
parsedobject[] | nullDecoded price updates. Included when parsed is true.
ema_priceobjectThe exponential moving average price, its confidence interval, exponent, and publication timestamp.
confstringConfidence interval stored as a string to preserve precision. Multiply by 10^expo to obtain the decimal value.
expointegerExponent used to scale both price and conf.
pricestringPrice value stored as a string to preserve precision. Multiply by 10^expo to obtain the decimal value.
publish_timeintegerPublication timestamp, in Unix seconds.
idstringHexadecimal ID of the price feed.
metadataobjectPublication and proof metadata for the update.
prev_publish_timeintegerPrevious publication timestamp, in Unix seconds.
proof_available_timeintegerTimestamp associated with proof availability, in Unix seconds.
slotintegerSlot associated with the price update.
priceobjectThe price, confidence interval, exponent, and publication timestamp.
confstringConfidence interval stored as a string to preserve precision. Multiply by 10^expo to obtain the decimal value.
expointegerExponent used to scale both price and conf.
pricestringPrice value stored as a string to preserve precision. Multiply by 10^expo to obtain the decimal value.
publish_timeintegerPublication timestamp, in Unix seconds.
Status codes returned when a request fails.
- 400
- Invalid 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
- A requested feed ID was not found or is not available on the channel, the timestamp is too recent or in the future, or, for an older timestamp, no update exists in the 5 minutes after it.