Live-streamed unconfirmed transactions for a token. (Solana only)
This endpoint is available on Codex Growth and Enterprise Plans
Endpoint: onUnconfirmedEventsCreated
Method: POST
Arguments
Name | Type | Description |
---|---|---|
address | String | The pair contract address. |
id | String | The ID of the pair ( |
quoteToken | QuoteToken | The token of interest within the pair. Can be |
Response
Name | Type | Description |
---|---|---|
address | String! | The contract address of the pair. |
events | [UnconfirmedEvent]! | A list of transactions for the token. |
id | String! | The ID of the event (address :networkId ). For example, 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2:1 . |
networkId | Int! | The network ID that the token is deployed on. |
quoteToken | QuoteToken | The token of interest within the pair. Can be token0 or token1 . |
Example
Query
subscription OnUnconfirmedEventsCreated($id: String, $quoteToken: QuoteToken) {
onUnconfirmedEventsCreated(id: $id, quoteToken: $quoteToken) {
address
id
networkId
events {
address
eventType
eventDisplayType
blockHash
blockNumber
id
logIndex
maker
quoteToken
supplementalIndex
timestamp
transactionHash
transactionIndex
data {
... on UnconfirmedLiquidityChangeEventData {
amount0
amount1
amount0Shifted
amount1Shifted
type
}
... on UnconfirmedSwapEventData {
amountNonLiquidityToken
priceBaseToken
priceBaseTokenTotal
priceUsd
priceUsdTotal
type
}
}
}
}
}
Response
{
"id": "sol-events",
"type": "data",
"payload": {
"data": {
"onUnconfirmedEventsCreated": {
"address": "3nMFwZXwY1s1M5s8vYAHqd4wGs4iSxXE4LRoUMMYqEgF",
"id": "3nMFwZXwY1s1M5s8vYAHqd4wGs4iSxXE4LRoUMMYqEgF:1399811149",
"networkId": 1399811149,
"events": [
{
"address": "3nMFwZXwY1s1M5s8vYAHqd4wGs4iSxXE4LRoUMMYqEgF",
"eventType": "Swap",
"eventDisplayType": "Sell",
"blockHash": "46eTS3AQFpmY2TrRFPa1NU43sZ4AvhDfKokTrjEhsjGT",
"blockNumber": 298944783,
"id": "3nMFwZXwY1s1M5s8vYAHqd4wGs4iSxXE4LRoUMMYqEgF:1399811149",
"logIndex": 2,
"maker": "Bcxv7jCiVCfdzgZghGQpZBDDNGxRBLgDthmu469jHrCX",
"quoteToken": "token1",
"supplementalIndex": null,
"timestamp": 1730481587,
"transactionHash": "2n7tw6sgZjLBd93rrhxDc3Si6X68v2AJkZuSnDMWUpQXjBaGhnph9tpfnwAtgK1D4WuxorZWomUM44eyF4r6r65L",
"transactionIndex": 195,
"data": {
"amountNonLiquidityToken": "170.463733",
"priceBaseToken": "0.0059835638973669342701124061993586460256",
"priceBaseTokenTotal": "1.0199806385891964864489910903550170073493895648",
"priceUsd": "0.99939",
"priceUsdTotal": "170.35975012287",
"type": "Swap"
}
}
]
}
}
}
}
Ask questions, share what you're working on and request new features 👬👭