> ## Documentation Index
> Fetch the complete documentation index at: https://docs.0xarchive.io/llms.txt
> Use this file to discover all available pages before exploring further.

# WebhookEstimate Schema

> How often a would-be subscription would have fired over the requested window. Includes route metadata, schemas, examples, and implementation notes.

Source OpenAPI: 0xArchive API 1.7.0; 218 paths; 210 component schemas.

How often a would-be subscription would have fired over the requested window. Nothing is stored and no delivery is sent.

## Required Fields

| Field | Type | Description |
| - | - | - |
| `basis` | object | How the estimate was produced, so the numbers can be read for what they are. |
| `days` | integer:int64 | Days the answer covers. |
| `event_type` | string | Event type that was evaluated. |
| `ladder` | array\<object> | Ascending. |
| `per_day` | array\<object> | One entry per day, oldest first, zero filled. |
| `per_day_max` | integer:int64 | Busiest day in the window. |
| `per_day_p50` | number | Median deliveries a day across the window. |
| `sample` | array\<object> | Newest matches first, in the same shape the dry-run returns. |
| `total` | integer:int64 | Occurrences that would have been delivered across the window. |
| `window` | object | The window a preview vouches for. |

## JSON Schema

```json theme={"theme":"github-dark"}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "WebhookEstimate",
  "description": "How often a would-be subscription would have fired over the requested window. Nothing is stored and no delivery is sent.",
  "type": "object",
  "required": [
    "basis",
    "days",
    "event_type",
    "ladder",
    "per_day",
    "per_day_max",
    "per_day_p50",
    "sample",
    "total",
    "window"
  ],
  "properties": {
    "basis": {
      "description": "How the estimate was produced, so the numbers can be read for what they are.",
      "type": "object",
      "required": [
        "mode"
      ],
      "properties": {
        "mode": {
          "description": "`exact` counted every occurrence in the window. `sampled` scaled the counts from a capped scan, and the note says by how much. `replayed` re-ran a windowed rule over history at your own parameters.",
          "type": "string",
          "enum": [
            "exact",
            "sampled",
            "replayed"
          ],
          "example": "exact"
        },
        "note": {
          "description": "What qualifies the numbers, when anything does.",
          "type": "string",
          "nullable": true
        }
      }
    },
    "days": {
      "description": "Days the answer covers. Shorter than requested when the event type carries a shorter cap.",
      "type": "integer",
      "format": "int64",
      "example": 7
    },
    "distribution": {
      "description": "Quantiles of the primary metric. Null when the type has no primary metric or nothing matched.",
      "nullable": true,
      "allOf": [
        {
          "description": "Quantiles of the primary metric over the matched occurrences, for choosing a threshold against real history.",
          "type": "object",
          "required": [
            "max",
            "n",
            "p50",
            "p90",
            "p99"
          ],
          "properties": {
            "max": {
              "description": "Largest value seen.",
              "type": "number",
              "example": 4210000
            },
            "n": {
              "description": "Occurrences the quantiles are computed over.",
              "type": "integer",
              "format": "int64",
              "example": 842
            },
            "p50": {
              "description": "Median.",
              "type": "number",
              "example": 18400
            },
            "p90": {
              "description": "90th percentile.",
              "type": "number",
              "example": 132000
            },
            "p99": {
              "description": "99th percentile.",
              "type": "number",
              "example": 910000
            }
          }
        }
      ]
    },
    "event_type": {
      "description": "Event type that was evaluated.",
      "type": "string",
      "example": "market.liquidation"
    },
    "ladder": {
      "description": "Ascending. Empty when there is no primary metric.",
      "type": "array",
      "items": {
        "description": "One rung of the threshold ladder: the daily rate the same configuration would have had at a different threshold.",
        "type": "object",
        "required": [
          "per_day",
          "value"
        ],
        "properties": {
          "per_day": {
            "description": "Deliveries a day at that threshold, everything else unchanged.",
            "type": "number",
            "example": 3.4
          },
          "value": {
            "description": "Threshold on the primary metric.",
            "type": "number",
            "example": 250000
          }
        }
      }
    },
    "per_day": {
      "description": "One entry per day, oldest first, zero filled. The last entry ends at the moment of the request.",
      "type": "array",
      "items": {
        "description": "One 24 hour bin of the estimate window.",
        "type": "object",
        "required": [
          "count",
          "date"
        ],
        "properties": {
          "count": {
            "description": "Occurrences that would have been delivered in the bin.",
            "type": "integer",
            "format": "int64",
            "example": 12
          },
          "date": {
            "description": "UTC date the bin ends on.",
            "type": "string",
            "format": "date",
            "example": "2026-09-19"
          }
        }
      }
    },
    "per_day_max": {
      "description": "Busiest day in the window.",
      "type": "integer",
      "format": "int64",
      "example": 26
    },
    "per_day_p50": {
      "description": "Median deliveries a day across the window.",
      "type": "number",
      "example": 11
    },
    "primary_metric": {
      "description": "The metric the ladder and the distribution are about. Null when the type has none.",
      "type": "string",
      "nullable": true,
      "example": "notional_usd"
    },
    "sample": {
      "description": "Newest matches first, in the same shape the dry-run returns.",
      "type": "array",
      "items": {
        "description": "One occurrence that would have been delivered, in the shape the delivered payload carries.",
        "type": "object",
        "required": [
          "data",
          "observed_at_estimate"
        ],
        "properties": {
          "data": {
            "description": "The occurrence body, the same `data` a delivery would carry.",
            "type": "object",
            "additionalProperties": true
          },
          "observed_at_estimate": {
            "description": "The occurrence's own timestamp. A real delivery's `observed_at` is this plus the time it takes to see the occurrence.",
            "type": "string",
            "format": "date-time"
          }
        }
      }
    },
    "total": {
      "description": "Occurrences that would have been delivered across the window.",
      "type": "integer",
      "format": "int64",
      "example": 84
    },
    "window": {
      "description": "The window a preview vouches for. It can start later than the one that was asked for when a scan reached its row cap.",
      "type": "object",
      "required": [
        "from",
        "to"
      ],
      "properties": {
        "from": {
          "description": "Start of the window the answer covers.",
          "type": "string",
          "format": "date-time"
        },
        "to": {
          "description": "End of the window, which is the moment of the request.",
          "type": "string",
          "format": "date-time"
        }
      }
    }
  }
}
```

## Referenced By

Use this shared schema with the generated component index and route-specific endpoint pages during implementation.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.