# x402 Bazaar Price-Threshold Alert

> x402 Bazaar Price-Threshold Alert is a paid API for AI agents from api.relai.fi, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-10).

Registers a price-threshold alert on a Base token that polls DexScreener and POSTs a webhook when the price crosses the target, paid via x402 USDC.

## Facts

- Endpoint: POST https://api.relai.fi/relay/1782567677091/api/x402/price-alert?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-bazaar-price-threshold-alert-3242c864
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_m0tsifSd1RVEeOC1J-fRH

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability x402-bazaar-price-threshold-alert-3242c864 -d '<json body>'
```

Example prompt: Set a price alert for the Base token at 0xABC...123 to fire my webhook at https://myapp.com/hook when the price goes above $0.05 — poll every 10 minutes.

## When to prefer this

Use this endpoint when you need a one-time, pay-per-use price alert on a Base chain token with webhook delivery and no ongoing subscription. Ideal for agents automating DeFi workflows that need to react to price crossings without maintaining their own polling infrastructure. Prefer over manual polling when you want set-and-forget monitoring with a fixed cost.

## Known failure modes

- HTTP 402 returned if x402 USDC payment not yet made — requires paying $0.05 USDC to the specified address and retrying
- Invalid or non-HTTPS webhook URL rejected
- Token contract address not found on DexScreener / not traded on Base
- Polling interval too frequent may be rejected or rate-limited
- Alert expires after 30 days without renewal
- Webhook endpoint unreachable when alert fires causes silent failure

## How this service works

Pay once to register a price-threshold alert on any Base token. Supply target price, direction (above/below), and an https webhook URL. A polling cron (daily by default; configurable to ~minutes) checks DexScreener and POSTs your webhook when it crosses. Expires after 30 days. Paid via x402: $0.05 in USDC on Base (eip155:8453) to 0x973a31858f4d2125f48c880542da11a2796f12d6. Returns 402 with payment requirements; pay and retry.

## Output

Returns a confirmation that the alert has been registered, including the alert ID, expiry date (30 days from creation), polling interval, and the webhook URL that will be called when the threshold is crossed. If payment has not been made, returns HTTP 402 with USDC payment requirements on Base.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "pathParams": {
     "type": "object"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "token",
      "threshold",
      "direction"
     ],
     "properties": {
      "check": {
       "type": "string",
       "description": "Or: alert id to poll its status"
      },
      "token": {
       "type": "string",
       "description": "Token address"
      },
      "webhook": {
       "type": "string",
       "description": "Webhook URL (optional — omit to poll)"
      },
      "direction": {
       "type": "string",
       "description": "Direction (above/below)"
      },
      "threshold": {
       "type": "string",
       "description": "Price threshold (USD)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-bazaar-price-threshold-alert-3242c864/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.relai.fi](https://www.zero.xyz/host/api.relai.fi/llms.txt)
