What is the range of expo

:pushpin: Before Posting:
– Please select the appropriate product category from the dropdown when creating a topic.
– Use this category only for help topics related Pyth Price Feeds, Hermes, Price Pusher.
– You can remove these instructions when submitting your post.

:books: Check the Pyth Documentation for guides, known issues, and integration examples β€” your answer might already be there.

I am learning to use the Pyth oracle, but I am currently facing an issue with handling the expo price from Pyth. I only learned from the documentation that this expo is of type i64, which has caused some confusion when scaling the price. For example, when I set the SCALE to 1e10, if EXPO returns a value of -10 or +10, how should I handle it?

I am not sure I fully understand your question.

This is a good resource for understanding the expo field: https://docs.pyth.network/price-feeds/best-practices#fixed-point-numeric-representation.

In the example from that piece of documentation expo is negative (and that’s the case in most price feeds as far as I know).

But you could have a positive expo hypothetically: imagine an asset has price 1_000_000_000, one valid representation would be 1 with expo of 9.

1 Like