Skip to main content
rate records every RatePosted event from the KeeperFxOracle: one row per code per post. The latest row per code is also copied onto currency.lastRate, so query this table when you need history rather than the current value.

Fields

Index: (code, publishTime). Filter on code and order by publishTime. code is the hex form, so encode the ASCII code first (see currency codes). INR is 0x494e520000000000000000000000000000000000000000000000000000000000. USD is never posted; its rate is fixed at 1e18.

Examples

Rate history for one currency, newest first:
Through the currency relation, which lets you filter by the readable symbol:
Rates in a time window for a chart, oldest first:
The most recent post across every code (to see when the keeper last ran):
Posts in a single transaction (the keeper batches up to 25 codes per post):
With curl:

Reading rates

  • rate / 1e18 is the number of currency units per US dollar. A JPY value of 149800000000000000000 is 149.8 JPY per USD.
  • Freshness is judged against publishTime, not the block time. The keeper oracle treats a rate as fresh for two hours and usable at the higher stale fee for five days; after that mint, redeem and vault.status() revert until a new post arrives. The oracles page has the windows and the rules.
  • The keeper re-posts an unchanged rate hourly as a heartbeat, so consecutive rows with the same rate are expected.
  • A single post cannot move a rate by more than the oracle’s maxMoveBps (15% on the current deployments); a larger move takes several posts.
  • currency.lastRate is only updated for codes the registry lists. A code that appears here but not in currencys was posted by the keeper without being registered.