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.

Overview

Returns webhooks created by the authenticated API key. Results are ordered newest first and paginated with an opaque cursor. You can narrow the listing by a single webhookId, by bucketId, by bucketSortkey, or by both bucketId + bucketSortkey. Only the four supported webhook categories are returned: TOKEN_PAIR_EVENT, TOKEN_PRICE_EVENT, MARKET_CAP_EVENT, TOKEN_TRANSFER_EVENT.
An API key is required. The query throws UNAUTHENTICATED if it is missing or invalid.

Returns

getWebhooks
GetWebhooksResponse!
See GetWebhooksResponse.

Arguments

cursor
String
Cursor returned by a previous call to fetch the next page.
webhookId
String
Return only the webhook with this id (still scoped to the calling API key — returns empty if it belongs to another key). Mutually exclusive with bucketId.
bucketId
String
Return only webhooks whose bucketKey.bucketId matches. Mutually exclusive with webhookId.
bucketSortkey
String
Return only webhooks whose bucketKey.bucketSortKey matches. Can be combined with bucketId to address a single bucket entry.
limit
Int
Page size. Default 20, clamped to [1, 100].

Example

query GetWebhooks {
  getWebhooks(limit: 20) {
    cursor
    items {
      id
      webhookType
      name
      created
      status
      alertRecurrence
      callbackUrl
      publishingType
      bucketKey {
        bucketId
        bucketSortKey
      }
      conditions {
        __typename
        ... on TokenPairEventWebhookCondition {
          pairAddress { eq }
          eventType { oneOf }
          swapValue { gte }
        }
        ... on TokenPriceEventWebhookCondition {
          address { eq }
          networkId { eq }
          priceUsd { gte }
        }
        ... on MarketCapEventWebhookCondition {
          tokenAddress { eq }
          networkId { eq }
          fdvMarketCapUsd { gte }
        }
        ... on TokenTransferEventWebhookCondition {
          tokenAddress { eq }
          address { eq }
          direction { oneOf }
        }
      }
    }
  }
}

Paginating

query NextPage($cursor: String!) {
  getWebhooks(limit: 50, cursor: $cursor) {
    cursor
    items { id name created }
  }
}

Look up one webhook

query OneWebhook($id: String!) {
  getWebhooks(webhookId: $id) {
    items { id name webhookType status }
  }
}

Filter by bucket

query Bucket($bucketId: String!) {
  getWebhooks(bucketId: $bucketId) {
    items { id name bucketKey { bucketId bucketSortKey } }
  }
}