Webhooks - Previews

Dry-run a webhook subscription

Which occurrences in the last lookback_s seconds would this configuration have delivered? The configuration is validated and normalised exactly as a create, then evaluated against recent history. Nothing is stored and no delivery is sent. Available for account.fill, account.transfer and market.liquidation; another type is refused with the list of the ones that work. An address scoped type needs at least one watched wallet to report on. Authenticate with an API key or a signed-in dashboard session. Available on every plan, including Free, and metered like the market data it returns. At most six estimates and dry-runs a minute per account, shared between the two.

post/v1/webhooks/subscriptions/dry-run

Request

  • Base URL: https://api.0xarchive.io
  • URL: https://api.0xarchive.io/v1/webhooks/subscriptions/dry-run
  • Auth: API key in header X-API-Key

Request body

event_typestring required

Event type to evaluate.

lookback_sinteger

Seconds of history to scan, ending now.

limitinteger

Occurrences to return, newest first.

Example request

{
  "event_type": "market.liquidation",
  "config": {
    "symbols": [
      "BTC",
      "ETH"
    ],
    "addresses": [
      "0x6b9e773128f453f5c2c60935ee2de2cbc5390a24"
    ],
    "params": {
      "max_age_s": 3600
    },
    "conditions": [
      {
        "metric": "notional_usd",
        "op": "greater_than_or_equal",
        "value": 100000
      }
    ],
    "min_notional_usd": 100000
  },
  "lookback_s": 3600,
  "limit": 100
}

Response

Occurrences the configuration would have delivered

successboolean

Example response

{
  "success": true,
  "data": {
    "event_type": "market.liquidation",
    "matched": 37
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.