> ## 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.

# WebhookCondition

> Union of per-category condition shapes carried by Webhook.conditions.

### TypeScript shape

```ts theme={null}
type WebhookCondition = PriceEventWebhookCondition | MarketCapEventWebhookCondition | TokenPairEventWebhookCondition | RawTransactionWebhookCondition | TokenPriceEventWebhookCondition | TokenTransferEventWebhookCondition | PredictionTradeWebhookCondition | PredictionMarketMetricsEventWebhookCondition;
```

`WebhookCondition` is a GraphQL union — discriminate via `__typename` to read the right fields. Only the four supported categories are returned by [getWebhooks](/api-reference/graphql/queries/getWebhooks).

<ResponseField name="TokenPairEventWebhookCondition" type="object">
  Pair-level events (swap / mint / burn). See [TokenPairEventWebhookCondition](/api-reference/graphql/types/TokenPairEventWebhookCondition).
</ResponseField>

<ResponseField name="TokenPriceEventWebhookCondition" type="object">
  Token-price threshold events. See [TokenPriceEventWebhookCondition](/api-reference/graphql/types/TokenPriceEventWebhookCondition).
</ResponseField>

<ResponseField name="MarketCapEventWebhookCondition" type="object">
  Market-cap threshold events. See [MarketCapEventWebhookCondition](/api-reference/graphql/types/MarketCapEventWebhookCondition).
</ResponseField>

<ResponseField name="TokenTransferEventWebhookCondition" type="object">
  Token-transfer events. See [TokenTransferEventWebhookCondition](/api-reference/graphql/types/TokenTransferEventWebhookCondition).
</ResponseField>

### Example

```graphql theme={null}
conditions {
  __typename
  ... on TokenPairEventWebhookCondition {
    pairAddress { eq }
    eventType { oneOf }
  }
  ... on TokenPriceEventWebhookCondition {
    address { eq }
    priceUsd { gte }
  }
  ... on MarketCapEventWebhookCondition {
    tokenAddress { eq }
    fdvMarketCapUsd { gte }
  }
  ... on TokenTransferEventWebhookCondition {
    address { eq }
    direction { oneOf }
  }
}
```
