Breaking Down Price Streams in Detail
What it is
This page explains how the Pairs cube decides which token in a pair is the base and which is the quote. You do not need it to start using the API; the examples do that. For how prices and volumes are computed (trade filtering, the liquidity-weighted token and currency blend, field semantics), see Price Index Algorithm.
How it is derived
Base and quote in the Pairs cube
In every pair, one token is the base and the other is the quote. The price is how much of the quote token buys 1 unit of the base token.
Example: if SOL/USDC = 180.0, then 1 SOL costs 180 USDC. SOL is the base, USDC the quote.
The logic behind quote token selection
The rules below pick the quote token, in order.
-
Stablecoin priority.
If one of the tokens is a stablecoin, it is chosen as the quote.Example: In a USDC/ETH pair, ETH is base, USDC is quote — you get the ETH price in USD.
Stablecoins include:
- USDT
- USDC
- DAI
- USDS
- USD1
- TUSD
- USDD
- USD₮0
-
Native asset vs another token.
If neither token is a stablecoin but one is a native token of the blockchain (e.g., ETH on Ethereum, SOL on Solana, BTC on Bitcoin), the native token is the quote.Example: For a wBTC/ETH pair on Ethereum, ETH is quote because it's the native asset of that chain.
-
Dynamic volume-based decision.
If neither rule applies (two non-stable, non-native tokens), the quote is chosen dynamically based on liquidity:- We calculate the trading volume of both tokens across all stablecoin pairs.
- The token with the higher total volume in USD is selected as the quote.
This makes the quote the more liquid asset, which gives more stable and usable price data.
Related
Ready to run this in production?
Get an API key and run these queries in minutes, or talk to us about plans and enterprise delivery.