curl --request POST \
--url https://api.0xarchive.io/v1/webhooks/subscriptions/estimate \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"event_type": "market.liquidation"
}
'import requests
url = "https://api.0xarchive.io/v1/webhooks/subscriptions/estimate"
payload = { "event_type": "market.liquidation" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({event_type: 'market.liquidation'})
};
fetch('https://api.0xarchive.io/v1/webhooks/subscriptions/estimate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.0xarchive.io/v1/webhooks/subscriptions/estimate"
payload := strings.NewReader("{\n \"event_type\": \"market.liquidation\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"success": true,
"data": {
"event_type": "market.liquidation",
"window": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z"
},
"days": 7,
"total": 84,
"per_day": [
{
"date": "2026-09-19",
"count": 12
}
],
"per_day_p50": 11,
"per_day_max": 26,
"ladder": [
{
"value": 250000,
"per_day": 3.4
}
],
"sample": [
{
"observed_at_estimate": "2023-11-07T05:31:56Z",
"data": {}
}
],
"basis": {
"mode": "exact",
"note": "<string>"
},
"primary_metric": "notional_usd",
"distribution": {
"n": 842,
"p50": 18400,
"p90": 132000,
"p99": 910000,
"max": 4210000
}
}
}{
"code": 400,
"error": "Failed to deserialize query string: limit: invalid digit found in string",
"error_code": "invalid_query_params",
"request_id": "3f2a9c71-5b0e-4d68-9a4c-7e1d2b6f8a05"
}{
"code": 401,
"error": "Missing or invalid API key. Provide X-API-Key header."
}{
"code": 429,
"error": "Rate limit exceeded"
}{
"code": 503,
"error": "estimate is temporarily unavailable",
"request_id": "3f2a9c71-5b0e-4d68-9a4c-7e1d2b6f8a05"
}Estimate a webhook subscription
0xArchive API reference for Estimate a webhook subscription. Includes authentication, parameters, response shape, examples, and route-safe implementation notes.
curl --request POST \
--url https://api.0xarchive.io/v1/webhooks/subscriptions/estimate \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"event_type": "market.liquidation"
}
'import requests
url = "https://api.0xarchive.io/v1/webhooks/subscriptions/estimate"
payload = { "event_type": "market.liquidation" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({event_type: 'market.liquidation'})
};
fetch('https://api.0xarchive.io/v1/webhooks/subscriptions/estimate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.0xarchive.io/v1/webhooks/subscriptions/estimate"
payload := strings.NewReader("{\n \"event_type\": \"market.liquidation\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"success": true,
"data": {
"event_type": "market.liquidation",
"window": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z"
},
"days": 7,
"total": 84,
"per_day": [
{
"date": "2026-09-19",
"count": 12
}
],
"per_day_p50": 11,
"per_day_max": 26,
"ladder": [
{
"value": 250000,
"per_day": 3.4
}
],
"sample": [
{
"observed_at_estimate": "2023-11-07T05:31:56Z",
"data": {}
}
],
"basis": {
"mode": "exact",
"note": "<string>"
},
"primary_metric": "notional_usd",
"distribution": {
"n": 842,
"p50": 18400,
"p90": 132000,
"p99": 910000,
"max": 4210000
}
}
}{
"code": 400,
"error": "Failed to deserialize query string: limit: invalid digit found in string",
"error_code": "invalid_query_params",
"request_id": "3f2a9c71-5b0e-4d68-9a4c-7e1d2b6f8a05"
}{
"code": 401,
"error": "Missing or invalid API key. Provide X-API-Key header."
}{
"code": 429,
"error": "Rate limit exceeded"
}{
"code": 503,
"error": "estimate is temporarily unavailable",
"request_id": "3f2a9c71-5b0e-4d68-9a4c-7e1d2b6f8a05"
}X-API-Key with this request. See REST authentication.Shared request rules
Shared request rules
Machine schema
Machine schema
Authorizations
API key for authentication. Get yours at https://0xarchive.io/dashboard
Body
A would-be subscription to evaluate against history. Same shape as a create, without the endpoint, plus the window.
Event type to evaluate.
"market.liquidation"
What a subscription matches on. Every key is checked against the event type's catalog declaration, so an unknown key, an undeclared parameter or a condition on an undeclared metric is refused rather than ignored. The stored config is the normalised form: venues and addresses lowercased, declared parameters filled in at their defaults, and operators written in their canonical spelling.
Hide child attributes
Hide child attributes
Venue or venues to match, from the event type's venues list. Accepts a single string, a pipe separated string or a list. Omit to match every covered venue.
"hyperliquid"
Instrument symbols to match. Omit to match every symbol.
["BTC", "ETH"]
Wallets to match, for an address scoped event type. Every address must already be on your watched list. Omit to match all of them.
[ "0x6b9e773128f453f5c2c60935ee2de2cbc5390a24" ]
Parameter values for the event type, keyed by the parameter names it declares. A declared parameter you leave out is stored at its default. A declared parameter may also be written at the top level of the config.
{ "max_age_s": 3600 }
Conditions on the event's metrics, all of which must hold for a delivery. At most 16 per subscription.
Hide child attributes
Hide child attributes
A metric declared by the event type.
"notional_usd"
Comparison to apply. Symbol spellings such as >= are accepted on the way in and stored in the canonical spelling shown here.
greater_than, greater_than_or_equal, less_than, less_than_or_equal, equal, not_equal, between, not_between, in, not_in, contains, not_contains, starts_with, ends_with, before, after, is_empty, is_not_empty "greater_than_or_equal"
What to compare against. A number, string, boolean or RFC 3339 timestamp for a single value comparison; a two entry [low, high] list for between and not_between; a non-empty list for in and not_in. Omitted for is_empty and is_not_empty.
100000
Shorthand for a notional_usd at-or-above condition, kept for compatibility. It is stored as a condition, and it is mirrored back here as the loosest notional lower bound the config carries.
100000
Days of history to evaluate, ending now.
1 <= x <= 307
Response
How often the configuration would have fired
API response containing a subscription estimate.
true
How often a would-be subscription would have fired over the requested window. Nothing is stored and no delivery is sent.
Hide child attributes
Hide child attributes
Event type that was evaluated.
"market.liquidation"
The window a preview vouches for. It can start later than the one that was asked for when a scan reached its row cap.
Days the answer covers. Shorter than requested when the event type carries a shorter cap.
7
Occurrences that would have been delivered across the window.
84
One entry per day, oldest first, zero filled. The last entry ends at the moment of the request.
Median deliveries a day across the window.
11
Busiest day in the window.
26
Newest matches first, in the same shape the dry-run returns.
How the estimate was produced, so the numbers can be read for what they are.
Hide child attributes
Hide child attributes
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.
exact, sampled, replayed "exact"
What qualifies the numbers, when anything does.
The metric the ladder and the distribution are about. Null when the type has none.
"notional_usd"
Quantiles of the primary metric. Null when the type has no primary metric or nothing matched.
Hide child attributes
Hide child attributes
Occurrences the quantiles are computed over.
842
Median.
18400
90th percentile.
132000
99th percentile.
910000
Largest value seen.
4210000
Was this page helpful?