Should we pay attention to the VAA timestamp when updating feeds?

For example, we have feeds: A, B, C, and D.
Pyth sends us an update with a VAA timestamp of 10 for markets A and B, while C and D remain unchanged.
Can Pyth then send the next update with a VAA timestamp of 9 but for markets C and D?
How frequently are markets updated, and should we care about the VAA timestamp, or just track prices based on the publish time?

1 Like

So all feeds update every 400ms (even if the price is the same). And for every new price there’s a new VAA. The only time there’s no new proof is if the market is closed (US equities outside of market hours).

Why would you not want to receive C and D new price/VAA? Any particular reason?

Regarding the timestamp, yes it is important to check it. publishtime is the time when the price feed was last updated, so you should always check that its recent enough

1 Like

+1 to @KemarTiti ‘s answer that publish_time (found inside the parsed VAA payload) is the important field to validate.

Pyth sends us an update with a VAA timestamp of 10 for markets A and B, while C and D remain unchanged.
Can Pyth then send the next update with a VAA timestamp of 9 but for markets C and D?

Hermes will give you an update at t=10 for markets A, B, C, D since all feeds are updated together, even if the price values haven’t changed since the last timestamp. However, it can be possible to observe out-of-order updates from Hermes due to transient RPC lag. To avoid this, you can specify allow_unordered=false in the SSE subscription, which guarantees all updates you get in the stream have monotonically increasing timestamps. (Docs)

Even if you try to update the price feed with an older timestamp though, the updatePriceFeeds function will enforce monotonically increasing timestamps and not overwrite the price. (Docs)

1 Like