Returns
Show Properties
Show Properties
blockNumber#transactionIndex#logIndex, zero padded). For example, 0000000016414564#00000224#00000413.Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Arguments
subscription {
onBarsUpdated(
pairId: "BGm1tav58oGcsQJehL9WXBFXF7D27vZsKefj4xJKD5Y:1399811149"
quoteToken: token0
) {
pairAddress
pairId
networkId
timestamp
quoteToken
quoteTokenAddress
eventSortKey
statsType
aggregates {
r1 {
usd {
t
o
h
l
c
v
volume
buyers
sellers
buys
sells
buyVolume
sellVolume
liquidity
transactions
}
}
r5 {
usd {
t
o
h
l
c
v
}
}
r60 {
usd {
t
o
h
l
c
v
}
}
}
}
}
{
"data": {
"onBarsUpdated": {
"pairAddress": "BGm1tav58oGcsQJehL9WXBFXF7D27vZsKefj4xJKD5Y",
"pairId": "BGm1tav58oGcsQJehL9WXBFXF7D27vZsKefj4xJKD5Y:1399811149",
"networkId": 1399811149,
"timestamp": 1769559142,
"quoteToken": "token0",
"quoteTokenAddress": "So11111111111111111111111111111111111111112",
"eventSortKey": "0000000396370575#00001095#00000000#00000012",
"statsType": "UNFILTERED",
"aggregates": {
"r1": {
"usd": {
"t": 1769559120,
"o": 126.91645786,
"h": 126.91645786,
"l": 126.906300653,
"c": 126.906300653,
"v": 16608,
"volume": "16607.75618360923",
"buyers": 5,
"sellers": 0,
"buys": 7,
"sells": 0,
"buyVolume": "16607",
"sellVolume": "0",
"liquidity": "1495261.94023",
"transactions": 7
}
},
"r5": {
"usd": {
"t": 1769559000,
"o": 126.909482001,
"h": 126.91645786,
"l": 126.904001603,
"c": 126.906300653,
"v": 16727
}
},
"r60": {
"usd": {
"t": 1769558400,
"o": 127.033618681,
"h": 127.035495596,
"l": 126.78034421,
"c": 126.906300653,
"v": 52148
}
}
}
}
}
}
Usage Guidelines
- Subscribe using
pairIdin the formatpairAddress:networkId - Set
quoteTokentotoken0ortoken1to specify which token in the pair is being priced aggregatescontains OHLCV bar data across multiple resolutions simultaneously (e.g.,r1for 1-minute,r5for 5-minute,r60for 1-hour,r1Dfor 1-day)- Each resolution provides both
usd(USD-denominated) andtoken(native token-denominated) bars - Use
o,h,l,cfor open/high/low/close prices, andvfor volume - Granular trade metrics like
buyers,sellers,buyVolume, andsellVolumeare available per bar for trade flow analysis - Updates are streamed in real-time with every on-chain swap event
Troubleshooting Tips
What resolutions are available?
What resolutions are available?
r1S) up to 1-week (r1W): r1S, r5S, r15S, r30S, r1 (1 min), r5, r15, r30, r60, r240 (4h), r720 (12h), r1D, r1W. You only need to request the resolutions you need in your query.What's the difference between usd and token bars?
What's the difference between usd and token bars?
usd bars are denominated in US dollars, while token bars are denominated in the paired token (e.g., USDC). Use usd for standard price charts and token for relative price analysis against the quote token.How do I choose the right quoteToken?
How do I choose the right quoteToken?
quoteToken selects which token in the pair is being priced. For example, in a SOL/USDC pair where SOL is token0, setting quoteToken: token0 returns the price of SOL in terms of USDC, while token1 returns the price of USDC in terms of SOL. Check the pair metadata to confirm which token is token0 vs token1.What does statsType: Filtered vs Unfiltered mean?
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.How often are updates sent?
How often are updates sent?