Documentation Index Fetch the complete documentation index at: https://docs.codex.io/llms.txt
Use this file to discover all available pages before exploring further.
Returns See TokenBarsResponse The timestamp for the bar.
The status code for the batch: ok for successful data retrieval and no_data for empty responses signaling the end of server data.
The volume with higher precision.
The volume in the native token for the network
The number of unique buyers
The number of unique sellers
The number of transactions
The aggregate pool/DEX fees in USD
The aggregate base fees (gas) in USD
The aggregate priority fees in USD
The aggregate builder tips (MEV) in USD
The aggregate L1 data posting fees in USD (L2 rollups only)
The total fees in USD (sum of poolFees + baseFees + priorityFees + builderTips + l1DataFees)
Ratio of total fees to volume (totalFees / volume). Null when volume is zero.
Ratio of builder tips (MEV) to total fees (builderTips / totalFees). Null when totalFees is zero.
Gas cost per dollar of volume ((baseFees + priorityFees + l1DataFees) / volume). Null when volume is zero.
Average total fee cost per transaction in USD (totalFees / transactions). Null when there are no transactions.
MEV risk level for this bar: low (<3% builder tips), medium (3-30%), or high (>30%). Null for pre-genesis bars.
Dominant fee component: gas-dominated (gas >50% of fees), mev-dominated (tips >20%), or pool-fee-dominated. Null when no fees.
Rate of sandwich attacks per transaction (sandwichedEventCount / transactions). Null when no transaction data.
The token that is being returned
See EnhancedToken The ID of the token (address:networkId).
The contract address of the token.
The token ID on CoinMarketCap.
The precision to which the token can be divided. For example, the smallest unit for USDC is 0.000001 (6 decimals).
Whether the token has been flagged as a scam.
The token name. For example, ApeCoin.
The network ID the token is deployed on.
The token symbol. For example, APE.
Community gathered links for the socials of this token.
See SocialLinks More metadata about the token.
See TokenInfo Uniquely identifies the token.
The contract address of the token.
The circulating supply of the token.
The token ID on CoinMarketCap.
The Grid asset ID, if this token is linked to a Grid asset.
The Grid bluechip rating for this token (e.g. A+, B-).
Whether the token has been flagged as a scam.
The token name. For example, ApeCoin.
The network ID the token is deployed on.
The token symbol. For example, APE.
The total supply of the token.
The thumbhash of the token logo.
The thumbnail token logo URL.
The small token logo URL.
The large token logo URL.
The original URL/URI for the video associated with the token.
A description of the token.
The Grid asset ID, if this token is linked to a Grid asset.
The Grid bluechip rating for this token (e.g. A+, B-).
The Grid organization associated with this token.
See Organization The founding date of the organization.
A short description of the organization.
A detailed description of the organization.
The organization’s tagline.
The type of organization (e.g. protocol, company).
The sector the organization operates in.
URLs associated with the organization.
See OrganizationUrl The type of URL (e.g. website, docs).
Social links for the organization.
See OrganizationSocial The type of social link (e.g. twitter, discord).
The organization’s logo URL.
The organization’s icon URL.
The Grid root ID for the organization.
Assets managed by this organization.
See Asset A description of the asset.
The asset type (e.g. token, stablecoin).
The Grid root ID for the parent organization.
Deployments of this asset across chains.
See AssetDeployment The network ID the asset is deployed on.
The contract address of the deployment.
The token standard (e.g. ERC20, SPL).
The Grid root ID for the parent organization.
The Grid asset associated with this token.
See Asset A description of the asset.
The asset type (e.g. token, stablecoin).
The Grid root ID for the parent organization.
Deployments of this asset across chains.
See AssetDeployment The network ID the asset is deployed on.
The contract address of the deployment.
The token standard (e.g. ERC20, SPL).
The Grid root ID for the parent organization.
A list of exchanges where the token has been traded.
See Exchange The ID of the exchange (address:id).
The contract address of the exchange.
The hex string for the exchange color.
The name of the exchange.
The version of the exchange, if applicable.
The network ID the exchange is deployed on.
The URL for the exchange.
The token creator’s wallet address.
The block height the token was created at.
The transaction hash of the token’s creation.
The unix timestamp for the creation of the token.
Returns mint authority address if token is mintable. If null, verify against isMintableValid.
Returns freeze authority address if token is freezable. If null, verify against isFreezableValid.
Determines if freezable is a valid address or null value for the authority, or if the freezable state has not yet been determined.
Determines if mintable is a valid address or null value for the authority, or if the mintable state has not yet been determined.
The launchpad data for the token, if applicable.
See LaunchpadData The name of the launchpad.
The percentage of the pool that was sold to the public.
The unix timestamp when the launchpad was completed.
Indicates if the launchpad is completed.
The slot number when the launchpad was completed.
The slot number when the launchpad was migrated.
The unix timestamp when the launchpad was migrated.
Indicates if the launchpad was migrated.
The pool address after the launchpad was migrated.
The icon URL of the launchpad.
Whether cashback is enabled for this launchpad token (Pump V1/V2 only).
The token category assigned by the launchpad. Populated by launchpads that publish a category taxonomy (e.g. Scale/Creator, Eitherway). Values include platform, meme, utility, etc.
The name of the launchpad. This field is deprecated. Use launchpadName instead
The percentage of total supply held by the top 10 holders (excluding exchanges/pairs).
Whether the token name or symbol contains profanity.
All-time high and low price/market cap data for the token.
See TokenExtrema The token ID (address:networkId).
The contract address of the token.
The network ID the token is deployed on.
The all-time high price in USD.
The unix timestamp when the all-time high price was reached.
The all-time low price in USD.
The unix timestamp when the all-time low price was reached.
The all-time high fully diluted market cap.
The unix timestamp when the all-time high FDV was reached.
The all-time low fully diluted market cap.
The unix timestamp when the all-time low FDV was reached.
The all-time high circulating market cap.
The unix timestamp when the all-time high circulating market cap was reached.
The all-time low circulating market cap.
The unix timestamp when the all-time low circulating market cap was reached.
The Coin Community data for the token
See CoinCommunity The id of the coin community
The unix timestamp for the creation of the coin community.
The total supply of the token. This field is deprecated. Use the TokenInfo type
explorerData
ExplorerTokenData
deprecated
Information about the token from 3rd party sources.
See ExplorerTokenData This field is deprecated. Use the TokenInfo type
The ID of the token (address:networkId).
Whether the token has been verified on CoinGecko.
A description of the token.
The precision to which the token can be divided.
The thumbnail token logo URL. This field is deprecated. Use the TokenInfo type
The small token logo URL. This field is deprecated. Use the TokenInfo type
The large token logo URL. This field is deprecated. Use the TokenInfo type
The circulating supply of the token. This field is deprecated. Use the TokenInfo type
The amount of this token in the pair. This field is deprecated. Pooled can be found on the pair instead
Arguments The ID of the token (tokenAddress:networkId). For example, 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2:1 returns aggregated bar data for WETH pairs on Ethereum.
The unix timestamp for the start of the requested range.
The unix timestamp for the end of the requested range.
The time frame for each candle. Available options are 1S, 5S, 15S, 30S, 1, 5, 15, 30, 60, 240, 720, 1D, 7D. Resolutions lower than 1 minute are only updated for the last 24 hours due to the volume of data produced.
The currency to use for the response. Can be USD or TOKEN. Default is USD. Use currencyCode: TOKEN for native token pricing.
See QuoteCurrency Whether to remove leading null values from the response. Default is false. To fetch a token’s entire history, set resolution to 1D, from value to 0 and removeLeadingNullValues to true.
Whether to remove empty bars from the response. This is useful for eliminating gaps in low-activity tokens. Default is false.
Guarantees number of bars returned is at most this number. Use countback: 1500 with from: 0 for maximum results.
Example
Test this query in the Explorer →
{
getTokenBars (
symbol : "So11111111111111111111111111111111111111112:1399811149"
from : 1753121580
to : 1758303571
resolution : "5"
countback : 10
removeEmptyBars : true
) {
o
h
c
l
volume
}
}
Usage Guidelines
For data from mid-2025 onwards (timestamp 1753121580), getTokenBars returns an aggregated price across all pools. Anything before that falls back to the top pair.
Historical data only includes OHLC data; volume/traders data cannot be aggregated across all pools on the fly.
Includes more historical data than getBars because it iterates through top pairs rather than using a single pair.
Response time is slightly faster for current data, but the difference from getBars is negligible.
Refer to getBars for additional usage guidelines and troubleshooting tips.
Pricing for aggregate charts will no longer only use the top pair. Weighted average pricing will be used across a token’s top pairs, based on liquidity/recency, while filtering out lower quality pairs from contributing.
Troubleshooting Tips
When should I use getTokenBars vs getBars?
Use getTokenBars when you want aggregate price data for a token across all its trading pairs — it uses weighted average pricing based on liquidity. Use getBars when you want price data for a specific trading pair.
Null or empty values returned
Check that your timestamp window is accurate and long enough for the resolution requested
Ensure the token has started trading (we do not index tokens until trades occur)
Use removeLeadingNullValues: true
Updating charts in real-time
You can use getTokenBars to do an initial fetch of bars and then subscribe to onTokenBarsUpdated to keep it updated in real-time. More info on creating real-time charts is available here .
Incorrect values or errors returned with resolutions under 1m
Our chart data for under 1m (1S, 5S, 15S, 30S) only goes back 24 hours due to the volume of data required at those resolutions.
Detailed Token Page : Build a comprehensive token detail page with price, holders, trades, and real-time updates
Charts : Render token charts with OHLCV data and real-time updates