Feed IDs and categories

Two kinds of ID, both accepted everywhere, and how tokenized stocks get two feeds.

Two kinds of ID

  • Astra ID: keccak256("astra:" + symbol), 32 bytes in hex. It is computed from the symbol, so it never changes, and it passes every Hermes client's ID check.
  • Pyth-compatible ID: when a feed measures the same quantity as a Pyth feed, that Pyth feed's ID resolves to it too.

Both work on every route. A response echoes the ID you asked with, so code that matches updates by ID keeps working. IDs are accepted with or without 0x, in any case, and returned lower-case without 0x.

import {keccak256, toUtf8Bytes} from 'ethers';

const astraId = keccak256(toUtf8Bytes('astra:Equity.RH.AAPL/USD'));
// 0xc4d475f87a76776dbb94b6e09040c34d51f247842e0bc0ef1d7c6758f99db4f7

Listing feeds

GET /v2/price_feeds lists each feed once, under its Pyth-compatible ID when it has one, with the Astra ID in attributes.astra_id. Filter with query (a symbol substring) and asset_type.

curl 'https://astra.preview.avee.tech/v2/price_feeds?asset_type=equity'

GET /v1/feeds returns both IDs side by side (id, pyth_id) with the live value and status.

Categories

The category is the lower-case asset type: crypto, equity, fx, metal, commodities and the other Hermes asset types. The set is open; GET /v1/feeds shows the categories served today.

Tokenized stocks: two feeds

Each tokenized stock has two feeds:

SymbolPriceID
Equity.US.<TICKER>/USDThe share price: the token price divided by the token's share multiplierPyth-compatible
Equity.RH.<TICKER>/USDThe token price itselfAstra only

The two differ whenever a token represents more or less than one share. Use the US feed where you would use Pyth's equity feed, and the RH feed to value the token you hold.

On this page