Tokens Cube
What it is
The Tokens cube gives one row per token per chain per interval. The price is a liquidity-weighted blend of every pool where the token is the base asset, so it answers "what is this token worth on this chain" with a single number.
Use it for a chain-wide number or a firehose of every token on a chain. It does not say which quote token or pool a price came from; that lives on Pairs.
For a specific token, especially one whose liquidity is spread across many pools, a pool with a large but stale or estimated reserve can outweigh the pool where the trading happens and pull the blend. Query the Pairs cube with Ranking: { Position: { eq: 1 } } to get the quote from its top market.
How to get it
Query or subscribe to Trading.Tokens. Filters that matter:
- Token:
Token: { Address: ..., Network: ... }orToken: { Id: { is: "bid:<chain>:<address>" } }. A bare address inToken.Idreturns 0 rows. - Interval:
Interval: { Time: { Duration: { eq: 60 } } }. Durations are 1, 3, 5, 10, 30, 60, 300, 900, 1800 and 3600 seconds. - Chain:
Token: { Network: { is: "Solana" } }for every token on one chain.
The subscription below streams every token's 1-minute bar on every chain. For a query that returns tokens with volume and average price over the last 24h, see Aggregated Token Data or the examples.
subscription {
Trading {
Tokens(where: { Interval: { Time: { Duration: { eq: 60 } } } }) {
Token {
Address
Id
IsNative
Name
Network
Symbol
TokenId
}
Block {
Date
Time
Timestamp
}
Interval {
Time {
Start
Duration
End
}
}
Volume {
Base # Volume of the token itself
Quote # Volume of all tokens it traded against
Usd # Combined USD volume across all trades
}
Supply {
TotalSupply
FullyDilutedValuationUsd
MarketCap
}
Price {
IsQuotedInUsd # Whether price values are in USD (true/false)
Ohlc {
Open
High
Low
Close
}
Average {
Mean
SimpleMoving
WeightedSimpleMoving
ExponentialMoving
}
}
Currency {
Name
Symbol
Id
}
}
}
}
How it is derived
The index takes every pool where the token is the base asset, prices each pool from its latest trade, and blends them. Each pool's weight is its share of the token's liquidity after the staleness discount: Liquidity.Usd x RankingDetail.StaleMultiplier, normalised over the token's pools. Details in Price Index Algorithm and how Position and Weight behave.
Volume on the row is the sum across all pools in the interval. OHLC and the averages use only trades with known USD values.
Where the blend can mislead. Weight follows liquidity, not trading. A pool whose reserve is large but stale, or only estimated from volume (Liquidity.Source: "volume"), can outweigh the pool where the token actually trades. Check Ranking.Weight on the Pairs cube: a top-market weight near 1 means the blend is effectively one pool and this cube's price is equivalent; a low weight means you should price the token from its rank-1 market instead.
Since 2026-10-19 the blend is liquidity-weighted. Rows before that date in the 30-day history are volume-weighted and carry Liquidity fields of 0.
Fields
| Field | Type | Meaning |
|---|---|---|
Token { Address Id Symbol Name Network NetworkBid IsNative TokenId Did } | String / Boolean | The token. See Identity fields. |
Currency { Id Name Symbol } | String | The cross-chain currency the token belongs to, for example bid:bitcoin for WBTC. |
Block { Date Time Timestamp } | String / DateTime / String | Time of the last update in the interval. |
Interval { Time { Start End Duration } } | DateTime / DateTime / Int | The bar. Duration in seconds. |
Price.Ohlc { Open High Low Close } | Float | OHLC of the blended price for the interval. |
Price.Average { Estimate Mean SimpleMoving WeightedSimpleMoving ExponentialMoving } | Float | Averages over the interval and a 5-entry moving window. |
Price.IsQuotedInUsd | Boolean | Constant true on this cube. |
Volume.Base | Float | Amount of the token traded across all its pairs. |
Volume.Quote | Float | Sum of quote-token amounts across all pairs. Not USD; use Volume.Usd. |
Volume.Usd | Float | Volume in USD. |
Volume.BaseAttributedToUsd | Float | Part of Volume.Base the index could attribute to a USD value. |
Liquidity { Usd Source RealShare ... } | Float / String | Liquidity summed over the token's pools. See below. |
Ranking { Position Weight } | Int / Float | The token's rank and weight as a part of its currency. |
RankingDetail { Verdict StaleMultiplier } | String / Float | Why it got that rank. |
LeadingPool { MarketId PoolAddress QuoteTokenId } | String | The Position-1 pool that sets the token's price. |
Supply { CirculatingSupply TotalSupply MaxSupply MarketCap FullyDilutedValuationUsd } | Float | Currency-level figures, aggregated across chains; price and volume on the row stay chain-specific. See Supply fields. |
Price.Average.Estimate: the valuation price
Estimate is the price the supply valuations are built from: Supply.FullyDilutedValuationUsd is TotalSupply x Estimate, and MarketCap is CirculatingSupply x Estimate. If you are reconciling a market cap, use Estimate, not Mean and not Ohlc.Close.
Volume.BaseAttributedToUsd
The portion of base-token volume the index could attribute to a USD value. It is always less than or equal to Volume.Base; how often the two are equal varies by chain. Use it when you need volume you can trust a USD figure for.
Volume.Quote
The Tokens cube does not show which token was the quote in each trade. Volume.Quote sums quote-token amounts across all pairs regardless of quote token, so it is not a USD figure. For pair-level granularity use Pairs.
Ranking
Ranking.Position and Ranking.Weight are present on Tokens as well as Pairs. See how Position and Weight behave.
Liquidity, RankingDetail and LeadingPool
Liquidity.Usd on a Tokens row is the pool's balance of the row's quote token, valued in USD, summed over the token's pools, including pools that did not trade in the interval. RealShare says how much of it is measured rather than estimated. LeadingPool names the Position-1 pool that sets the price.
Liquidity.UpdatedAt is 1970-01-01 at token level and the per-pool reserve fields are 0. See Liquidity, RankingDetail and LeadingPool fields.
Identity fields
| Field | Notes |
|---|---|
Token.Id | Chain-qualified: bid:<chain>:<address>. A bare address returns 0 rows silently; use Token.Address for a raw address |
Token.Address | The raw contract address. Empty for native assets |
Token.NetworkBid | Populated: the chain bid, e.g. bid:solana |
Token.Did | A chain-level DID, empty on essentially every row. Not a per-token identifier |
Token.Decimals | Does not exist on this cube |
Pitfalls
Price.IsQuotedInUsdis a constanttruehere. Filtering onfalsereturns nothing.(Token.Id, Interval.Time.Start)is not a unique key. A small share of mints return two rows for the same token and bar. The duplicates are identical on identity and ranking and differ only in mutable metadata, typically one row has an emptyToken.Symbolwhile the other has arrived: a metadata-arrival split on freshly launched tokens.- Aggregate by
Token.Id, not by treating one row as one token. Do not build a natural key from metadata columns:Symbolcan change.
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.