Live-streamed bar chart data to track unconfirmed token price changes over time. (Only Solana)
This endpoint is available on Codex Growth and Enterprise Plans
Endpoint: onUnconfirmedBarsUpdated
Method: POST
Arguments
Name | Type | Description |
---|---|---|
pairId | String | The ID of the pair ( |
quoteToken | QuoteToken | The token of interest within the pair. Can be |
Response
Name | Type | Description |
---|---|---|
aggregates | UnconfirmedResolutionBarData! | Price data broken down by resolution. |
eventSortKey | String! | The sortKey for the bar (blockNumber #transactionIndex #logIndex , zero padded).For example, 0000000016414564#00000224#00000413 . |
networkId | Int! | The network ID the pair is deployed on. |
pairAddress | String! | The contract address for the pair. |
pairId | String! | The ID for the pair (pairAddress :networkId ). |
quoteToken | QuoteToken | The quote token within the pair. |
quoteTokenAddress | String! | The address of the token being quoted |
timestamp | Int! | The unix timestamp for the new bar. |
O, H, L, C, V, T, and S are in their abbreviated format so that you can easily insert the data into the TradingView charting library.
đ¨âđģ Example
Query
subscription OnUnconfirmedBarsUpdated {
onUnconfirmedBarsUpdated(pairId: $pairId, quoteToken: token0) {
networkId
pairId
timestamp
eventSortKey
pairAddress
quoteToken
quoteTokenAddress
timestamp
aggregates {
r1 {
c
h
l
o
t
v
volume
}
r1S {
c
h
l
o
t
v
volume
}
r5S {
c
h
l
o
t
v
volume
}
r15S {
c
h
l
o
t
v
volume
}
r5 {
c
h
l
o
t
v
volume
}
r15 {
c
h
l
o
t
v
volume
}
}
}
}
Response
{
"data": {
"onUnconfirmedBarsUpdated": {
"networkId": 1399811149,
"pairId": "8sLbNZoA1cfnvMJLPfp98ZLAnFSYCFApfJKMbiXNLwxj:1399811149",
"timestamp": 1732909856,
"eventSortKey": "0000000304394597#00001094#00000002#00000009",
"pairAddress": "8sLbNZoA1cfnvMJLPfp98ZLAnFSYCFApfJKMbiXNLwxj",
"quoteToken": "token0",
"quoteTokenAddress": "So11111111111111111111111111111111111111112",
"aggregates": {
"r1": {
"c": 241.190034963,
"h": 241.190034963,
"l": 241.03399587,
"o": 241.045821819,
"t": 1732909800,
"v": 78526,
"volume": "78526.552571848371006642"
},
"r1S": {
"c": 241.190034963,
"h": 241.190034963,
"l": 241.140466983,
"o": 241.140466983,
"t": 1732909855,
"v": 3552,
"volume": "3552.701076328371006642"
},
"r5S": {
"c": 241.190034963,
"h": 241.190034963,
"l": 241.140466983,
"o": 241.140466983,
"t": 1732909855,
"v": 3552,
"volume": "3552.701076328371006642"
},
"r15S": {
"c": 241.190034963,
"h": 241.190034963,
"l": 241.139125098,
"o": 241.139125098,
"t": 1732909845,
"v": 11614,
"volume": "11614.765160828371006642"
},
"r5": {
"c": 241.190034963,
"h": 241.190034963,
"l": 241.03399587,
"o": 241.045821819,
"t": 1732909800,
"v": 78526,
"volume": "78526.552571848371006642"
},
"r15": {
"c": 241.190034963,
"h": 241.462538776,
"l": 240.99654923,
"o": 241.203515446,
"t": 1732909500,
"v": 432679,
"volume": "432679.790491448371006642"
}
}
}
}
}
Ask questions, share what you're working on and request new features đŦđ