Developer Hub
Pyth CoreHermes

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
/v2/updates/price/latest

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.

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/latest?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"