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.
Confirmed vs. unconfirmed events: Use the commitmentLevel argument to choose which events you receive.
confirmed — receive events only after they’re confirmed on-chain. This is the default if commitmentLevel is not specified.
processed — receive events as soon as they’re observed on-chain (unconfirmed; may be reorged out). You must explicitly set commitmentLevel: processed to opt in. Currently available on Solana only.
This endpoint requires a Growth or Enterprise plan. Learn more . Returns OnTokenBarsUpdatedResponse
OnTokenBarsUpdatedResponse
See OnTokenBarsUpdatedResponse The network ID the pair is deployed on.
The unix timestamp for the new bar.
The sortKey for the bar (blockNumber#transactionIndex#logIndex, zero padded). For example, 0000000016414564#00000224#00000413.
Price data broken down by resolution.
See ResolutionBarData 1 second resolution.
See CurrencyBarData The timestamp for the bar.
Bar chart data in USD.
See IndividualBarData The timestamp for the bar.
The volume with higher precision.
The volume in the network’s base token
The number of unique buyers
The number of unique sellers
The number of transactions
The USD value of pool fees collected
The USD value of base fees (gas) paid
The USD value of priority fees (tips) paid
The USD value of builder tips (MEV) paid
The USD value of L1 data posting fees (L2 rollups only)
Bar chart data in the network’s base token.
See IndividualBarData The timestamp for the bar.
The volume with higher precision.
The volume in the network’s base token
The number of unique buyers
The number of unique sellers
The number of transactions
The USD value of pool fees collected
The USD value of base fees (gas) paid
The USD value of priority fees (tips) paid
The USD value of builder tips (MEV) paid
The USD value of L1 data posting fees (L2 rollups only)
5 second resolution.
See CurrencyBarData The timestamp for the bar.
Bar chart data in USD.
See IndividualBarData The timestamp for the bar.
The volume with higher precision.
The volume in the network’s base token
The number of unique buyers
The number of unique sellers
The number of transactions
The USD value of pool fees collected
The USD value of base fees (gas) paid
The USD value of priority fees (tips) paid
The USD value of builder tips (MEV) paid
The USD value of L1 data posting fees (L2 rollups only)
Bar chart data in the network’s base token.
See IndividualBarData The timestamp for the bar.
The volume with higher precision.
The volume in the network’s base token
The number of unique buyers
The number of unique sellers
The number of transactions
The USD value of pool fees collected
The USD value of base fees (gas) paid
The USD value of priority fees (tips) paid
The USD value of builder tips (MEV) paid
The USD value of L1 data posting fees (L2 rollups only)
15 second resolution.
See CurrencyBarData The timestamp for the bar.
Bar chart data in USD.
See IndividualBarData The timestamp for the bar.
The volume with higher precision.
The volume in the network’s base token
The number of unique buyers
The number of unique sellers
The number of transactions
The USD value of pool fees collected
The USD value of base fees (gas) paid
The USD value of priority fees (tips) paid
The USD value of builder tips (MEV) paid
The USD value of L1 data posting fees (L2 rollups only)
Bar chart data in the network’s base token.
See IndividualBarData The timestamp for the bar.
The volume with higher precision.
The volume in the network’s base token
The number of unique buyers
The number of unique sellers
The number of transactions
The USD value of pool fees collected
The USD value of base fees (gas) paid
The USD value of priority fees (tips) paid
The USD value of builder tips (MEV) paid
The USD value of L1 data posting fees (L2 rollups only)
30 second resolution.
See CurrencyBarData The timestamp for the bar.
Bar chart data in USD.
See IndividualBarData The timestamp for the bar.
The volume with higher precision.
The volume in the network’s base token
The number of unique buyers
The number of unique sellers
The number of transactions
The USD value of pool fees collected
The USD value of base fees (gas) paid
The USD value of priority fees (tips) paid
The USD value of builder tips (MEV) paid
The USD value of L1 data posting fees (L2 rollups only)
Bar chart data in the network’s base token.
See IndividualBarData The timestamp for the bar.
The volume with higher precision.
The volume in the network’s base token
The number of unique buyers
The number of unique sellers
The number of transactions
The USD value of pool fees collected
The USD value of base fees (gas) paid
The USD value of priority fees (tips) paid
The USD value of builder tips (MEV) paid
The USD value of L1 data posting fees (L2 rollups only)
1 minute resolution.
See CurrencyBarData The timestamp for the bar.
Bar chart data in USD.
See IndividualBarData The timestamp for the bar.
The volume with higher precision.
The volume in the network’s base token
The number of unique buyers
The number of unique sellers
The number of transactions
The USD value of pool fees collected
The USD value of base fees (gas) paid
The USD value of priority fees (tips) paid
The USD value of builder tips (MEV) paid
The USD value of L1 data posting fees (L2 rollups only)
Bar chart data in the network’s base token.
See IndividualBarData The timestamp for the bar.
The volume with higher precision.
The volume in the network’s base token
The number of unique buyers
The number of unique sellers
The number of transactions
The USD value of pool fees collected
The USD value of base fees (gas) paid
The USD value of priority fees (tips) paid
The USD value of builder tips (MEV) paid
The USD value of L1 data posting fees (L2 rollups only)
5 minute resolution.
See CurrencyBarData The timestamp for the bar.
Bar chart data in USD.
See IndividualBarData The timestamp for the bar.
The volume with higher precision.
The volume in the network’s base token
The number of unique buyers
The number of unique sellers
The number of transactions
The USD value of pool fees collected
The USD value of base fees (gas) paid
The USD value of priority fees (tips) paid
The USD value of builder tips (MEV) paid
The USD value of L1 data posting fees (L2 rollups only)
Bar chart data in the network’s base token.
See IndividualBarData The timestamp for the bar.
The volume with higher precision.
The volume in the network’s base token
The number of unique buyers
The number of unique sellers
The number of transactions
The USD value of pool fees collected
The USD value of base fees (gas) paid
The USD value of priority fees (tips) paid
The USD value of builder tips (MEV) paid
The USD value of L1 data posting fees (L2 rollups only)
15 minute resolution.
See CurrencyBarData The timestamp for the bar.
Bar chart data in USD.
See IndividualBarData The timestamp for the bar.
The volume with higher precision.
The volume in the network’s base token
The number of unique buyers
The number of unique sellers
The number of transactions
The USD value of pool fees collected
The USD value of base fees (gas) paid
The USD value of priority fees (tips) paid
The USD value of builder tips (MEV) paid
The USD value of L1 data posting fees (L2 rollups only)
Bar chart data in the network’s base token.
See IndividualBarData The timestamp for the bar.
The volume with higher precision.
The volume in the network’s base token
The number of unique buyers
The number of unique sellers
The number of transactions
The USD value of pool fees collected
The USD value of base fees (gas) paid
The USD value of priority fees (tips) paid
The USD value of builder tips (MEV) paid
The USD value of L1 data posting fees (L2 rollups only)
30 minute resolution.
See CurrencyBarData The timestamp for the bar.
Bar chart data in USD.
See IndividualBarData The timestamp for the bar.
The volume with higher precision.
The volume in the network’s base token
The number of unique buyers
The number of unique sellers
The number of transactions
The USD value of pool fees collected
The USD value of base fees (gas) paid
The USD value of priority fees (tips) paid
The USD value of builder tips (MEV) paid
The USD value of L1 data posting fees (L2 rollups only)
Bar chart data in the network’s base token.
See IndividualBarData The timestamp for the bar.
The volume with higher precision.
The volume in the network’s base token
The number of unique buyers
The number of unique sellers
The number of transactions
The USD value of pool fees collected
The USD value of base fees (gas) paid
The USD value of priority fees (tips) paid
The USD value of builder tips (MEV) paid
The USD value of L1 data posting fees (L2 rollups only)
60 minute resolution.
See CurrencyBarData The timestamp for the bar.
Bar chart data in USD.
See IndividualBarData The timestamp for the bar.
The volume with higher precision.
The volume in the network’s base token
The number of unique buyers
The number of unique sellers
The number of transactions
The USD value of pool fees collected
The USD value of base fees (gas) paid
The USD value of priority fees (tips) paid
The USD value of builder tips (MEV) paid
The USD value of L1 data posting fees (L2 rollups only)
Bar chart data in the network’s base token.
See IndividualBarData The timestamp for the bar.
The volume with higher precision.
The volume in the network’s base token
The number of unique buyers
The number of unique sellers
The number of transactions
The USD value of pool fees collected
The USD value of base fees (gas) paid
The USD value of priority fees (tips) paid
The USD value of builder tips (MEV) paid
The USD value of L1 data posting fees (L2 rollups only)
4 hour resolution.
See CurrencyBarData The timestamp for the bar.
Bar chart data in USD.
See IndividualBarData The timestamp for the bar.
The volume with higher precision.
The volume in the network’s base token
The number of unique buyers
The number of unique sellers
The number of transactions
The USD value of pool fees collected
The USD value of base fees (gas) paid
The USD value of priority fees (tips) paid
The USD value of builder tips (MEV) paid
The USD value of L1 data posting fees (L2 rollups only)
Bar chart data in the network’s base token.
See IndividualBarData The timestamp for the bar.
The volume with higher precision.
The volume in the network’s base token
The number of unique buyers
The number of unique sellers
The number of transactions
The USD value of pool fees collected
The USD value of base fees (gas) paid
The USD value of priority fees (tips) paid
The USD value of builder tips (MEV) paid
The USD value of L1 data posting fees (L2 rollups only)
12 hour resolution.
See CurrencyBarData The timestamp for the bar.
Bar chart data in USD.
See IndividualBarData The timestamp for the bar.
The volume with higher precision.
The volume in the network’s base token
The number of unique buyers
The number of unique sellers
The number of transactions
The USD value of pool fees collected
The USD value of base fees (gas) paid
The USD value of priority fees (tips) paid
The USD value of builder tips (MEV) paid
The USD value of L1 data posting fees (L2 rollups only)
Bar chart data in the network’s base token.
See IndividualBarData The timestamp for the bar.
The volume with higher precision.
The volume in the network’s base token
The number of unique buyers
The number of unique sellers
The number of transactions
The USD value of pool fees collected
The USD value of base fees (gas) paid
The USD value of priority fees (tips) paid
The USD value of builder tips (MEV) paid
The USD value of L1 data posting fees (L2 rollups only)
1 day resolution.
See CurrencyBarData The timestamp for the bar.
Bar chart data in USD.
See IndividualBarData The timestamp for the bar.
The volume with higher precision.
The volume in the network’s base token
The number of unique buyers
The number of unique sellers
The number of transactions
The USD value of pool fees collected
The USD value of base fees (gas) paid
The USD value of priority fees (tips) paid
The USD value of builder tips (MEV) paid
The USD value of L1 data posting fees (L2 rollups only)
Bar chart data in the network’s base token.
See IndividualBarData The timestamp for the bar.
The volume with higher precision.
The volume in the network’s base token
The number of unique buyers
The number of unique sellers
The number of transactions
The USD value of pool fees collected
The USD value of base fees (gas) paid
The USD value of priority fees (tips) paid
The USD value of builder tips (MEV) paid
The USD value of L1 data posting fees (L2 rollups only)
1 week resolution.
See CurrencyBarData The timestamp for the bar.
Bar chart data in USD.
See IndividualBarData The timestamp for the bar.
The volume with higher precision.
The volume in the network’s base token
The number of unique buyers
The number of unique sellers
The number of transactions
The USD value of pool fees collected
The USD value of base fees (gas) paid
The USD value of priority fees (tips) paid
The USD value of builder tips (MEV) paid
The USD value of L1 data posting fees (L2 rollups only)
Bar chart data in the network’s base token.
See IndividualBarData The timestamp for the bar.
The volume with higher precision.
The volume in the network’s base token
The number of unique buyers
The number of unique sellers
The number of transactions
The USD value of pool fees collected
The USD value of base fees (gas) paid
The USD value of priority fees (tips) paid
The USD value of builder tips (MEV) paid
The USD value of L1 data posting fees (L2 rollups only)
The address of the token being quoted
The address of the token being quoted
The contract address for the pair. This field is deprecated. pairs are no longer used for pricing
The ID for the pair (pairAddress:networkId). This field is deprecated. pairs are no longer used for pricing
The quote token within the pair.
See QuoteToken This field is deprecated. pairs are no longer used for pricing
Arguments The ID of the token (address:networkId). Required unless you are on an enterprise plan including BarFeed features.
The networkId to use when getting all bars per network.
This is the live-streamed subscription version of our getTokenBars aggregated chart data endpoint.
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.
subscription {
onTokenBarsUpdated (
tokenId : "So11111111111111111111111111111111111111112:1399811149"
) {
tokenAddress
tokenId
networkId
timestamp
quoteToken
statsType
eventSortKey
aggregates {
r1 {
t
usd {
t
o
h
l
c
v
volume
buyers
sellers
buys
sells
buyVolume
sellVolume
liquidity
transactions
}
}
r5 {
t
usd {
t
o
h
l
c
v
}
}
r60 {
t
usd {
t
o
h
l
c
v
}
}
}
}
}
{
"data" : {
"onTokenBarsUpdated" : {
"tokenAddress" : "So11111111111111111111111111111111111111112" ,
"tokenId" : "So11111111111111111111111111111111111111112:1399811149" ,
"networkId" : 1399811149 ,
"timestamp" : 1769563445 ,
"quoteToken" : null ,
"statsType" : "FILTERED" ,
"eventSortKey" : "0000000396381322#00001195#00000002#00000010" ,
"aggregates" : {
"r1" : {
"t" : 1769563440 ,
"usd" : {
"t" : 1769563440 ,
"o" : 127.012034416 ,
"h" : 127.016839607 ,
"l" : 127.009237799 ,
"c" : 127.014855249 ,
"v" : null ,
"volume" : "469721.0884137" ,
"buyers" : 749 ,
"sellers" : 927 ,
"buys" : 996 ,
"sells" : 1203 ,
"buyVolume" : "225517.7527296" ,
"sellVolume" : "244203.3356831" ,
"liquidity" : "1172794156.1" ,
"transactions" : 2200
}
},
"r5" : {
"t" : 1769563200 ,
"usd" : {
"t" : 1769563200 ,
"o" : 127.055827666 ,
"h" : 127.112302294 ,
"l" : 126.852901585 ,
"c" : 127.014855249 ,
"v" : null
}
},
"r60" : {
"t" : 1769562000 ,
"usd" : {
"t" : 1769562000 ,
"o" : 127.070132344 ,
"h" : 127.344587246 ,
"l" : 126.852901585 ,
"c" : 127.014855249 ,
"v" : null
}
}
}
}
}
}
Usage Guidelines
Subscribe using tokenId in the format tokenAddress:networkId to stream aggregate bar data for a token
Unlike onBarsUpdated (which tracks a single pair), this subscription aggregates pricing across a token’s top liquidity pairs using weighted averages
aggregates contains OHLCV bar data across multiple resolutions simultaneously (e.g., r1 for 1-minute, r5 for 5-minute, r60 for 1-hour)
Each resolution provides both usd (USD-denominated) and token (native token-denominated) bars via CurrencyBarData
Granular trade metrics like buyers, sellers, buyVolume, sellVolume, and liquidity are available per bar
The default statsType is FILTERED, which excludes bot and sandwich attack transactions
Use the volume string field for precise volume data — the v integer field may be null for aggregate token bars
Troubleshooting Tips
How does this differ from onBarsUpdated?
onBarsUpdated streams bar data for a single trading pair. onTokenBarsUpdated aggregates pricing across a token’s top liquidity pairs using weighted averages based on liquidity and recency, filtering out lower-quality pairs. Use onTokenBarsUpdated for a holistic view of a token’s price, and onBarsUpdated when you need data for a specific pair.
What resolutions are available?
Resolutions range from 1-second (r1S) up to 1-week (r7D): r1S, r5S, r15S, r30S, r1 (1 min), r5, r15, r30, r60, r240 (4h), r720 (12h), r1D, r7D. You only need to request the resolutions you need in your query.
The v integer field may be null for aggregate token bars. Use the volume string field instead, which provides precise volume data as a string to avoid floating-point precision issues.
What does statsType: Filtered vs Unfiltered mean?
Filtered excludes suspected bot and sandwich attack transactions for cleaner price data. Unfiltered includes all transactions. Most charting use cases should use Filtered for more accurate price representation.
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