SSE route handler for streaming price updates.
SSE route handler for streaming price updates. The connection will automatically close after 24 hours to prevent resource leaks. Clients should implement reconnection logic to maintain continuous price updates.
Query Parameters
Get the most recent price update for this set of price feed ids.
This parameter can be provided multiple times to retrieve multiple price updates, for example see the following query string:
?ids[]=a12...&ids[]=b4c...Optional encoding type. If true, return the price update in the encoding specified by the encoding parameter. Default is hex.
"hex" | "base64"If true, include the parsed price update in the parsed field of each returned feed. Default is true.
If true, allows unordered price updates to be included in the stream.
If true, only include benchmark prices that are the initial price updates at a given timestamp (i.e., prevPubTime != pubTime).
If true, invalid price IDs in the ids parameter are ignored. Only applicable to the v2 APIs. Default is false.
Response Body
application/json
text/plain
curl -X GET "https://hermes.pyth.network/v2/updates/price/stream?ids%5B%5D=e62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43"{
"binary": {
"data": [
"string"
],
"encoding": "hex"
},
"parsed": [
{
"ema_price": {
"conf": "509500001",
"expo": -8,
"price": "2920679499999",
"publish_time": 1717632000
},
"id": "e62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43",
"metadata": {
"prev_publish_time": 1717632000,
"proof_available_time": 1717632000,
"slot": 85480034
},
"price": {
"conf": "509500001",
"expo": -8,
"price": "2920679499999",
"publish_time": 1717632000
}
}
]
}"string"Get the latest price updates by price feed id.
Get the latest price updates by price feed id. Given a collection of price feed ids, retrieve the latest Pyth price for each price feed.
Get the latest price updates by price feed id.
Get the latest price updates by price feed id. Given a collection of price feed ids, retrieve the latest Pyth price for each price feed.