Skip to main content

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

onTokenEventsCreated
AddTokenEventsOutput!
Batched events for the subscribed token, grouped by pool. See AddTokenEventsOutput.

Arguments

input
OnTokenEventsCreatedInput!
required
See OnTokenEventsCreatedInput.

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
        }
      }
    }
  }
}