Statuses

What Astra serves while a feed is trading, degraded, closed or on a reference price.

StatusHermes routesNative routes
tradingservedlive
degradedfrozen at the last trading value and its publish_timelive, status: degraded
market_closedfrozen; market_hours.is_open is falselive, status: market_closed
referenceservedlive, status: reference

A degraded or closed feed is frozen, not served: publish_time stops moving, so a consumer's own staleness check trips, as it would on a Pyth feed below quorum. The Hermes routes only ever serve a value the index published as trading or reference.

A reference price comes from a single issuer source. Hermes has no status field, so a Hermes client cannot tell reference from trading. Check GET /v1/status or GET /v1/feeds, and do not liquidate on a reference price.

Checking status

curl 'https://astra.preview.avee.tech/v1/status'

Per feed: status, age_seconds, sources, the live publish_time, the served_publish_time the Hermes routes use, and stale.

To watch one feed, pass its ID, Pyth or Astra:

curl -i 'https://astra.preview.avee.tech/v1/status?feed=e62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43'

feeds then holds that feed alone, and the status code is the verdict: 200 while it is trading and not stale, 503 with the same body otherwise. An uptime checker needs nothing but the code. A stock feed answers 503 while its market is closed, and a reference feed always does, so point a checker at a feed that trades around the clock.

Prices

  • price and conf are integers as strings; the value is price × 10^expo.
  • publish_time is in seconds. prev_publish_time is the previous served update's.
  • ema_price is Astra's own exponential moving average of price and confidence over served updates, with a one-hour time constant. It is not Pyth's confidence-weighted EMA, it needs about an hour to settle after a server restart, and historical routes return ema_price equal to price.

On this page