Documentation Index Fetch the complete documentation index at: https://docs.mobula.io/llms.txt
Use this file to discover all available pages before exploring further.
Subscriptions use the WebSocket endpoint wss://api.mobula.io/graphql/subscriptions with the graphql-transport-ws protocol.
Returns
Batched events for the subscribed token, grouped by pool. See AddTokenEventsOutput . Show View fields (AddTokenEventsOutput)
Token pointer in the form tokenAddress:networkId.
Events from a single pool that contains the token, ordered by
(blockNumber, transactionIndex, logIndex). See
Event .
Arguments
input
OnTokenEventsCreatedInput!
required
See OnTokenEventsCreatedInput . Token contract address (lowercase or checksummed; we normalize). The subscription matches against both sides of every pool — events fire whether the token is token0 or token1.
Network ID the token is deployed on.
Example
subscription {
onTokenEventsCreated ( input : { tokenAddress : "0xdac17f958d2ee523a2206206994597c13d831ec7" , networkId : 1 }) {
id
events {
id
address
networkId
eventType
eventDisplayType
maker
token0Address
token1Address
transactionHash
timestamp
data {
__typename
... on SwapEventData {
amount0 amount1 amount0In amount0Out amount1In amount1Out
priceUsd priceUsdTotal amountNonLiquidityToken
}
}
}
}
}