Developer Hub
Pyth CoreHermes

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.

GET
/v2/updates/price/stream

Query Parameters

ids[]*array<PriceIdInput>

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...
encoding?string

Optional encoding type. If true, return the price update in the encoding specified by the encoding parameter. Default is hex.

Value in"hex" | "base64"
parsed?boolean

If true, include the parsed price update in the parsed field of each returned feed. Default is true.

allow_unordered?boolean

If true, allows unordered price updates to be included in the stream.

benchmarks_only?boolean

If true, only include benchmark prices that are the initial price updates at a given timestamp (i.e., prevPubTime != pubTime).

ignore_invalid_price_ids?boolean

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"