Quote Currency and Pair Orientation in Crypto Prices
Read base and quote assets correctly, invert prices deliberately, and avoid combining token, stablecoin and fiat observations as if their units matched.

Overview
When translating these concepts into an integration, keep the scope described by the wallet history api with the result. The examples in wallet transaction history and smart contract event logs show how the same distinction affects neighbouring data questions.
A price is a ratio with units. Saying a token costs two is incomplete unless the quote asset is known. Pair orientation determines both the number and its interpretation.
Store numerator and denominator
If A/B is expressed as B units per A, the inverse represents A units per B. Do not infer orientation from an alphabetically sorted pool address pair. A stablecoin quote remains a token-denominated observation; treating it as a fiat price requires a declared conversion assumption and time context.
Worked example: reversing a pair
A price of four quote units per base unit becomes 0.25 base units per quote unit when inverted. For a zero, missing or invalid denominator, inversion is undefined and must not return zero. Keep the original observation so later calculations can trace which direction and precision were used.
Validate conversions at boundaries
Use exact decimal arithmetic where practical and state rounding policy. Test pairs whose two assets have different decimals, values near zero and cross-rates using observations from different times. A converted price should record the conversion path; multiplying two unrelated latest values can create a misleading historical price.
A practical acceptance test
Take four quote units per base and verify an inverse of 0.25 base per quote with declared precision. Test zero and missing denominators as invalid inversion cases. Add a token-to-stablecoin observation without a fiat conversion: it must remain token-quoted rather than acquire a fiat currency label merely because the stablecoin targets that unit.
Questions about the topic
Frequently asked questions
Is a stablecoin quote automatically a fiat quote?
No. That equivalence is an additional valuation assumption.
Can pair order be inferred from a symbol label?
Not reliably. Read the explicit base and quote contract.
Standards & technical documentation