FAQ

How can I convert the latest observation to a price?

Calling observation() or get() on the Oracle contract, you may have noticed that the returned latest observation is a big number like 404563230502126. This may be confusing if it's the first time you interact with Alloy. Luckily, converting it to a human readable number is trivial (10^18) / 404563230502126 = 2471.8015 It's crucial to remember that this value represents the latest updated observation saved on the chain. It does not reflect the live Oracle price.

How can I get the live Oracle price?

You can retrieve the live Oracle price, together with a set of valid signatures, querying the following public URL https://alloy.tether.to/api/txns/txData

How can I use these signatures?

Currently, anyone can update the Oracle by posting two valid signatures out of three with the same observation. If you're building a smart contract that relies on this Oracle, you can retrieve these signatures and ensure to pass them to updateObservation() within your transaction.

By calling observation(), you can also access the timestamp of the last update. This allows you to implement custom logic to determine whether to use the most recent saved price or request a new update.

Last updated