# DeFi Shield API Trust & Reliability Comparator

> DeFi Shield API Trust & Reliability Comparator is a paid API for AI agents from defi-shield-hazel.vercel.app, paid per call via x402, $0.5/call, status unknown (last checked 2026-09-16).

Compares multiple API endpoint URLs side-by-side by availability, latency, trust score, response validity, and schema consistency, returning a ranked recommendation.

## Facts

- Endpoint: POST https://defi-shield-hazel.vercel.app/api/trust/service-compare
- Price: $0.5/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/defi-shield-hazel-vercel-app-d4ed7c32
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_8aMaL93p9mp1NiQYuM0n6

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 defi-shield-hazel-vercel-app-d4ed7c32 -d '<json body>'
```

Example prompt: Compare these three API endpoints for me and tell me which one is the most trustworthy and available: https://api.example.com/v1/prices, https://api.example.com/v2/data, and https://api.example.com/v3/quotes — rank them by trust score and latency.

## When to prefer this

Use this endpoint when you need to objectively choose between multiple competing API data sources and want a trust-and-availability ranking rather than manual spot-checking. Ideal when an agent must select the best live endpoint from a pool of candidates (e.g., price feeds, quote APIs, DeFi data providers) and needs a structured recommendation with latency and schema-consistency signals.

## Known failure modes

- All endpoints unreachable — returns comparison array with available:false and trustScore:10 for all entries, bestService still set to rank-1 URL
- Invalid or malformed URL in input array — may cause parsing errors or zero-latency unreachable result
- Empty urls array — likely returns empty comparison with totalCompared:0
- Downstream API probe timeout — latency recorded but availability marked false
- x402 payment failure — endpoint returns 402 if USDC payment not attached

## Output

Returns a timestamped comparison array where each URL entry includes its rank, trust score (0–100), availability boolean, latency in milliseconds, response validity flag, schema consistency flag, and a list of issues found. Also returns the single best-ranked service URL and total count of endpoints compared.

## Example request

```json
{
 "input": {
  "body": {
   "urls": [
    "https://api.coingecko.com/api/v3/simple/price",
    "https://api.coinmarketcap.com/v1/cryptocurrency/quotes/latest",
    "https://api.kraken.com/0/public/Ticker"
   ]
  },
  "type": "http",
  "method": "POST",
  "bodyType": "json"
 }
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "bodyType",
    "body",
    "method"
   ],
   "properties": {
    "body": {
     "properties": {
      "urls": {
       "type": "array",
       "description": "Array of API endpoint URLs to compare"
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "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/defi-shield-hazel-vercel-app-d4ed7c32/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from defi-shield-hazel.vercel.app](https://www.zero.xyz/host/defi-shield-hazel.vercel.app/llms.txt)
